Aggiunto sistema partizionamento DB per ottimizzare l'accesso ai dati
This commit is contained in:
43
proxy/users_gest.php
Executable file
43
proxy/users_gest.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
include_once ("../core/config.php");
|
||||
$UTENTE = login();
|
||||
$DIRITTI = diritti(1);
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function confirmation(testo) {
|
||||
alert(testo)
|
||||
document.location.href='main.php'
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
if (isset($_GET['azione'])) {
|
||||
$azione = $_GET['azione'];
|
||||
switch ($azione) {
|
||||
case "abilita":
|
||||
$query = "UPDATE proxy_utenti SET attivo = 1 WHERE id = $id";
|
||||
mysql_query( $query, $DB_ID );
|
||||
$testo = "Utente Abilitato";
|
||||
break;
|
||||
case "blocca":
|
||||
$query = "UPDATE proxy_utenti SET attivo = 0 WHERE id = $id";
|
||||
mysql_query( $query, $DB_ID );
|
||||
$testo = "Utente Disabilitato";
|
||||
break;
|
||||
default:
|
||||
$testo = "Regola non implementata";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
confirmation ('<?php print "$testo" ?>');
|
||||
document.location.href='<?php print $_SERVER['HTTP_REFERER']?>'
|
||||
</script>
|
||||
Reference in New Issue
Block a user