Fix path
This commit is contained in:
115
remove/cluster.php
Executable file
115
remove/cluster.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
isadmin();
|
||||
?>
|
||||
|
||||
<?php include_once ("top.php");?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var stile = "top=30, left=30, width=1000, height=500, status=no, menubar=no, toolbar=no ";
|
||||
|
||||
function PopupG(apri)
|
||||
{
|
||||
window.open(apri, "", stile);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td class="spaziov" colspan=3><img src="img/spazio.gif"></td>
|
||||
<td><a href="modcluster.php"><img src="img/ip.png" border="0" ALT="Aggiungi IP" TITLE="Aggiungi IP"></a></td>
|
||||
<td class="spaziov" colspan=9><img src="img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=14><img src="img/spazio.gif"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td class="spazioh" colspan=3><img src="img/spazio.gif"></td>
|
||||
<td class="col3campo2">IP</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="col3valore2">Posizione</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="col3valore2">Device</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="col3valore2">Stato</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="col3valore2">Utilizzo</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$query = "
|
||||
SELECT indirizzi.id,
|
||||
indirizzi.ip,
|
||||
indirizzi.netmask,
|
||||
firewallA.nome AS home,
|
||||
firewallB.nome AS attuale,
|
||||
interfacce.device,
|
||||
indirizzi.attivo,
|
||||
indirizzi.errore,
|
||||
indirizzi.commento
|
||||
FROM indirizzi
|
||||
JOIN firewall AS firewallA
|
||||
ON firewallA.id = indirizzi.idfirewall
|
||||
JOIN firewall AS firewallB
|
||||
ON firewallB.id = indirizzi.attuale
|
||||
JOIN interfacce
|
||||
ON interfacce.id = indirizzi.idinterfaccia
|
||||
WHERE
|
||||
indirizzi.vf = 0
|
||||
ORDER BY
|
||||
indirizzi.attivo desc,
|
||||
indirizzi.errore desc,
|
||||
interfacce.device,
|
||||
indirizzi.id
|
||||
";
|
||||
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
|
||||
if ($dato['attivo']) {
|
||||
if ($dato['home'] == $dato['attuale']) {
|
||||
$posizione = $dato['home'];
|
||||
} else {
|
||||
$posizione = $dato['attuale']." (".$dato['home'].")";
|
||||
}
|
||||
$device = $dato['device'];
|
||||
$icona = $icone[$dato['errore']];
|
||||
$commento = $dato['commento'];
|
||||
} else {
|
||||
$posizione = "---";
|
||||
$device = "---";
|
||||
$icona = "img/spazio.gif";
|
||||
$commento = "---";
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="col3btn">
|
||||
<?php if ($dato['attivo']) { ?>
|
||||
<img border=0 src="img/attivo.gif" ALT="Utente attivo" TITLE="Indirizzo attivo">
|
||||
<?php } else { ?>
|
||||
<img border=0 src="img/non_attivo.gif" ALT="Utente non attivo" TITLE="Indirizzo non attivo">
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="col3btn"><a href="modcluster.php?id=<?php print $dato['id']?>"><img src="img/modify.gif" width="20" height="20" border="0" ALT="Proprieta'" TITLE="Proprieta'"></a></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $dato['ip']."/".$dato['netmask'] ?></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $posizione ?></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $device ?></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="descrizione"><img src="<?php print $icona ?>"></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="descrizione"><?php print $commento ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
<img src="img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php include_once ("footer.php"); ?>
|
||||
119
remove/defrule.php
Executable file
119
remove/defrule.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
//isadmin();
|
||||
?>
|
||||
|
||||
<?php include_once ("top.php");?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var stile1 = "top=30, left=30, width=600, height=400, status=no, menubar=no, toolbar=no ";
|
||||
var stile2 = "top=30, left=30, width=920, height=500, status=no, menubar=no, toolbar=no ";
|
||||
|
||||
function Popup(apri)
|
||||
{
|
||||
window.open(apri, "", stile1);
|
||||
}
|
||||
|
||||
function PopupG(apri)
|
||||
{
|
||||
window.open(apri, "", stile2);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td width="5%"><img src="img/spazio.gif"></td>
|
||||
<td width="5%"><input type="button" value="Inserisci" onclick="location.href = 'moddefrule.php?idparent=0&device=<?php print $_GET['id'] ?>';"></button></td>
|
||||
<td width="5%"><img src="img/spazio.gif"></td>
|
||||
<td><img src="img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=5><img src="img/spazio.gif"></td></tr>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php
|
||||
livelli ($_GET['id'], 0, 0, 10);
|
||||
?>
|
||||
|
||||
</table>
|
||||
<img src="img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php include_once ("footer.php"); ?>
|
||||
|
||||
<?php
|
||||
function livelli ($device, $parent, $livello, $maxliv) {
|
||||
global $DB_ID;
|
||||
$query = "SELECT * FROM defrule WHERE stato <> 3 AND idparent = '$parent' AND idinterfacce = $device ORDER BY priorita";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
$queryint = "SELECT count(id) AS figli FROM defrule WHERE stato<>3 AND idparent = ".$dato['id'];
|
||||
$queryrule = "SELECT COUNT(id) AS numrule FROM rule WHERE iddefrule = ".$dato['id'];
|
||||
$resint = mysql_query( $queryint, $DB_ID );
|
||||
$resrule = mysql_query( $queryrule, $DB_ID );
|
||||
$datofigli = mysql_fetch_array ( $resint );
|
||||
$datorule = mysql_fetch_array ( $resrule );
|
||||
$numfigli = $datofigli['figli'];
|
||||
$numrule = $datorule['numrule'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="spazioh" nowrap>
|
||||
<?php if ($dato['attivo']) {
|
||||
if ($dato['priorita'] < 1000) { ?>
|
||||
<a href="moddefrule.php?id=<?php print $dato['id']?>&device=<?php print $dato['idinterfacce'] ?>&azione=disattiva">
|
||||
<?php } ?>
|
||||
<img border=0 src="img/attivo.gif" ALT="Disattiva regola" TITLE="Disattiva regola"></a>
|
||||
<?php } else {
|
||||
if ($dato['priorita'] < 1000) { ?>
|
||||
<a href="moddefrule.php?id=<?php print $dato['id']?>&device=<?php print $dato['idinterfacce'] ?>&azione=attiva">
|
||||
<?php } ?>
|
||||
<img border=0 src="img/non_attivo.gif" ALT="Attiva regola" TITLE="Attiva regola"></a>
|
||||
<?php } ?>
|
||||
<?php if ($dato['priorita'] < 1000) { ?>
|
||||
<a href="moddefrule.php?idparent=<?php print $dato['id']?>&device=<?php print $dato['idinterfacce'] ?>"><img border=0 src="img/piu.png" ALT="Crea nuova sotto regola" TITLE="Crea nuova sotto regola"></a>
|
||||
<?php } else { ?>
|
||||
<img border="0" src="img/niente.png">
|
||||
<?php } ?>
|
||||
<?php if ($numfigli == 0 && $dato['priorita'] < 1000) { ?>
|
||||
<a href="moddefrule.php?id=<?php print $dato['id']?>&device=<?php print $dato['idinterfacce'] ?>&azione=rm" onClick="return confirm('Sei sicuro di voler eliminare questa regola?');"><img border=0 src="img/meno.png" ALT="Elimina regola" TITLE="Elimina regola"></a>
|
||||
<?php } else { ?>
|
||||
<img border=0 src="img/niente.png">
|
||||
<?php } ?>
|
||||
<a href="moddefrule.php?id=<?php print $dato['id']?>"><img border=0 src="img/modify.gif" ALT="Proprieta'" TITLE="Proprieta'"></a>
|
||||
</td>
|
||||
<td class="defrulenome" nowrap>
|
||||
<?php for ($i=0; $i<$livello; $i++) { ?>
|
||||
<img border=0 src="img/spaziocol.gif">
|
||||
|
||||
<?php } ?>
|
||||
<?php printf ("%s",creanome($dato['id'])) ?>
|
||||
</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="defruletxt" nowrap><?php print $dato['descrizione'] ?></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="defruletxt" nowrap><?php printf ("priorita': %d",$dato['priorita']) ?></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="defruletxt" nowrap><?php printf ("rate: %0.2f Mb/sec",$dato['rate']) ?></td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="defruletxt" nowrap><?php printf ("Ceil: %0.2f Mb/sec",$dato['ceil']) ?></td>
|
||||
<?php if ($dato['priorita'] < 1000) { ?>
|
||||
<td class="spazioh"><a href="javascript:Popup('rule.php?id=<?php print $dato['id'] ?>')"><img border="0" src="img/edit-regole.gif" ALT="Gestioni regole di filtraggio" TITLE="Gestione regole di filtraggio"></a></td>
|
||||
<td class="defruletxt" nowrap><?php print $numrule ?></td>
|
||||
<?php } else { ?>
|
||||
<td class="spazioh"><img border="0" src="img/niente.png"></td>
|
||||
<td class="defruletxt" nowrap> </td>
|
||||
<?php } ?>
|
||||
<td class="spazioh"><img border="0" src="img/user.png" ALT="Gestione assegnazione utenze" TITLE="Gestione assegnazione utenze"></td>
|
||||
<?php if ($dato['stato'] != 4) { ?>
|
||||
<td class="spazioh"><a href="javascript:PopupG('grafico.php?device=<?php print $dato['idinterfacce'] ?>&rif=<?php print $dato['id'] ?>')"><img border="0" src="img/grafico.gif" ALT="Grafico Utilizzo" TITLE="Grafico Utilizzo"></a></td>
|
||||
<?php } else { ?>
|
||||
<td class="spazioh"><img border="0" src="img/errore.png" ALT="Regola non conforme" TITLE="Regola non conforme"></td>
|
||||
<?php } ?>
|
||||
|
||||
</tr>
|
||||
<?php livelli ($device, $dato['id'], $livello+1, 10);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
72
remove/device.php
Executable file
72
remove/device.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
isadmin();
|
||||
?>
|
||||
|
||||
<?php include_once ("top.php");?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var stile = "top=30, left=30, width=920, height=500, status=no, menubar=no, toolbar=no ";
|
||||
|
||||
function PopupG(apri)
|
||||
{
|
||||
window.open(apri, "", stile);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td class="spaziov" colspan=3><img src="img/spazio.gif"></td>
|
||||
<td><input type="button" value="Inserisci" onclick="location.href = 'moddevice.php';"></button></td>
|
||||
<td class="spaziov" colspan=6><img src="img/spazio.gif"></td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=10><img src="img/spazio.gif"></td></tr>
|
||||
<?php
|
||||
$query = "SELECT * FROM interfacce WHERE stato <> 3 ORDER BY device";
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res )) {
|
||||
$query_defrule = "SELECT COUNT(id) AS conta FROM defrule WHERE idinterfacce = ".$dato['id']." AND stato <> 3 AND priorita < 1000";
|
||||
$res_defrule = mysql_query( $query_defrule, $DB_ID );
|
||||
$dato_defrule = mysql_fetch_array ( $res_defrule );
|
||||
$quanti_defrule = $dato_defrule['conta'];
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td rowspan=2 class="col3btn">
|
||||
<?php if ($dato['attivo']) { ?>
|
||||
<a href="gestdevice.php?id=<?php print $dato['id'] ?>&azione=disattiva"><img border=0 src="img/attivo.gif" ALT="Disattiva device" TITLE="Disattiva device"></a>
|
||||
<?php } else { ?>
|
||||
<a href="gestdevice.php?id=<?php print $dato['id'] ?>&azione=attiva"><img border=0 src="img/non_attivo.gif" ALT="Attiva device" TITLE="Attiva device"></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td rowspan=2 class="col3btn"><a href="moddevice.php?id=<?php print $dato['id']?>"><img src="img/modify.gif" width="20" height="20" border="0" ALT="Proprieta'" TITLE="Proprieta'"></td>
|
||||
<td rowspan=2 class="col3btn"><a href="gestdevice.php?id=<?php print $dato['id'] ?>&azione=rm" onClick="return confirm('Ci sono <?php print $quanti_defrule ?> regole impostate\nSei sicuro di voler eliminare questa regola?');"><img border=0 src="img/meno.png" ALT="Elimina device" TITLE="Elimina device"></a></td>
|
||||
<td class="col0">Device</td>
|
||||
<td class="col0"><?php print $dato['device'] ?></td>
|
||||
<td class="spazioh" colspan="3"><img src="img/spazio.gif"></td>
|
||||
<td class="col3valore2">Rete: <?php print ($dato['inout']) ?></td>
|
||||
<td rowspan=2 class="col3btn">
|
||||
<a href="defrule.php?id=<?php print $dato['id']?>"><img src="img/dettagli.png" width="20" height="20" border="0" ALT="Gestione regole" TITLE="Gestione Regole"></a>
|
||||
<a href="javascript:PopupG('grafico.php?device=<?php print $dato['id']?>&rif=0')"><img border="0" src="img/grafico.gif" ALT="Grafico Utilizzo" TITLE="Grafico Utilizzo"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col3campo2">Rate: <?php print $dato['rate'] ?> Mb/sec</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="col3campo2">Ceil: <?php print $dato['ceil'] ?> Mb/sec</td>
|
||||
<td class="spazioh"><img src="img/spazio.gif"></td>
|
||||
<td class="col3campo2">Descrizione:<br><?php print $dato['descrizione']?></td>
|
||||
<td class="col3campo2">Regole attive </td>
|
||||
</tr>
|
||||
<tr><td class="spaziov" colspan=10><img src="img/spazio.gif"></td></tr>
|
||||
|
||||
<?php
|
||||
} ?>
|
||||
</table>
|
||||
<img src="img/spazio.gif" width="1" height="20" alt="">
|
||||
<?php include_once ("footer.php"); ?>
|
||||
74
remove/gestdevice.php
Normal file
74
remove/gestdevice.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
isadmin();
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function confirmation(testo) {
|
||||
alert(testo)
|
||||
document.location.href='device.php'
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
if (isset($_GET['azione'])) {
|
||||
$azione = $_GET['azione'];
|
||||
switch ($azione) {
|
||||
case "attiva":
|
||||
// attiva device
|
||||
$query = "UPDATE interfacce SET attivo = 1 WHERE id = $id";
|
||||
mysql_query( $query, $DB_ID );
|
||||
azioni ("interfacce", $id, 1);
|
||||
$query_figli = "SELECT id FROM defrule WHERE idinterfacce = $id AND priorita = 1000 AND idparent = 0";
|
||||
$res_figli = mysql_query( $query_figli, $DB_ID );
|
||||
$dato = mysql_fetch_array ( $res_figli );
|
||||
$query_attiva = "UPDATE defrule SET attivo = 1 WHERE id = ".$dato['id'];
|
||||
mysql_query( $query_attiva, $DB_ID );
|
||||
azioni ("defrule", $dato['id'], 1);
|
||||
$testo = "Device attivato";
|
||||
break;
|
||||
case "disattiva":
|
||||
// disattiva device
|
||||
$query = "UPDATE interfacce SET attivo = 0 WHERE id = $id";
|
||||
mysql_query( $query, $DB_ID );
|
||||
azioni ("interfacce", $id, 3);
|
||||
// disattiva figli
|
||||
$query_figli = "SELECT id FROM defrule WHERE idinterfacce = $id AND attivo = 1 AND idparent = 0";
|
||||
$res_figli = mysql_query( $query_figli, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res_figli )) {
|
||||
$risultato = defrule_dis($dato['id']);
|
||||
}
|
||||
$testo = "Device e regole ad esso associate disattivate";
|
||||
break;
|
||||
case "rm":
|
||||
// elimina device
|
||||
$query = "UPDATE interfacce SET stato = 3 WHERE id = $id";
|
||||
mysql_query( $query, $DB_ID );
|
||||
azioni ("interfacce", $id, 3);
|
||||
// elimina figli
|
||||
$query_figli = "SELECT id FROM defrule WHERE idinterfacce = $id AND attivo = 1 AND idparent = 0";
|
||||
$res_figli = mysql_query( $query_figli, $DB_ID );
|
||||
while ($dato = mysql_fetch_array ( $res_figli )) {
|
||||
$risultato = defrule_dis($dato['id'], 3);
|
||||
}
|
||||
$testo = "Il device e tutte le regole ad esso associate sono state eliminati";
|
||||
break;
|
||||
default:
|
||||
$testo = "Regola non implementata";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
confirmation ('<?php print $testo ?>');
|
||||
</script>
|
||||
<?php }
|
||||
} ?>
|
||||
<script type="text/javascript">
|
||||
document.location.href='device.php'
|
||||
</script>
|
||||
183
remove/modcluster.php
Executable file
183
remove/modcluster.php
Executable file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
isadmin();
|
||||
?>
|
||||
<?php include_once ("top.php"); ?>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$bottone = "Modifica";
|
||||
$modifica = 1;
|
||||
$query = "SELECT * FROM indirizzi WHERE id =".$_GET['id'];
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
} else if (isset ($_POST['id'])) {
|
||||
$modifica = 2;
|
||||
$id = $_POST['id'];
|
||||
$ip = $_POST['ip'];
|
||||
$netmask = $_POST['netmask'];
|
||||
if (defined ($_POST['attivo'])) {
|
||||
$attivo = $_POST['attivo'];
|
||||
} else {
|
||||
$attivo = 0;
|
||||
}
|
||||
$idfirewall = $_POST['idfirewall'];
|
||||
$idinterfaccia = $_POST['idinterfaccia'];
|
||||
$vf = $_POST['vf'];
|
||||
$commento = $_POST['commento'];
|
||||
|
||||
if ($id > 0) {
|
||||
$testo = "L'indirizzo IP e' stato correttamente aggiornata";
|
||||
$query = "UPDATE indirizzi SET ip='$ip', netmask = $netmask, attivo = $attivo, idfirewall = $idfirewall, idinterfaccia = $idinterfaccia, commento = '$commento' WHERE `id`=$id";
|
||||
} else {
|
||||
$testo = "L'indirizzo IP e' stato correttamento inserito";
|
||||
$query = "INSERT INTO indirizzi SET ip='$ip', netmask = $netmask, attivo = $attivo, idfirewall = $idfirewall, idinterfaccia = $idinterfaccia, vf = 0, commento = '$commento'";
|
||||
}
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (mysql_query( $query, $DB_ID )) {
|
||||
print $testo."<br>";
|
||||
print $query."<br>";
|
||||
} else {
|
||||
print "Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: ".mysql_error()."<br>";
|
||||
print $query."<br>";
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="5" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" value="Ok" onclick="location.href = 'cluster.php';"></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
$bottone = "Aggiungi";
|
||||
$modifica = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (($modifica == 0 || $modifica == 1) && !isset($_GET['rm'])) { ?>
|
||||
|
||||
|
||||
<script type="text/javascript" src="jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="jquery/jquery.validate.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#modulo").validate( {
|
||||
rules: {
|
||||
descrizione: "required",
|
||||
device: "required",
|
||||
rate: {
|
||||
required: true,
|
||||
min: <?php print $min_rate ?>,
|
||||
},
|
||||
ceil: {
|
||||
required: true,
|
||||
min: <?php print $min_ceil ?>,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
descrizione: "<br>Inserisci la descrizione!",
|
||||
device: "<br>Immettereil nome del device",
|
||||
rate: "<br>Immettere un valore non minore di <?php print $min_rate ?>",
|
||||
ceil: "<br>Immettere un valore non minore di <?php print $min_ceil ?>",
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<form action="modcluster.php" method="post" id="modulo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php if ($modifica == 1) { ?>
|
||||
<input type="hidden" name="id" value="<?php print $dato['id'] ?>">
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id" value="-1">
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td width="20"><img src="img/spazio.gif" width="20" height="1" alt=""></td>
|
||||
<td class="campo" width="20">IP</td>
|
||||
<td class="valore" width="100"><input type="text" id="ip" name="ip" size="15" maxlength="15" value="<?php print $dato['ip']?>"></td>
|
||||
<td width="30"><img src="img/spazio.gif" width="30" height="1" alt=""></td>
|
||||
<td class="campo" width="80">Netmask</td>
|
||||
<td class="valore" width="100"><input type="text" id="netmask" name="netmask" size="2" maxlength="2" value="<?php print $dato['netmask']?>"></td>
|
||||
<td width="300"><img src="img/spazio.gif" width="30" height="1" alt=""></td>
|
||||
<td>Attivo<input name="attivo" type="checkbox" value=1 <?php if ($dato['attivo']) { print "checked=\"checked\""; } ?>></td>
|
||||
</tr>
|
||||
<tr><td colspan="8"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr>
|
||||
<td class="col1" colspan="8">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="20"><img src="img/spazio.gif" width="20" height="1" alt=""></td>
|
||||
<td class="campo" width="150">Firewall di default</td>
|
||||
<td class="valore" width="50">
|
||||
<select name='idfirewall'>
|
||||
<option name='idfirewall' value='0'>Seleziona</option>
|
||||
<?php
|
||||
$queryfw = "SELECT id, nome FROM firewall WHERE id > 0 ORDER BY nome";
|
||||
$resfw = mysql_query( $queryfw, $DB_ID );
|
||||
while ($datofw = mysql_fetch_array ($resfw)) {
|
||||
?>
|
||||
<option name='idfirewall' value='<?php print $datofw['id']?>' <?php if ($dato['idfirewall'] == $datofw['id']) {print "selected";}?>><?php print $datofw['nome'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td width="60"><img src="img/spazio.gif" width="60" height="1" alt=""></td>
|
||||
<td class="campo" width="100">Interfaccia</td>
|
||||
<td width="50">
|
||||
<select name='idinterfaccia'>
|
||||
<option name='idinterfaccia' value='0'>Seleziona</option>
|
||||
<?php
|
||||
$queryfw = "SELECT id, device FROM interfacce WHERE attivo = 1 ORDER BY device";
|
||||
$resfw = mysql_query( $queryfw, $DB_ID );
|
||||
while ($datofw = mysql_fetch_array ($resfw)) {
|
||||
?>
|
||||
<option name='idinterfaccia' value='<?php print $datofw['id']?>' <?php if ($dato['idinterfaccia'] == $datofw['id']) {print "selected";}?>><?php print $datofw['device'] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td><img src="img/spazio.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="8"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr>
|
||||
<td class="col1" colspan="8">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="20"><img src="img/spazio.gif" width="20" height="1" alt=""></td>
|
||||
<td class="campo" width="150">Descrizione</td>
|
||||
<td class="valore" width="300"><input class="valore" type="text" name="commento" id="commento" size="60" maxlength="128" value="<?php print $dato['commento'] ?>"></td>
|
||||
<td><img src="img/spazio.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td align="center" colspan="9">
|
||||
<input type="submit" value="<?php print $bottone ?>">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = 'device.php';"></button>
|
||||
</td></tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php include_once ("footer.php"); ?>
|
||||
245
remove/moddefrule.php
Executable file
245
remove/moddefrule.php
Executable file
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
//isadmin();
|
||||
?>
|
||||
<?php include_once ("top.php"); ?>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
$device = $_GET['device'];
|
||||
if (isset($_GET['azione'])) {
|
||||
switch ($_GET['azione']) {
|
||||
case "attiva":
|
||||
$risultato = defrule_att($id);
|
||||
break;
|
||||
case "disattiva":
|
||||
$risultato = defrule_dis($id);
|
||||
break;
|
||||
case "rm":
|
||||
$query = "UPDATE `defrule` SET stato=3, attivo=0 WHERE `id`=$id";
|
||||
if (mysql_query( $query, $DB_ID )) {
|
||||
$query_rule = "DELETE FROM rule WHERE iddefrule = $id";
|
||||
if (mysql_query( $query_rule, $DB_ID )) {
|
||||
$risultato = 1;
|
||||
azioni ("defrule", $id, 3);
|
||||
}
|
||||
} else {
|
||||
$risultato = "Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: ".mysql_error();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ($risultato == 1) { ?>
|
||||
<script type="text/javascript">
|
||||
document.location.href='defrule.php?id=<?php print $device ?>'
|
||||
</script>
|
||||
<?php }
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php print $risultato ?></td>
|
||||
</tr>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td><input type="button" value="Ok" onclick="location.href = 'defrule.php?id=<?php print $device ?>';"></button></td></tr>
|
||||
<tr><td><img src="img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
$bottone = "Modifica";
|
||||
$modifica = 1;
|
||||
$query = "SELECT * FROM defrule WHERE id =".$_GET['id'];
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
$iddevice = $dato['idinterfacce'];
|
||||
$parent = creanome ($_GET['id']);
|
||||
$limitirate = maxrate ($id, $dato['idparent'], $iddevice);
|
||||
$attivo = $dato['attivo'];
|
||||
} else if (isset ($_POST['id'])) {
|
||||
$modifica = 2;
|
||||
$id = $_POST['id'];
|
||||
$attivo = $_POST['attivo'];
|
||||
$device = $_POST['device'];
|
||||
$iddevice = $device;
|
||||
$idparent = $_POST['idparent'];
|
||||
$descrizione = $_POST['descrizione'];
|
||||
$priorita = $_POST['priorita'];
|
||||
$rate = $_POST['rate'];
|
||||
$ceil = $_POST['ceil'];
|
||||
|
||||
if ($id > 0) {
|
||||
$testo = "L'interfaccia e' stata correttamente aggiornata";
|
||||
$query = "UPDATE `defrule` SET `descrizione`='$descrizione', `priorita`=$priorita, `rate`=$rate, `ceil`=$ceil, `attivo`=$attivo WHERE `id`=$id";
|
||||
} else {
|
||||
$testo = "L'interfaccia e' stata correttamente inserita";
|
||||
$query = "INSERT INTO `defrule` SET idinterfacce=$device, `idparent`=$idparent, `descrizione`='$descrizione', `priorita`=$priorita, `rate`=$rate, `ceil`=$ceil, `stato`=1, `attivo`= 0";
|
||||
}
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (mysql_query( $query, $DB_ID )) {
|
||||
if ($attivo) {
|
||||
azioni ("defrule", $id, 2);
|
||||
}
|
||||
|
||||
?>
|
||||
<?php print $testo ?><br>
|
||||
<?php } else { ?>
|
||||
Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: <?php print mysql_error() ?><br>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="5" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" value="Ok" onclick="location.href = 'defrule.php?id=<?php print $device ?>';"></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
$bottone = "Aggiungi";
|
||||
$modifica = 0;
|
||||
$idparent = $_GET['idparent'];
|
||||
if ($idparent == 0) {
|
||||
$iddevice = $_GET['device'];
|
||||
$querydev = "SELECT device FROM interfacce WHERE id = $iddevice";
|
||||
$resdev = mysql_query( $querydev, $DB_ID );
|
||||
$datodev = mysql_fetch_array ( $resdev );
|
||||
$device = $datodev['device'];
|
||||
$parent = $device."-2";
|
||||
} else {
|
||||
$iddevice = $_GET['device'];
|
||||
$parent = creanome ($idparent);
|
||||
}
|
||||
$limitirate = maxrate (-1, $idparent, $iddevice);
|
||||
$dato['rate'] = $limitirate['rate'];
|
||||
$dato['ceil'] = $limitirate['ceil'];
|
||||
$dato['priorita'] = $limitirate['pri'];
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (($modifica == 0 || $modifica == 1) && !isset($_GET['azione'])) { ?>
|
||||
|
||||
<script type="text/javascript" src="jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="jquery/jquery.validate.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#modulo").validate( {
|
||||
rules: {
|
||||
descrizione: "required",
|
||||
priorita: {
|
||||
required: true,
|
||||
max: 999,
|
||||
},
|
||||
rate: {
|
||||
required: true,
|
||||
min: 0.001,
|
||||
max: <?php print $limitirate['rate'] ?>,
|
||||
},
|
||||
ceil: {
|
||||
required: true,
|
||||
max: <?php print $limitirate['ceil'] ?>,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
descrizione: "<br>Inserisci la descrizione!",
|
||||
device: "<br>Inserire il nome del device!",
|
||||
rate: "<br>Immettere un valore compreso fra 0.001 e <?php print $limitirate['rate'] ?>",
|
||||
ceil: "<br>Immettere un valore minore di <?php print $limitirate['ceil'] ?>",
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<form action="moddefrule.php" method="post" id="modulo" name="modulo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php if ($modifica == 1) { ?>
|
||||
<input type="hidden" name="id" value="<?php print $dato['id'] ?>">
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id" value="-1">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="idparent" value="<?php print $idparent ?>">
|
||||
<input type="hidden" name="device" value="<?php print $iddevice ?>">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="80" height="1" alt=""></td>
|
||||
<td class="campo" width="110">Parent</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="200"><?php print $parent?></td>
|
||||
<td><img src="img/spazio.gif" width="310" height="1" alt=""></td>
|
||||
<td colspan=4><input type="hidden" name="attivo" value="<?php print $dato['attivo'] ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr>
|
||||
<td class="col1" colspan="9">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="40" height="1" alt=""></td>
|
||||
<td class="campo" width="200">Descrizione</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="150"><input class="valore" type="text" name="descrizione" id="descrizione" size="30" maxlength="128" value="<?php print $dato['descrizione'] ?>"></td>
|
||||
<td><img src="img/spazio.gif" width="110" height="1" alt=""></td>
|
||||
<td class="campo" width="150">Priorita'</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<?php if ($dato['priorita'] < 1000) { ?>
|
||||
<td class="valore" width="180"><input class="valore" type="text" name="priorita" id="priorita" size="5" maxlength="10" value="<?php print $dato['priorita'] ?>"></td>
|
||||
<?php } else { ?>
|
||||
<td class="valore" width="180"><?php print $dato['priorita'] ?></td>
|
||||
<input type="hidden" name="priorita" value="<?php print $dato['priorita'] ?>">
|
||||
<?php } ?>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td colspan="9" class="spaziov"><img src="img/spazio.gif" width="1" alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr>
|
||||
<td class="col1" colspan="9">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="9">Limitazioni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="40" height="1" alt=""></td>
|
||||
<td class="campo" width="200">Banda Garantita<br>(Max. <?php print $limitirate['rate'] ?> Mb/sec)</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="150"><input class="valore" type="text" name="rate" id="rate" size="5" maxlength="10" value="<?php print $dato['rate'] ?>"> Mb/sec</td>
|
||||
<td><img src="img/spazio.gif" width="110" height="1" alt=""></td>
|
||||
<td class="campo" width="150">Banda Massima<br>(Max. <?php print $limitirate['ceil'] ?> Mb/sec)</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="180"><input class="valore" type="text" name="ceil" id="ceil" size="5" maxlength="10" value="<?php print $dato['ceil'] ?>"> Mb/sec</td>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td colspan="9" class="spaziov"><img src="img/spazio.gif" width="1" alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td align="center" colspan="9">
|
||||
<input type="submit" value="<?php print $bottone ?>">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = 'defrule.php?id=<?php print $iddevice ?>';"></button>
|
||||
</td></tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php include_once ("footer.php"); ?>
|
||||
195
remove/moddevice.php
Executable file
195
remove/moddevice.php
Executable file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
include_once ("core/config.php");
|
||||
$UTENTE = login();
|
||||
isadmin();
|
||||
?>
|
||||
<?php include_once ("top.php"); ?>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
$bottone = "Modifica";
|
||||
$modifica = 1;
|
||||
$query = "SELECT * FROM interfacce WHERE id =".$_GET['id'];
|
||||
$res = mysql_query( $query, $DB_ID );
|
||||
$dato = mysql_fetch_array ( $res );
|
||||
$query_limiti = "SELECT SUM(rate) AS rate, MAX(ceil) AS ceil FROM defrule WHERE idparent = 0 AND idinterfacce = ".$_GET['id'];
|
||||
$res_limiti = mysql_query( $query_limiti, $DB_ID );
|
||||
$dato_limiti = mysql_fetch_array ( $res_limiti );
|
||||
$min_rate = $dato_limiti['rate'];
|
||||
$min_ceil = $dato_limiti['ceil'];
|
||||
} else if (isset ($_POST['id'])) {
|
||||
$modifica = 2;
|
||||
$id = $_POST['id'];
|
||||
$device = $_POST['device'];
|
||||
$descrizione = $_POST['descrizione'];
|
||||
$attivo = $_POST['attivo'];
|
||||
$rate = $_POST['rate'];
|
||||
$ceil = $_POST['ceil'];
|
||||
$inout = $_POST['inout'];
|
||||
|
||||
if ($id > 0) {
|
||||
$testo = "L'interfaccia e' stata correttamente aggiornata";
|
||||
$query = "UPDATE `interfacce` SET `device`='$device', `descrizione`='$descrizione', `rate`=$rate, `ceil`=$ceil, `inout`='$inout', `stato`=2 WHERE `id`=$id";
|
||||
} else {
|
||||
$testo = "L'interfaccia e' stata correttamente inserita";
|
||||
$query = "INSERT INTO `interfacce` SET `device`='$device', `descrizione`='$descrizione', `rate`=$rate, `ceil`=$ceil, `inout`='$inout', `stato`=1, `attivo`=0";
|
||||
}
|
||||
?>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""><td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if (mysql_query( $query, $DB_ID )) {
|
||||
if ($id > 0) {
|
||||
if ($attivo) {
|
||||
azioni ("interfacce", $id, 2);
|
||||
}
|
||||
} else {
|
||||
$iddevice = mysql_insert_id ($DB_ID);
|
||||
$querydefrule = "INSERT INTO `defrule` SET `idparent`=0, `idinterfacce`=$iddevice, `descrizione`='DEFAULT', `priorita`=1000, `rate`=$rate, `ceil`=$ceil, `stato`=1, `default`=1, `attivo`=0";
|
||||
mysql_query( $querydefrule, $DB_ID );
|
||||
}
|
||||
?>
|
||||
<?php print $testo ?><br>
|
||||
<?php } else { ?>
|
||||
Non e' stato possibile eseguire l'operazione richiesta a causa di un errore: <?php print mysql_error() ?><br>
|
||||
<?php print $query ?><br>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="5" alt=""></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" value="Ok" onclick="location.href = 'device.php';"></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="1" height="10" alt=""></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
} else {
|
||||
$bottone = "Aggiungi";
|
||||
$modifica = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (($modifica == 0 || $modifica == 1) && !isset($_GET['rm'])) { ?>
|
||||
|
||||
|
||||
<script type="text/javascript" src="jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="jquery/jquery.validate.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#modulo").validate( {
|
||||
rules: {
|
||||
descrizione: "required",
|
||||
device: "required",
|
||||
rate: {
|
||||
required: true,
|
||||
min: <?php print $min_rate ?>,
|
||||
},
|
||||
ceil: {
|
||||
required: true,
|
||||
min: <?php print $min_ceil ?>,
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
descrizione: "<br>Inserisci la descrizione!",
|
||||
device: "<br>Immettereil nome del device",
|
||||
rate: "<br>Immettere un valore non minore di <?php print $min_rate ?>",
|
||||
ceil: "<br>Immettere un valore non minore di <?php print $min_ceil ?>",
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<form action="moddevice.php" method="post" id="modulo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="90%">
|
||||
<?php if ($modifica == 1) { ?>
|
||||
<input type="hidden" name="id" value="<?php print $dato['id'] ?>">
|
||||
<?php } else { ?>
|
||||
<input type="hidden" name="id" value="-1">
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="80" height="1" alt=""></td>
|
||||
<td class="campo" width="110">Device</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="200"><input type="text" id="device" name="device" size="10" maxlength="20" value="<?php print $dato['device']?>"></td>
|
||||
<td><img src="img/spazio.gif" width="310" height="1" alt=""></td>
|
||||
<td colspan=4><input type="hidden" name="attivo" value="<?php print $dato['stato'] ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr>
|
||||
<td class="col1" colspan="9">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="40" height="1" alt=""></td>
|
||||
<td class="campo" width="200">Descrizione</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="150"><input class="valore" type="text" name="descrizione" id="descrizione" size="30" maxlength="128" value="<?php print $dato['descrizione'] ?>"></td>
|
||||
<td><img src="img/spazio.gif" width="110" height="1" alt=""></td>
|
||||
<td class="campo" width="150">Posizione</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<?php
|
||||
if ($dato['inout'] == 'interna') {
|
||||
$checkin = "selected";
|
||||
$checkout = "";
|
||||
} else {
|
||||
$checkin = "";
|
||||
$checkout = "selected";
|
||||
} ?>
|
||||
<td class="valore" width="180">
|
||||
<select name='inout'>
|
||||
<option name='inout' value='interna' <?php print $checkin ?>>Interna</option>
|
||||
<option name='inout' value='esterna' <?php print $checkout ?>>Esterna</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td colspan="9" class="spaziov"><img src="img/spazio.gif" width="1" alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr>
|
||||
<td class="col1" colspan="9">
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="9">Limitazioni</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="img/spazio.gif" width="40" height="1" alt=""></td>
|
||||
<td class="campo" width="200">Banda Garantita<br>(Min. <?php print $min_rate?>)</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="150"><input class="valore" id="rate" type="text" name="rate" size="5" maxlength="10" value="<?php print $dato['rate'] ?>"> Mb/sec</td>
|
||||
<td><img src="img/spazio.gif" width="110" height="1" alt=""></td>
|
||||
<td class="campo" width="150">Banda Massima<br>(Min. <?php print $min_ceil?>)</td>
|
||||
<td><img src="img/spazio.gif" width="10" height="1" alt=""></td>
|
||||
<td class="valore" width="180"><input class="valore" id="ceil" type="text" name="ceil" size="5" maxlength="10" value="<?php print $dato['ceil'] ?>"> Mb/sec</td>
|
||||
<td><img src="img/spazio.gif" width="50" height="1" alt=""></td>
|
||||
</tr>
|
||||
<tr><td colspan="9" class="spaziov"><img src="img/spazio.gif" width="1" alt=""></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="5" alt=""></td></tr>
|
||||
<tr><td align="center" colspan="9">
|
||||
<input type="submit" value="<?php print $bottone ?>">
|
||||
|
||||
<input type="button" value="Annulla" onclick="location.href = 'device.php';"></button>
|
||||
</td></tr>
|
||||
|
||||
<tr><td colspan="9"><img src="img/spazio.gif" width="1" height="10" alt=""></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php include_once ("footer.php"); ?>
|
||||
Reference in New Issue
Block a user