Files
pannello/proxy/proxy_gest.php
2016-05-10 17:18:44 +02:00

45 lines
936 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 "net_up":
$query = "UPDATE proxy_net SET attivo = 1 WHERE id = $id";
mysql_query( $query, $DB_ID );
break;
case "net_down":
$query = "UPDATE proxy_net SET attivo = 0 WHERE id = $id";
mysql_query( $query, $DB_ID );
break;
case "net_rm":
$query = "DELETE FROM proxy_net WHERE id = $id";
mysql_query( $query, $DB_ID );
break;
default:
$testo = "Regola non implementata";
break;
}
}
}
?>
<script type="text/javascript">
document.location.href='<?php print $_SERVER['HTTP_REFERER']?>'
</script>