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

<table cellpadding="0" cellspacing="0" border="0" width="90%">
	<tr>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="spazioh"><a href="users_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
$query = "	SELECT 
			id,
			user,
			fullname,
			attivo,
			DATE_FORMAT(data, '%d.%m.%Y %H:%i:%s') AS data,
			ip
		FROM
			proxy_utenti
		ORDER BY
			user
	";

$res = mysql_query( $query, $DB_ID );
while ($dato = mysql_fetch_array ( $res )) {
?>


	<tr>
<?php
	if ($dato['attivo']) {
?>
		<td class="spazioh"><a href="users_gest.php?azione=blocca&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/attivo.gif" ALT="Utente Attivo" TITLE="Utente Attivo"></a></td>
<?php	} else { ?>
		<td class="spazioh"><a href="users_gest.php?azione=abilita&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/non_attivo.gif" ALT="Utente non Attivo" TITLE="Utente non Attivo"></a></td>
<?php	} ?>
		<td class="spazioh"><a href="users_gest.php?azione=rimuovi&id=<?php print $dato['id']?>"><img src="<?php print $CONF['base_url'] ?>/img/trash.png"></a></td>

		<td class="spazioh"><a href="users_edit.php?id=<?php print $dato['id'] ?>"><img src="<?php print $CONF['base_url'] ?>/img/modify.gif" ALT="Dettaglio" TITLE="Dettaglio"></a></td>
		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>

		<td class="colip"><?php print $dato['user'] ?></td>

		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colip"><?php print $dato['fullname'] ?></td>

		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colip"><?php print $dato['data'] ?></td>

		<td class="spazioh"><img src="<?php print $CONF['base_url'] ?>/img/spazio.gif"></td>
		<td class="colip"><?php print $dato['ip'] ?></td>

		</td>
	</tr>
	<tr><td class="spaziov" colspan=11><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(); ?>
