<?php
include_once ("../core/config.php");
$UTENTE = login();
$DIRITTI = diritti(1);
view_top();
?>

<meta http-equiv="refresh" content="10">
<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%">
<?php
$query = "SELECT GREATEST (max(inviati), max(ricevuti)) AS max from proxy_speed";
$res = mysql_query( $query, $DB_ID );
$valori = mysql_fetch_array ( $res );
$max = $valori['max'];

$query = "SELECT proxy_speed.ip, proxy_speed.ricevuti, proxy_speed.inviati, proxy_pool.attivo FROM proxy_speed JOIN proxy_pool ON proxy_speed.ip = proxy_pool.ip ORDER BY ricevuti desc , inviati desc";
$res = mysql_query( $query, $DB_ID );
while ($dato = mysql_fetch_array ( $res )) {
?>

	<tr>
<?php
	if ($dato['attivo']) {
?>
		<td rowspan=2 class="col3btn"><a href="pool_gest.php?azione=libera&ip=<?php print $dato['ip']?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente limitato" TITLE="Utente limitato"></a></td>
<?php	} else { ?>
		<td rowspan=2 class="col3btn"><a href="pool_gest.php?azione=limita&ip=<?php print $dato['ip']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente non limitato" TITLE="Utente non limitato"></a></td>
<?php	} ?>
		<td rowspan=2 class="col3btn"><a href="pool_ip.php?ip=<?php print $dato['ip'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/modify.gif" ALT="Dettaglio" TITLE="Dettaglio"></a></td>
		<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td rowspan=2 class="colip"><?php print $dato['ip'] ?></td>
		<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="descrizione">Inviati</td>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colspeed"><?php print byteConvert($dato['inviati']) ?> </td>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colimg"><img border="0" src="barra.php?max=<?php print $max ?>&val=<?php print $dato['inviati'] ?>&col=red"></td>
		</td>
	</tr>
	<tr>
		<td class="descrizione">Ricevuti</td>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colspeed"><?php print byteConvert($dato['ricevuti']) ?></td>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colimg"><img border="0" src="barra.php?max=<?php print $max ?>&val=<?php print $dato['ricevuti'] ?>&col=blue"></td>

	</tr>
	<tr><td class="spaziov" colspan=10><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td></tr>

<?php
} ?>
</table>
<img src="<?php print $CONF['base_url'] ?>/img/spazio.gif" width="1" height="20" alt="">
<?php view_footer(); ?>
