Inizializzazione

This commit is contained in:
cmaffio
2015-10-08 11:00:52 +02:00
parent 61949a0cdc
commit 22de29deda
2768 changed files with 254794 additions and 0 deletions

82
mainuser.php Executable file
View File

@@ -0,0 +1,82 @@
<?php
include_once ("php/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%">
<table cellpadding="0" cellspacing="0" border="0" width="90%">
<tr>
<td class="userruletxtc"><b>Attiva</b></td>
<td class="userruletxt"><b>Nome regola</b></td>
<td>&nbsp;</td>
<td class="userruletxtd"><b>Banda garantita</b></td>
<td>&nbsp;</td>
<td class="userruletxtd"><b>Banda massima</b></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<?php
livelli ($UTENTE['id']);
?>
</table>
<img src="img/spazio.gif" width="1" height="20" alt="">
<?php include_once ("footer.php"); ?>
<?php
function livelli ($utente) {
global $DB_ID;
$query = "SELECT * FROM defrule JOIN utenti2defrule ON defrule.id = utenti2defrule.iddefrule WHERE idutente = $utente ORDER BY priorita";
$res = mysql_query( $query, $DB_ID );
while ($dato = mysql_fetch_array ( $res )) {
?>
<tr>
<td width="8" align="center" nowrap>
<?php if ($dato['attivo']) { ?>
<img border=0 src="img/attivo.gif" ALT="Regola attiva" TITLE="Regola attiva"></a>
<?php } else { ?>
<img border=0 src="img/non_attivo.gif" ALT="Regola non attiva" TITLE="Regola non attiva"></a>
<?php } ?>
</td>
<td class="userruletxt" nowrap><?php print $dato['descrizione'] ?></td>
<td class="spazioh"><img src="img/spazio.gif"></td>
<td class="userruletxtd" align="center" nowrap><?php printf ("%0.2f Mb/sec",$dato['rate']) ?></td>
<td class="spazioh"><img src="img/spazio.gif"></td>
<td class="userruletxtd" nowrap><?php printf ("%0.2f Mb/sec",$dato['ceil']) ?></td>
<td class="spazioh"><img src="img/spazio.gif"></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="Visualizza grafico utilizzo banda" TITLE="Visualizza grafico utilizzo banda"></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 }
}
?>