Aggiunta associazione

This commit is contained in:
2019-04-29 16:51:42 +02:00
parent 391a850339
commit 6d18fd19ae
33 changed files with 2987 additions and 1 deletions

38
associazione/utente_update.php Executable file
View File

@@ -0,0 +1,38 @@
<?php
include_once ("../core/config.php");
$UTENTE = login();
$DIRITTI = diritti('Admin');
$user_id = $_GET['user_id'];
$accesso = $_GET['accesso'];
$palestra = $_GET['palestra'];
$query = " INSERT INTO
wf_utenti
SET
id_utenti = $user_id,
id_palestra = ( SELECT
id
FROM
wf_palestra
WHERE
palestra = '$palestra' AND attivo = 1
),
attivo = $accesso,
modifica = NOW()
ON DUPLICATE KEY UPDATE
attivo = $accesso,
modifica = NOW()
";
$res = mysql_query( $query, $DB_ID );
/* Attivare solo per debug
$fp = fopen('out.txt', 'w');
fwrite($fp, $stato);
fwrite($fp, "\n");
fwrite($fp, $query);
fwrite($fp, "\n");
fclose($fp);
*/
?>