<?php
session_start();
setlocale(LC_ALL,'it_IT');
error_reporting(E_ALL ^ E_NOTICE);
include_once("include/config.php");
include_once("include/auth.lib.php");
list($status, $user) = auth_get_status();
if($status == AUTH_LOGGED & auth_get_option("TRANSICTION METHOD") == AUTH_USE_LINK){
$link = "?uid=".$_GET['uid'];
}else $link = '';
switch($status){
case AUTH_LOGGED:
$TotClub = 0;
$TotAff = 0;
$stato = (isset($_GET['Submit'])) ? $_GET['stato'] : '%';
$query = "SELECT * FROM utenti";
$query.= " WHERE stato LIKE '$stato'";
$query.= " ORDER BY name ASC";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Database ACSI Comitato Provinciale di Padova</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}
#tabella{
border:1px #ccc solid;
border-collapse:collapse;
margin:auto;
}
#tabella thead tr{
color:white;
background-color:#333333;
}
#tabella td{
border:1px #ccc solid;
border-collapse:collapse;
}
-->
</style>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script>
$(document).ready(function(){
$('#tabella tbody tr').filter(":even").css("background-color", "#fff").hover(
function(){
$(this).css({"background-color":"#666", "color":"#d9d9d9"});
},
function(){
$(this).css({"background-color":"#fff", "color":"#000"});
});
$('#tabella tbody tr').filter(":odd").css("background-color", "#d6d6d6").hover(
function(){
$(this).css({"background-color":"#666", "color":"#d9d9d9"});
},
function(){
$(this).css({"background-color":"#d6d6d6", "color":"#000"});
});
});
</script>
</head>
<body>
<p align="center"><img src="/admin/images/image/intestazione acsi-senzarif.jpg">
<h2 align="center">LISTA CLUB ACSI-AES CON REPORT</h2></p>
<div class="alert">
<form name="report" action="" method="get">
Stato
<select name="stato">
<option value="" <?php echo ($_GET['stato'] == '') ? 'selected' : ''; ?>>Tutti</option>
<option value="aperto" <?php echo ($_GET['stato'] == 'aperto') ? 'selected' : ''; ?>>Aperto</option>
<option value="chiuso" <?php echo ($_GET['stato'] == 'chiuso') ? 'selected' : ''; ?>>Chiuso</option>
<option value="altroente" <?php echo ($_GET['stato'] == 'altroente') ? 'selected' : ''; ?>>Altro Ente</option>
<option value="nonoperativo" <?php echo ($_GET['stato'] == 'nonoperativo') ? 'selected' : ''; ?>>Non operativo</option>
</select>
<input type="submit" name="Submit" value="Filtra">
</form>
<div style="float:right;margin-top:-20px;"><img src="images/das.gif"> <a href="cel2html.php" target="_blank">Esporta contatti per AIMON</a> <img src="images/das.gif"> <a href="mail2html.php" target="_blank">Esporta email</a></div>
</div>
<?php
$aff = "0910";
$html.= '<table width="100%" border="1" id="tabella">';
$html.= '<thead><tr><td><b>NOME CLUB</b></td>
<td><b>INDIRIZZO</b></td>
<td><b>PRESIDENTE</b></td>
<td><b>TELEFONO</b></td>
<td><b>CEL</b></td>
</tr></thead>';
$risultato = mysql_query($query) or die(mysql_error());
while ($array = mysql_fetch_array($risultato, MYSQL_BOTH)) {
$club = $array['username'];
$html.= '<tr><td>'.$array['name'].'</td>';
$html.= '<td>'.$array['indirizzo'].'</td>';
$html.= '<td>'.$array['nome1'].' '.$array['cognome1'].'</td>';
$html.= '<td>'.$array['tel'].'</td>';
$html.= '<td>'.$array['cel'].'</td></tr>';
$TotClub++;
}
$html.= '<tr><td colspan="10"><h1>Totale Club: '.$TotClub.'</h1></td></tr>';
$html.= '</table>';
echo $html;
?>
</body>
</html>
<?php
break;
case AUTH_NOT_LOGGED:
header("Refresh: 0;URL=index.php");
break; } ?>