gestione reti

This commit is contained in:
cmaffio
2016-05-10 17:18:44 +02:00
parent cf1ba29654
commit b3125143e3
6 changed files with 480 additions and 1 deletions

44
proxy/proxy_gest.php Executable file
View File

@@ -0,0 +1,44 @@
<?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>