Aggiunta gestione IP

This commit is contained in:
cmaffio
2016-04-27 12:25:52 +02:00
parent 5becd28889
commit 1bbecd135e
4 changed files with 150 additions and 48 deletions

View File

@@ -21,13 +21,13 @@ if (isset($_GET['ip'])) {
$azione = $_GET['azione'];
switch ($azione) {
case "limita":
$query = "INSERT INTO proxy_pool (ip, pool, attivo) VALUES ('$ip', 1, 1) ON DUPLICATE KEY UPDATE attivo = 1";
$query = "INSERT INTO proxy_pool (ip, pool, attivo, ins) VALUES ('$ip', 1, 1, NOW()) ON DUPLICATE KEY UPDATE attivo = 1";
mysql_query( $query, $DB_ID );
$testo = "Utente $ip inserito in pool di limitazione banda";
genera($DB_ID);
break;
case "libera":
$query = "INSERT INTO proxy_pool (ip, pool, attivo) VALUES ('$ip', 1, 0) ON DUPLICATE KEY UPDATE attivo = 0";
$query = "INSERT INTO proxy_pool (ip, pool, attivo, ins) VALUES ('$ip', 1, 0, NOW()) ON DUPLICATE KEY UPDATE attivo = 0";
mysql_query( $query, $DB_ID );
$testo = "Utente $ip rimosso dal pool di limitazione banda";
genera($DB_ID);
@@ -40,7 +40,7 @@ if (isset($_GET['ip'])) {
}
?>
<script type="text/javascript">
confirmation ('<?php print "$testo" ?>');
// confirmation ('<?php print "$testo" ?>');
document.location.href='<?php print $_SERVER['HTTP_REFERER']?>'
</script>