Aggiunta associazione
This commit is contained in:
38
associazione/utente_update.php
Executable file
38
associazione/utente_update.php
Executable 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);
|
||||
*/
|
||||
?>
|
||||
Reference in New Issue
Block a user