From 3f68b14259a7e786af95ed608c69a47f11eb1c3f Mon Sep 17 00:00:00 2001 From: cmaffio Date: Wed, 11 May 2016 12:12:30 +0200 Subject: [PATCH] unificazione gestioni proxy --- proxy/acl_gest.php | 43 ----------------------------- proxy/index.php | 4 +-- proxy/pool_gest.php | 62 ------------------------------------------ proxy/pool_ip.php | 4 +-- proxy/pool_lista.php | 4 +-- proxy/proxy_gest.php | 43 +++++++++++++++++++++++++++++ proxy/squid_acl/listip | 1 + proxy/users_edit.php | 4 +-- proxy/users_gest.php | 47 -------------------------------- proxy/users_lista.php | 6 ++-- 10 files changed, 55 insertions(+), 163 deletions(-) delete mode 100755 proxy/acl_gest.php delete mode 100755 proxy/pool_gest.php delete mode 100755 proxy/users_gest.php diff --git a/proxy/acl_gest.php b/proxy/acl_gest.php deleted file mode 100755 index 5411880..0000000 --- a/proxy/acl_gest.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - - diff --git a/proxy/index.php b/proxy/index.php index f0d3593..afcbc82 100755 --- a/proxy/index.php +++ b/proxy/index.php @@ -33,9 +33,9 @@ while ($dato = mysql_fetch_array ( $res )) { - Utente limitato + Utente limitato - Utente non limitato + Utente non limitato Dettaglio diff --git a/proxy/pool_gest.php b/proxy/pool_gest.php deleted file mode 100755 index dc90d60..0000000 --- a/proxy/pool_gest.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - diff --git a/proxy/pool_ip.php b/proxy/pool_ip.php index d99f53e..9b7c70b 100755 --- a/proxy/pool_ip.php +++ b/proxy/pool_ip.php @@ -57,9 +57,9 @@ if (isset($_GET['ip'])) { - Utente limitato + Utente limitato - Utente non limitato + Utente non limitato diff --git a/proxy/pool_lista.php b/proxy/pool_lista.php index 5ff23db..9d9a5b2 100755 --- a/proxy/pool_lista.php +++ b/proxy/pool_lista.php @@ -96,9 +96,9 @@ while ($dato = mysql_fetch_array ( $res )) { - Utente limitato + Utente limitato - Utente non limitato + Utente non limitato Dettaglio diff --git a/proxy/proxy_gest.php b/proxy/proxy_gest.php index 143ed18..a0d9a06 100755 --- a/proxy/proxy_gest.php +++ b/proxy/proxy_gest.php @@ -54,6 +54,33 @@ if (isset($_GET['id'])) { mysql_query( $query, $DB_ID ); break; + case "pool_ins": + $query = "INSERT INTO proxy_pool (ip, pool, attivo, ins) VALUES ('$id', 1, 1, NOW()) ON DUPLICATE KEY UPDATE attivo = 1"; + mysql_query( $query, $DB_ID ); + genera($DB_ID); + break; + case "pool_rem": + $query = "INSERT INTO proxy_pool (ip, pool, attivo, ins) VALUES ('$id', 1, 0, NOW()) ON DUPLICATE KEY UPDATE attivo = 0"; + mysql_query( $query, $DB_ID ); + genera($DB_ID); + break; + + case "user_up": + $query = "UPDATE proxy_utenti SET attivo = 1 WHERE id = $id"; + mysql_query( $query, $DB_ID ); + $testo = "Utente Abilitato"; + break; + case "user_down": + $query = "UPDATE proxy_utenti SET attivo = 0 WHERE id = $id"; + mysql_query( $query, $DB_ID ); + $testo = "Utente Disabilitato"; + break; + case "user_rm": + $query = "DELETE FROM proxy_utenti WHERE id = $id"; + mysql_query( $query, $DB_ID ); + $testo = "Utente Eliminato"; + break; + default: $testo = "Regola non implementata"; break; @@ -64,3 +91,19 @@ if (isset($_GET['id'])) { + + + diff --git a/proxy/squid_acl/listip b/proxy/squid_acl/listip index e69de29..8b13789 100644 --- a/proxy/squid_acl/listip +++ b/proxy/squid_acl/listip @@ -0,0 +1 @@ + diff --git a/proxy/users_edit.php b/proxy/users_edit.php index d64839a..e17d2ba 100755 --- a/proxy/users_edit.php +++ b/proxy/users_edit.php @@ -122,9 +122,9 @@ $res = mysql_query( $query, $DB_ID ); - Utente Attivo + Utente Attivo - Utente non Attivo + Utente non Attivo diff --git a/proxy/users_gest.php b/proxy/users_gest.php deleted file mode 100755 index bd567d5..0000000 --- a/proxy/users_gest.php +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - diff --git a/proxy/users_lista.php b/proxy/users_lista.php index f58d125..bc77c65 100755 --- a/proxy/users_lista.php +++ b/proxy/users_lista.php @@ -34,11 +34,11 @@ while ($dato = mysql_fetch_array ( $res )) { - Utente Attivo + Utente Attivo - Utente non Attivo + Utente non Attivo - + Dettaglio