$valore) { if (preg_match ("/^new-(\d+)/", $id, $ris)) $new[$ris[1]] = $valore; if (preg_match ("/^old-(\d+)/", $id, $ris)) $old[$ris[1]] = $valore; } foreach ($new as $id => $valore) { if ($new[$id] == $old[$id]) continue; $modificato = 1; if ($valore >1) $stato = 1; else $stato = $valore; $query = " SELECT firewall_versoesterno_regole.id_firewall_versoesterno FROM firewall_versoesterno_regole WHERE firewall_versoesterno_regole.id = $id "; $res = mysql_query( $query, $DB_ID ); $dato = mysql_fetch_array ( $res ); $query = " UPDATE firewall_versoesterno_regole SET stato = $valore, modifica = NOW() WHERE id_firewall_versoesterno = ".$dato['id_firewall_versoesterno']; $res = mysql_query( $query, $DB_ID ); $query = " INSERT INTO firewall_logs SET id_utenti = ".$UTENTE['id'].", tabella = 'versoesterno', id_regole = $id, stato = $valore, data = NOW() "; $res = mysql_query( $query, $DB_ID ); } if ($modificato) genera(); } $tabella = new html (0,"90%",array(15,2,20,2,5,0)); ?>
close (); view_footer(); ?>