Pulizie
This commit is contained in:
@@ -1,76 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: tahoma;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input, select, textarea {
|
|
||||||
font-family: tahoma;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a, a:hover, a:active, a:visited {
|
|
||||||
text-decoration: none;
|
|
||||||
font-family: tahoma;
|
|
||||||
cursor:pointer;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#calendar-page { float: left; background-color: #6699CC; font-family: tahoma; font-size: 11px; min-width: 150px; }
|
|
||||||
#calendar-page select { font-family: tahoma; font-size: 11px; }
|
|
||||||
|
|
||||||
#calendar-header { padding-top: 2px; }
|
|
||||||
#calendar-header .closeme { padding: 0px 3px 2px 0px; }
|
|
||||||
|
|
||||||
#calendar-body { padding: 2px 3px 3px 3px; }
|
|
||||||
#calendar-body .general { background-color: #FFFFFF; }
|
|
||||||
#calendar-body .header { background-color: #6699CC; color: #FFFFFF; }
|
|
||||||
#calendar-body .othermonth { background-color: #EEEEEE; color: #AAAAAA; }
|
|
||||||
#calendar-body .othermonth a:link { text-decoration : none; color: #CCFFCC; }
|
|
||||||
#calendar-body .othermonth a:visited { text-decoration : none; color: #CCFFCC; }
|
|
||||||
#calendar-body .othermonth a:hover { text-decoration : none; color: #FFFFFF; }
|
|
||||||
#calendar-body table { font-family: tahoma; font-size: 11px; }
|
|
||||||
#calendar-body td div { padding: 3px; width: 15px; }
|
|
||||||
#calendar-body a { display: block; }
|
|
||||||
#calendar-body a:link { text-decoration : none; color: #000000; }
|
|
||||||
#calendar-body a:visited { text-decoration : none; color: #000000; }
|
|
||||||
#calendar-body a:hover { text-decoration : none; color: #FF0000; background-color: #FFFFCC; }
|
|
||||||
#calendar-body .disabledate { color: #AAAAAA; background: url(images/disable_date_bg.png) no-repeat center center #EEEEEE; }
|
|
||||||
#calendar-body .today { background-color: #CCFFCC; }
|
|
||||||
#calendar-body .select { background-color: #FFCC99; border: 1px solid #006600; }
|
|
||||||
#calendar-body .wk-hdr { font-size: 9px; }
|
|
||||||
#calendar-body .wk { background-color: #CCCCFF; font-size: 9px; color: #003399; }
|
|
||||||
|
|
||||||
#calendar-body .refresh { color: #FFFFFF; padding: 10px 3px 3px; }
|
|
||||||
#calendar-body .refresh .txt-container { padding: 25px 10px 10px; height: 50px; }
|
|
||||||
|
|
||||||
#calendar-body .mon {}
|
|
||||||
#calendar-body .tue {}
|
|
||||||
#calendar-body .wed {}
|
|
||||||
#calendar-body .thu {}
|
|
||||||
#calendar-body .fri {}
|
|
||||||
#calendar-body .sat { color: #6666CC; }
|
|
||||||
#calendar-body .sat a:link { color: #6666CC; }
|
|
||||||
#calendar-body .sun { color: #993300; }
|
|
||||||
#calendar-body .sun a:link { color: #993300; }
|
|
||||||
|
|
||||||
#calendar-footer { background-color: #CCCCCC; height: 21px; font-size: 9px; }
|
|
||||||
#calendar-footer .btn a.txt { line-height: 19px; }
|
|
||||||
#calendar-footer .btn a.txt:link { text-decoration : none; color: #000000; padding: 5px 2px; }
|
|
||||||
#calendar-footer .btn a.txt:visited { text-decoration : none; color: #000000; }
|
|
||||||
#calendar-footer .btn a.txt:hover { text-decoration : none; color: #FF0000; }
|
|
||||||
#calendar-footer .btn>div { padding: 0px 1px; }
|
|
||||||
#calendar-footer .btn a>img { margin-top: 1px; }
|
|
||||||
|
|
||||||
#calendar-header, #calendar-body, #calendar-footer { padding-left: 1px; padding-right: 1px; }
|
|
||||||
#calendar-container { }
|
|
||||||
|
|
||||||
.tcday, .tcmonth, .tcyear { font-size: 11px; z-index: 10; }
|
|
||||||
|
|
||||||
.date-tccontainer { border: 1px solid #CCCCCC; background-color: #EFEFEF; padding: 2px; float: left; margin-right: 2px; text-align: center; text-decoration: none; }
|
|
||||||
|
|
||||||
#calendarform { margin: 0px; padding: 0px; }
|
|
||||||
#calendarform ul { margin: 0px; padding: 0px; list-style: none; }
|
|
||||||
#calendarform ul li { display: inline; }
|
|
||||||
|
|
||||||
.calendar-border { border: 1px solid #000000; }
|
|
||||||
.div_calendar { width: 10px; height: 10px; }
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<?php phpinfo () ?>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
</td></tr>
|
|
||||||
<tr><td>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
||||||
<tr bgcolor="#FFC350">
|
|
||||||
<td nowrap class="lbottom"> <?php print $CONF['Versione'] ?></td>
|
|
||||||
<td width="500"> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
include_once ("core/config.php");
|
|
||||||
$UTENTE = login();
|
|
||||||
isadmin();
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script type="text/javascript">
|
|
||||||
<!--
|
|
||||||
function confirmation(testo) {
|
|
||||||
alert(testo)
|
|
||||||
document.location.href='main.php'
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (isset($_GET['id'])) {
|
|
||||||
$id = $_GET['id'];
|
|
||||||
if (isset($_GET['azione'])) {
|
|
||||||
$azione = $_GET['azione'];
|
|
||||||
switch ($azione) {
|
|
||||||
case "attiva":
|
|
||||||
// attiva server
|
|
||||||
$query = "UPDATE firewall SET attivo = 1 WHERE id = $id";
|
|
||||||
mysql_query( $query, $DB_ID );
|
|
||||||
$testo = "Server attivato";
|
|
||||||
break;
|
|
||||||
case "disattiva":
|
|
||||||
// disattiva server
|
|
||||||
$query = "UPDATE firewall SET attivo = 0 WHERE id = $id";
|
|
||||||
mysql_query( $query, $DB_ID );
|
|
||||||
$testo = "Server disattivate";
|
|
||||||
break;
|
|
||||||
case "creadir":
|
|
||||||
$query_azioni = "INSERT INTO azioni SET fw=$id, tabella='CREADIR', idtabella=0, stato=5, datains=NOW()";
|
|
||||||
$query_fw = "UPDATE firewall SET aggiornamenti = 1 WHERE id = $id";
|
|
||||||
mysql_query( $query_azioni, $DB_ID );
|
|
||||||
mysql_query( $query_fw, $DB_ID );
|
|
||||||
$testo = "Richiesta creazione PATH configurazioni";
|
|
||||||
break;
|
|
||||||
case "applica":
|
|
||||||
$query_azioni = "INSERT INTO azioni SET fw=$id, tabella='FINE APPLICA', idtabella=0, stato=4, datains=NOW()";
|
|
||||||
$query_fw = "UPDATE firewall SET aggiornamenti = 1 WHERE id = $id";
|
|
||||||
mysql_query( $query_azioni, $DB_ID );
|
|
||||||
mysql_query( $query_fw, $DB_ID );
|
|
||||||
$testo = "Regole applicate, in attesa di sincronizzazione";
|
|
||||||
break;
|
|
||||||
case "rigenera":
|
|
||||||
$query_azioni = "UPDATE azioni SET ignora = 1 WHERE fw = $id AND ignora = 0 AND dataexec IS NULL";
|
|
||||||
mysql_query( $query_azioni, $DB_ID );
|
|
||||||
$query_azioni = "INSERT INTO azioni SET fw=$id, tabella='RESET', idtabella=0, stato=4, datains=NOW()";
|
|
||||||
mysql_query( $query_azioni, $DB_ID );
|
|
||||||
|
|
||||||
$query_device = "SELECT id FROM interfacce WHERE attivo = 1 AND stato != 3";
|
|
||||||
$res_device = mysql_query( $query_device, $DB_ID );
|
|
||||||
while ($dato_device = mysql_fetch_array ( $res_device )) {
|
|
||||||
$device_id = $dato_device['id'];
|
|
||||||
$query_azioni = "INSERT INTO azioni SET fw=$id, tabella='interfacce', idtabella=$device_id, stato=1, datains=NOW()";
|
|
||||||
mysql_query( $query_azioni, $DB_ID );
|
|
||||||
defrule_reset ($device_id, 0, $id);
|
|
||||||
}
|
|
||||||
$query_azioni = "INSERT INTO azioni SET fw=$id, tabella='FINE APPLICA', idtabella=0, stato=4, datains=NOW()";
|
|
||||||
$query_fw = "UPDATE firewall SET aggiornamenti = 1 WHERE id = $id";
|
|
||||||
mysql_query( $query_azioni, $DB_ID );
|
|
||||||
mysql_query( $query_fw, $DB_ID );
|
|
||||||
$testo = "Richiesto reset delle regole";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$testo = "Regola non implementata";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
confirmation ('<?php print $testo ?>');
|
|
||||||
</script>
|
|
||||||
<?php }
|
|
||||||
} ?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
document.location.href='main.php'
|
|
||||||
</script>
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
<?php
|
|
||||||
include_once ("core/config.php");
|
|
||||||
$UTENTE = login();
|
|
||||||
//isadmin();
|
|
||||||
|
|
||||||
include_once ("top_mini.php");
|
|
||||||
|
|
||||||
$id = $_POST['iddefrule'];
|
|
||||||
$quanti = $_POST['quanti'];
|
|
||||||
|
|
||||||
//print_r ($_POST);
|
|
||||||
|
|
||||||
for ($i=0,$errori=0,$insert=0,$update=0,$delete=0,$regole=0;$i<$quanti;$i++) {
|
|
||||||
$idrule = "idrule$i";
|
|
||||||
$fromip = "fromip$i";
|
|
||||||
$fromport = "fromport$i";
|
|
||||||
$toip = "toip$i";
|
|
||||||
$toport = "toport$i";
|
|
||||||
$check = "check$i";
|
|
||||||
|
|
||||||
if (isset ($_POST[$check]) && ($_POST[$fromip] == '') && ($_POST[$fromport] == 0) && ($_POST[$toip] == '') && ($_POST[$toport] == 0) ) {
|
|
||||||
// print "--- $i - ".$_POST[$check]." - ".$_POST[$fromip]." - ".$_POST[$fromport]." - ".$_POST[$toip]." - ".$_POST[$toport]. " ---<br>";
|
|
||||||
$errore = 1;
|
|
||||||
$i = $quanti;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset ($_POST[$idrule])) {
|
|
||||||
if (isset ($_POST[$check])) {
|
|
||||||
$query[$regole++] = "UPDATE rule SET ipin='".$_POST[$fromip]."', portin=".$_POST[$fromport].", ipout='".$_POST[$toip]."', portout=".$_POST[$toport]." WHERE id =".$_POST[$idrule];
|
|
||||||
$update++;
|
|
||||||
} else {
|
|
||||||
$query[$regole++] = "DELETE FROM rule WHERE id = ".$_POST[$idrule];
|
|
||||||
$delete++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (isset ($_POST[$check])) {
|
|
||||||
$query[$regole++] = "INSERT INTO rule SET iddefrule=$id, ipin='".$_POST[$fromip]."', portin=".$_POST[$fromport].", ipout='".$_POST[$toip]."', portout=".$_POST[$toport];
|
|
||||||
$insert++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" id="pulsanti">
|
|
||||||
<tbody>
|
|
||||||
<tr><td colspan="2"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
<?php if (!$errore) {
|
|
||||||
for ($i=0;$i<$regole;$i++) {
|
|
||||||
mysql_query( $query[$i], $DB_ID );
|
|
||||||
}
|
|
||||||
if ($regole > 0) {
|
|
||||||
$querydefrule = "SELECT attivo FROM defrule WHERE id = $id";
|
|
||||||
$res_defrule = mysql_query( $querydefrule, $DB_ID );
|
|
||||||
$dato_defrule = mysql_fetch_array ( $res_defrule );
|
|
||||||
if ($dato_defrule['attivo']) {
|
|
||||||
azioni ("defrule", $id, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<tr><td colspan="2" align="center">Effettuati <?php print $insert ?> inserimenti</td></tr>
|
|
||||||
<tr><td colspan="2" align="center">Effettuate <?php print $delete ?> cancellazioni</td></tr>
|
|
||||||
<tr><td colspan="2" align="center">Effettuati <?php print $update ?> aggiornamenti</td></tr>
|
|
||||||
<tr><td colspan="2"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" align="center"><input type="button" value="Ok" onclick="window.opener.location.reload(); window.close(); return false;""></button></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php } else {
|
|
||||||
?>
|
|
||||||
<tr><td colspan="2" align="center">L'operazione non puo' essere portatata a termine</td></tr>
|
|
||||||
<tr><td colspan="2" align="center">Alcune regole non sono valide</td></tr>
|
|
||||||
<tr><td colspan="2"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td width="50%" align="center"><input type="button" value="Ripeti" onclick="location.href = 'rule.php?id=<?php print $id ?>';"></button></td>
|
|
||||||
<td width="50%" align="center"><input type="button" value="Annulla" onclick="window.opener.location.reload(); window.close(); return false;""></button></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
<tr><td colspan="2"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<?php include_once ("footer_mini.php"); ?>
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
<?php
|
|
||||||
include_once ("core/config.php");
|
|
||||||
$UTENTE = login();
|
|
||||||
//isadmin();
|
|
||||||
|
|
||||||
$id = $_GET['id'];
|
|
||||||
$nome = creanome ($id);
|
|
||||||
|
|
||||||
$query = "SELECT * FROM rule WHERE iddefrule = $id ORDER BY ipin";
|
|
||||||
$res = mysql_query( $query, $DB_ID );
|
|
||||||
$quanti = mysql_num_rows ($res);
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php include_once ("top_mini.php"); ?>
|
|
||||||
|
|
||||||
<script language="JavaScript" type="text/javascript">
|
|
||||||
<!--
|
|
||||||
var num=<?php print $quanti ?>;
|
|
||||||
function accoda(){
|
|
||||||
if(document.createElement && document.getElementById && document.getElementsByTagName) {
|
|
||||||
// crea elementi
|
|
||||||
var oTr=document.createElement("TR");
|
|
||||||
var oTd1=document.createElement("TD");
|
|
||||||
var oTd2=document.createElement("TD");
|
|
||||||
var oTd3=document.createElement("TD");
|
|
||||||
var oTd4=document.createElement("TD");
|
|
||||||
var oTd5=document.createElement("TD");
|
|
||||||
var oField1=document.createElement("INPUT");
|
|
||||||
var oField2=document.createElement("INPUT");
|
|
||||||
var oField3=document.createElement("INPUT");
|
|
||||||
var oField4=document.createElement("INPUT");
|
|
||||||
var oButt=document.createElement("INPUT");
|
|
||||||
|
|
||||||
// setta attributi
|
|
||||||
oField1.setAttribute("type","text");
|
|
||||||
oField1.setAttribute("name","fromip"+num);
|
|
||||||
oField1.setAttribute("size",15);
|
|
||||||
oField2.setAttribute("type","text");
|
|
||||||
oField2.setAttribute("name","fromport"+num);
|
|
||||||
oField2.setAttribute("size",5);
|
|
||||||
oField2.setAttribute("value",0);
|
|
||||||
oField3.setAttribute("type","text");
|
|
||||||
oField3.setAttribute("name","toip"+num);
|
|
||||||
oField3.setAttribute("size",15);
|
|
||||||
oField4.setAttribute("type","text");
|
|
||||||
oField4.setAttribute("name","toport"+num);
|
|
||||||
oField4.setAttribute("size",5);
|
|
||||||
oField4.setAttribute("value",0);
|
|
||||||
oTd5.setAttribute("align","center");
|
|
||||||
oButt.setAttribute("type","checkbox");
|
|
||||||
oButt.setAttribute("name","check"+num);
|
|
||||||
|
|
||||||
// appendi al relativo padre
|
|
||||||
oTd1.appendChild(oField1);
|
|
||||||
oTd2.appendChild(oField2);
|
|
||||||
oTd3.appendChild(oField3);
|
|
||||||
oTd4.appendChild(oField4);
|
|
||||||
oTd5.appendChild(oButt);
|
|
||||||
oTr.appendChild(oTd1);
|
|
||||||
oTr.appendChild(oTd2);
|
|
||||||
oTr.appendChild(oTd3);
|
|
||||||
oTr.appendChild(oTd4);
|
|
||||||
oTr.appendChild(oTd5);
|
|
||||||
document.getElementById('tabella').getElementsByTagName('TBODY')[0].appendChild(oTr);
|
|
||||||
|
|
||||||
// incrementa variabile globale
|
|
||||||
num++;
|
|
||||||
document.forms.modulo.quanti.value=num;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//-->
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form name="modulo" id="modulo" action="modrule.php" method="post">
|
|
||||||
<input type="hidden" name="iddefrule" value="<?php print $id ?>">
|
|
||||||
<input type="hidden" name="quanti" value="<?php print $quanti ?>">
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" width="90%" id="tabella">
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr><td colspan="5" align="left"><?php print "Regole per $nome <br>"?></td></tr>
|
|
||||||
<tr><td colspan="5"><img src="img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Dall'IP</td>
|
|
||||||
<td>Dalla porta</td>
|
|
||||||
<td>All'IP</td>
|
|
||||||
<td>Alla porta</td>
|
|
||||||
<td>Attiva</td>
|
|
||||||
</tr>
|
|
||||||
<?php for ($conta = 0; $conta < $quanti; $conta++) {
|
|
||||||
$dato = mysql_fetch_array ( $res );
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<input type="hidden" name="idrule<?php print $conta?>" value="<?php print $dato['id'] ?>">
|
|
||||||
<td class="campo"><input type="text" size="15" name="fromip<?php print $conta?>" value="<?php print $dato['ipin'] ?>"/></td>
|
|
||||||
<td><input type="text" size="5" name="fromport<?php print $conta?>" value="<?php print $dato['portin'] ?>"/></td>
|
|
||||||
<td><input type="text" size="15" name="toip<?php print $conta?>" value="<?php print $dato['ipout'] ?>"/></td>
|
|
||||||
<td><input type="text" size="5" name="toport<?php print $conta?>" value="<?php print $dato['portout'] ?>"/></td>
|
|
||||||
<td align="center"><input type="checkbox" name="check<?php print $conta?>" checked /></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" width="90%" id="pulsanti">
|
|
||||||
<tbody>
|
|
||||||
<tr><td colspan="3"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
<tr><td colspan="3" align="center"><input type="button" value="accoda" onclick="accoda()" /></td></tr>
|
|
||||||
<tr><td colspan="3"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
<tr>
|
|
||||||
<td width="33%" align="center"><input type="submit" value="Inserisci" onclick="accoda()" /></td>
|
|
||||||
<td width="33%" align="center"><img src="img/spazio.gif" width="1" height="1" alt=""></td>
|
|
||||||
<td width="33%" align="center"><input type="button" value="Annulla" onclick="window.opener.location.reload(); window.close(); return false;""></button></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td colspan="3"><img src="img/spazio.gif" width="1" height="7" alt=""></td></tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<?php include_once ("footer_mini.php"); ?>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>SpazioFirewall</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<link rel="stylesheet" type="text/css" href="stile.css" />
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" align="center" width="500">
|
|
||||||
<tr bgcolor="#FFC350"><td> </td></tr>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td class="spaziov" colspan=2><img src="img/spazio.gif"></td></tr>
|
|
||||||
<tr><td align="center">
|
|
||||||
Reference in New Issue
Block a user