44 lines
937 B
PHP
Executable File
44 lines
937 B
PHP
Executable File
<?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>
|