fix azzeramento regole e fix font dropdown

This commit is contained in:
cmaffio
2016-06-23 16:29:37 +02:00
parent 64411bc0a5
commit 2b1b48b072
3 changed files with 28 additions and 27 deletions

View File

@@ -264,25 +264,25 @@ function elimina ($cerca) {
function azzera () { function azzera () {
global $UTENTE, $DB_ID, $CONF, $FW_conf; global $UTENTE, $DB_ID, $CONF, $FW_conf;
$query = " UPDATE $query = "SELECT id FROM firewall_versoesterno_regole WHERE stato = 1";
firewall_versoesterno_regole
SET
stato = 0,
modifica = NOW()
WHERE
stato = 1
";
$res = mysql_query( $query, $DB_ID ); $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 $query = "SELECT id FROM firewall_versointerno_regole WHERE stato = 1";
firewall_versointerno_regole
SET
stato = 0,
modifica = NOW()
WHERE
stato = 1
";
$res = mysql_query( $query, $DB_ID ); $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 );
}
} }
?> ?>

View File

@@ -101,28 +101,28 @@ $tabella->intestazione (array("", "Data", "", "Utente", "", "Nome Regola", "", "
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td> <td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
<td class="spazioh"> <td class="spazioh">
<select name="tempo" onchange="this.form.submit()"> <select name="tempo" onchange="this.form.submit()">
<option value="HOUR" <?php if ($tempo == "HOUR") {print "selected=\"selected\""; } ?>>Ultima Ora</option> <option class="testo" value="HOUR" <?php if ($tempo == "HOUR") {print "selected=\"selected\""; } ?>>Ultima Ora</option>
<option value="DAY" <?php if ($tempo == "DAY") {print "selected=\"selected\""; } ?>>Ultimo Giorno</option> <option class="testo" value="DAY" <?php if ($tempo == "DAY") {print "selected=\"selected\""; } ?>>Ultimo Giorno</option>
<option value="WEEK" <?php if ($tempo == "WEEK") {print "selected=\"selected\""; } ?>>Ultima Settimana</option> <option class="testo" value="WEEK" <?php if ($tempo == "WEEK") {print "selected=\"selected\""; } ?>>Ultima Settimana</option>
<option value="MONTH" <?php if ($tempo == "MONTH") {print "selected=\"selected\""; } ?>>Ultimo Mese</option> <option class="testo" value="MONTH" <?php if ($tempo == "MONTH") {print "selected=\"selected\""; } ?>>Ultimo Mese</option>
<option value="YEAR" <?php if ($tempo == "YEAR") {print "selected=\"selected\""; } ?>>Ultimo Anno</option> <option class="testo" value="YEAR" <?php if ($tempo == "YEAR") {print "selected=\"selected\""; } ?>>Ultimo Anno</option>
</select> </select>
</td> </td>
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td> <td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
<td class="spazioh"> <td class="spazioh">
<select name="idutente" onchange="this.form.submit()"> <select name="idutente" onchange="this.form.submit()">
<option value=0 <?php if ($idutente == 0) {print "selected=\"selected\""; } ?>>----</option> <option class="testo" value=0 <?php if ($idutente == 0) {print "selected=\"selected\""; } ?>>----</option>
<?php while ($dato = mysql_fetch_array ( $res_user )) { ?> <?php while ($dato = mysql_fetch_array ( $res_user )) { ?>
<option value="<?php print $dato['id'] ?>" <?php if ($idutente == $dato['id']) {print "selected=\"selected\""; } ?>><?php print $dato['utente'] ?></option> <option class="testo" value="<?php print $dato['id'] ?>" <?php if ($idutente == $dato['id']) {print "selected=\"selected\""; } ?>><?php print $dato['utente'] ?></option>
<?php } ?> <?php } ?>
</select> </select>
</td> </td>
<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td> <td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
<td class="spazioh"> <td class="spazioh">
<select name="nome" onchange="this.form.submit()"> <select name="nome" onchange="this.form.submit()">
<option value=0 <?php if ($idip == 0) {print "selected=\"selected\""; } ?>>----</option> <option class="testo" value=0 <?php if ($idip == 0) {print "selected=\"selected\""; } ?>>----</option>
<?php while ($dato = mysql_fetch_array ( $res_nome )) { ?> <?php while ($dato = mysql_fetch_array ( $res_nome )) { ?>
<option value="<?php print $dato['nome'] ?>" <?php if ($nome == $dato['nome']) {print "selected=\"selected\""; } ?>><?php print $dato['nome'] ?></option> <option class="testo" value="<?php print $dato['nome'] ?>" <?php if ($nome == $dato['nome']) {print "selected=\"selected\""; } ?>><?php print $dato['nome'] ?></option>
<?php } ?> <?php } ?>
</select> </select>
</td> </td>
@@ -135,9 +135,9 @@ $tabella->intestazione (array("", "Data", "", "Utente", "", "Nome Regola", "", "
<td class="spazioh"></td> <td class="spazioh"></td>
<td class="spazioh"> <td class="spazioh">
<select name="tipo" onchange="this.form.submit()"> <select name="tipo" onchange="this.form.submit()">
<option value=0 <?php if ($idip == 0) {print "selected=\"selected\""; } ?>>----</option> <option class="testo" value=0 <?php if ($idip == 0) {print "selected=\"selected\""; } ?>>----</option>
<?php while ($dato = mysql_fetch_array ( $res_tipo )) { ?> <?php while ($dato = mysql_fetch_array ( $res_tipo )) { ?>
<option value="<?php print $dato['tipo'] ?>" <?php if ($tipo == $dato['tipo']) {print "selected=\"selected\""; } ?>><?php print $dato['tipo']; ?></option> <option class="testo" value="<?php print $dato['tipo'] ?>" <?php if ($tipo == $dato['tipo']) {print "selected=\"selected\""; } ?>><?php print $dato['tipo']; ?></option>
<?php } ?> <?php } ?>
</select> </select>
</td> </td>

View File

@@ -40,6 +40,7 @@ td.sep { font-family: verdana; font-size: 1px; text-align: left; height:1px;
td.valoretxt { font-family: verdana; font-size: 14px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; background-color: #f3f3f3;} td.valoretxt { font-family: verdana; font-size: 14px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; background-color: #f3f3f3;}
td.col0 { font-family: verdana; font-size: 14px; text-align: left; width:20px; vertical-align:text-top; text-decoration: none; color: #000000; background-color: #dcd2d2; white-space: nowrap} td.col0 { font-family: verdana; font-size: 14px; text-align: left; width:20px; vertical-align:text-top; text-decoration: none; color: #000000; background-color: #dcd2d2; white-space: nowrap}
option.testo { font-family: verdana; font-size: 11px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; }
td.ltop { font-family: verdana; font-size: 14px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; } td.ltop { font-family: verdana; font-size: 14px; text-align: left; vertical-align:text-top; text-decoration: none; color: #000000; }
td.ctop { font-family: verdana; font-size: 14px; text-align: center; vertical-align:text-top; text-decoration: none; color: #000000; } td.ctop { font-family: verdana; font-size: 14px; text-align: center; vertical-align:text-top; text-decoration: none; color: #000000; }
td.rtop { font-family: verdana; font-size: 14px; text-align: right; vertical-align:text-top; text-decoration: none; color: #000000; } td.rtop { font-family: verdana; font-size: 14px; text-align: right; vertical-align:text-top; text-decoration: none; color: #000000; }