<?php
include_once ("../core/config.php");
$UTENTE = login();
$DIRITTI = diritti('Admin');
view_top();
?>
<form name="" method="post">
<?php	
$tabella = new html (0,"90%",array(5,5,2,5,2,9,2,9,2,15,0));
?>
	<tr>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="spazioh"><a href="net_edit.php"><img src="<?php print $CONF['base_url'] ?>/img/addresource.png"></a></td>
		<td colspan=9 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
	</tr>
<?php
$tabella->riga();
$query = "	SELECT 
			id,
			attivo,
			net,
			mask,
			data,
			modifica
		FROM
			proxy_net
		ORDER BY
			net,
			mask
	";

$res = mysql_query( $query, $DB_ID );
while ($dato = mysql_fetch_array ( $res )) {
?>
	<tr>
<?php
	if ($dato['attivo']) {
?>
		<td rowspan=2 class="col3btn"><a href="proxy_gest.php?azione=net_down&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Net Abilitata" TITLE="Net Abilitata"></a></td>
<?php	} else { ?>
		<td rowspan=2 class="col3btn"><a href="proxy_gest.php?azione=net_up&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Net Disabilitata" TITLE="Net Disabilitata"></a></td>
<?php	} ?>
		<td rowspan=2 class="col3btn"><a href="net_edit.php?id=<?php print $dato['id'] ?>"><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="spazioh"><a href="net_acl.php?id=<?php print $dato['id'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/edit-regole.gif" ALT="ACL" TITLE="ACL"></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['net'] ?></td>
		<td rowspan=2 class="colip"> / </td>
		<td rowspan=2 class="colip"><?php print $dato['mask'] ?></td>
		<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colip"><?php print $dato['data'] ?></td>
		<td rowspan=2 class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		</td>
	</tr>
		<td class="colip"><?php print $dato['modifica'] ?></td>
	<tr>
	</tr>
<?php
$tabella->riga();
} 
$tabella->close();
?>
</form>
<?php view_footer(); ?>
