diff --git a/firewall/firewall_library.php b/firewall/firewall_library.php index d97bfd9..0ccd856 100644 --- a/firewall/firewall_library.php +++ b/firewall/firewall_library.php @@ -264,25 +264,25 @@ function elimina ($cerca) { function azzera () { global $UTENTE, $DB_ID, $CONF, $FW_conf; - $query = " UPDATE - firewall_versoesterno_regole - SET - stato = 0, - modifica = NOW() - WHERE - stato = 1 - "; + $query = "SELECT id FROM firewall_versoesterno_regole WHERE stato = 1"; $res = mysql_query( $query, $DB_ID ); + while ($dato = mysql_fetch_array ( $res )) { + $id = $dato['id']; + $query = "UPDATE firewall_versoesterno_regole SET stato = 0, modifica = NOW() WHERE id = $id"; + mysql_query( $query, $DB_ID ); + $query = "INSERT INTO firewall_logs SET id_utenti = 1, tabella = 'versoesterno', id_regole = $id, stato = 0, data = NOW()"; + mysql_query( $query, $DB_ID ); + } - $query = " UPDATE - firewall_versointerno_regole - SET - stato = 0, - modifica = NOW() - WHERE - stato = 1 - "; + $query = "SELECT id FROM firewall_versointerno_regole WHERE stato = 1"; $res = mysql_query( $query, $DB_ID ); + while ($dato = mysql_fetch_array ( $res )) { + $id = $dato['id']; + $query = "UPDATE firewall_versointerno_regole SET stato = 0, modifica = NOW() WHERE id = $id"; + mysql_query( $query, $DB_ID ); + $query = "INSERT INTO firewall_logs SET id_utenti = 1, tabella = 'versointerno', id_regole = $id, stato = 0, data = NOW()"; + mysql_query( $query, $DB_ID ); + } } ?> diff --git a/firewall/firewall_logs.php b/firewall/firewall_logs.php index 3f501ac..9dcb6ce 100755 --- a/firewall/firewall_logs.php +++ b/firewall/firewall_logs.php @@ -101,28 +101,28 @@ $tabella->intestazione (array("", "Data", "", "Utente", "", "Nome Regola", "", "


