Pannello gestione utenti/moduli

This commit is contained in:
cmaffio
2015-10-15 13:40:45 +02:00
parent 6c42d75681
commit 1bacc3232e
12 changed files with 284 additions and 144 deletions

38
utenti/updatepermessi.php Executable file
View File

@@ -0,0 +1,38 @@
<?php
include_once ("../core/config.php");
$UTENTE = login();
$DIRITTI = diritti();
$user_id = $_GET['user_id'];
$accesso = $_GET['accesso'];
$modulo = $_GET['modulo'];
$query = " INSERT INTO
permessi
SET
id_utenti = $user_id,
id_moduli = ( SELECT
id
FROM
moduli
WHERE
nome = '$modulo' AND attivo = 1
),
accesso = $accesso,
modifica = NOW()
ON DUPLICATE KEY UPDATE
accesso = $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);
*/
?>