Current Path : /web/htdocs/www.entinoprofit.org/home/database/
Upload File :
Current File : /web/htdocs/www.entinoprofit.org/home/database/listasoci.php

<?php
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:

if ($user["username"] == 'acsi'){

if (isset($_POST['chiudipratica']))
{
$id = $_GET['id'];

$query5 = "UPDATE socio SET temp ='1' WHERE id = '".$id."'";

$postdb5 = mysql_query($query5) or die ("Errore nel chiudere la pratica");

}

if (isset($_POST['e-postmain']))
{
	while(list($key, $val) = each($_POST["delete"])) 
		{ 
    if($val == 'del')
        $deleteIds[] = $key;
	$delmail = "DELETE FROM socio WHERE id='$key'";
	$delres = mysql_query($delmail) or die("Query 1 failed");

	} 
}

if (isset($_POST['bonifico']))
{
  foreach ($_POST['bonifico'] as $data) 
    { 
	
     $addbon = "UPDATE socio SET bonifico = '1' where id = '$data'";
	 $bonifico = mysql_query($addbon) or die("Query 1 failed");
    }

}

if (isset($_POST['rischio']))
{
  foreach ($_POST['rischio'] as $data) 
    { 
	
     $addadr = "UPDATE socio SET adr = '1' where id = '$data'";
	 $attrischio = mysql_query($addadr) or die("Query 1 failed");
    }

}

if (isset($_GET['lettera']))
{
$lettera = $_GET['lettera'];
$percento = "%";
$filtro = $lettera."".$percento;

$query = "SELECT * FROM socio WHERE cognome LIKE '$filtro' ORDER BY cognome ASC";
$risultato = mysql_query($query) or die("Query 1 failed");
} 

if (isset($_GET['club']))
{
$filtro2 = $_GET['club'];

$query = "SELECT * FROM socio WHERE club = '$filtro2' ORDER BY cognome ASC";
$risultato = mysql_query($query) or die("Query 1 failed");
$num_rows = mysql_num_rows($risultato); 

}
if (isset($_GET['regdata']))
{
$filtro3 = $_GET['regdata'];

$query = "SELECT * FROM socio WHERE regdate = '$filtro3' ORDER BY id DESC";
$risultato = mysql_query($query) or die("Query 1 failed");
} 
if (!isset($_GET['club']))
if (!isset($_GET['lettera']))
if (!isset($_GET['regdata']))

{
$query = "SELECT * FROM socio WHERE cognome LIKE 'A%' ORDER BY cognome ASC";

$risultato = mysql_query($query) or die("Query 1 failed");
}

?>
<!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">
</head>

<body>
<table width="100%" class="table1">
  <!--DWLayoutTable-->
  <tr>
    <td height="20" colspan="9"><div align="center">Database ACSI Comitato Provinciale di Padova</div></td>
  </tr>
  <tr>
    <td height="20"></td>
  </tr>
  <tr>
    <td height="20" colspan="9"><div align="center"><?php include('in.php'); ?></div></td>
  </tr>
 </table>

<div id="main">


<form method="post" action="listasoci.php">
<table width="100%" class="table2">
  <!--DWLayoutTable-->
  <tr>
    <td height="22" colspan="25" valign="center">
      <div align="center"><a href="lista.php">Lista Soci <?php echo "$filtro2 $filtro3 ($num_rows)"; ?></a></div></td>
  </tr>
 <tr>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=a">A</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=b">B</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=c">C</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=d">D</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=e">E</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=f">F</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=g">G</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=h">H</a></div></td>
    <td width="34" ><div align="center"><a href="listasoci.php?lettera=i">I</a></div></td>
	 <td width="34" ><div align="center"><a href="listasoci.php?lettera=j">J</a></div></td> 
<td width="41" ><div align="center"><a href="listasoci.php?lettera=k">K</a></div></td>
    <td width="37" ><div align="center"><a href="listasoci.php?lettera=l">L</a></div></td>
    <td width="47" ><div align="center"><a href="listasoci.php?lettera=m">M</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=n">N</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=o">O</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=p">P</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=q">Q</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=r">R</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=s">S</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=t">T</a></div></td>
    <td width="44" ><div align="center"><a href="listasoci.php?lettera=u">U</a></div></td>
    <td width="41" ><div align="center"><a href="listasoci.php?lettera=v">V</a></div></td>
    <td width="54" ><div align="center"><a href="listasoci.php?lettera=w">W</a></div></td>
	<td width="41" ><div align="center"><a href="listasoci.php?lettera=y">Y</a></div></td>

    <td width="50" ><div align="center"><a href="listasoci.php?lettera=z">Z</a></div></td>
  </tr>
  </table>
<p></p>

  <table width="100%" class="table2">
    <!--DWLayoutTable-->
	<thead>
		<tr><th height="20">ID</th>
 <th height="20">Cognome</th>
 <th height="20">Nome</th>
 <th height="20">Club</th>
 <th height="20">Documento</th>
 <th height="20">Data Reg.</th> 
 <th height="20"></th>
 <th height="20"></th>
 </th>
</tr></thead> 
<?php
while ($array = mysql_fetch_array($risultato, MYSQL_BOTH)) { 
if ($array['temp']=='0') 
{
echo "<tr  >";
} else {
echo "<tr  >";
}
echo "<td height='10' valign='top' class='form'><a href='modsocio.php?id=".$array['id']."' >".$array['id']."</a></td>
<a href='schedasocio.php?id=".$array['id']."' ><td valign='top' class='form'>".$array['cognome']."</td>
 <td valign='top' >".$array['nome']."</td>
<td valign='top' >".$array['club']."</td>
 <td valign='top' >".$array['fiscale']."</td></a>
 <td valign='top' >".$array['regdate']."</td>
 <td><input type='checkbox' name='delete[".$array['id']."]' value='del'  ></td>
 <td><a href='schedasocio.php?id=".$array['id']."' ><img src='images/info.gif' border='0' alt='Vai alla scheda del socio'></a></td>";
echo "</tr>";
}
?>

</table>
<table width="100%" class="table4">
<tr><td class="table4">
  <div align="center">
    <input type="submit" name="e-postmain" value="Cancella selezionati">
  </div></td>
</tr>
</table>

</table></form>


</div> 
</body>
</html>
<?php } } ?>