<?php
include("dblib.inc");
include("clublib.inc");
checkAdmin();
$message = "";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<?php
include("Header.php");
?>
<p><br></p>
<p><div align="center"><font class="FacetFormHeaderFont"><a href="Admin_Nuovo_Cliente.php">Inserisci Nuovo Cliente</a></font></div>
<p><div align="center"><font class="FacetFormHeaderFont">Clienti</font> <a href="clientiReport.php" alt="Stampa"><img src="images/printer.gif" border="0"></a></div>
<?php
$recordnav = new recordnav($customers_table, $_SESSION['where'], $_SESSION['limit'], $_SESSION['passo']);
$recordnav -> output();
//$last = recordCount($customers_table)-(recordCount($customers_table) % $_SESSION['passo']); // (recordcount - modulo del numero di record diviso il passo)
// barra di navigazione record
//include "recordnav.php";
?>
<table border="0" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="center">
<!-- BEGIN Error -->
<tr>
<td colspan="4" class="FacetDataTD"><?php print $message?></td></tr>
<tr>
<?php
//echo $_SESSION['limit']."-".$_SESSION['passo']."-".$orderby;
?>
<?php
$headers_clienti = array(
"Ragione Sociale" => "Ragione_Sociale",
"Partita Iva" => "PI",
"Telefono" => "Telefono",
"Mail" => "E_mail",
"Partitario" => "",
"Cancella" => ""
);
$headerFatture = new linkHeaders($headers_clienti);
$headerFatture -> output();
?>
</tr>
<?php
$result = dynQuery ('*', $customers_table, addslashes($_SESSION['where']), $orderby, $_SESSION['limit'], $_SESSION['passo']);
while ($a_row = dbms_fetch_array($result))
{
print "<tr>";
print "<td class=\"FacetDataTD\"><a href=\"Admin_Upd_Cliente.php?ID_Cliente=".$a_row["ID_Cliente"]."\">".$a_row["Ragione_Sociale"]."</a> ";
print "</td><td class=\"FacetDataTD\">".$a_row["PI"]." </td>";
print "<td class=\"FacetDataTD\">".$a_row["Telefono"]." </td>";
print "<td class=\"FacetDataTD\">".$a_row["E_mail"]." </td>";
print "<td class=\"FacetDataTD\" align='center'><a href=\"Admin_Partitario_Cliente.php?ID_Cliente=".$a_row["ID_Cliente"]."\"><img src=\"images/report.gif\" alt=\"Partitario Cliente\" border=\"0\"></a></td>";
print "<td class=\"FacetDataTD\" align='center'><a href=\"Admin_Del_Cliente.php?ID_Cliente=".$a_row["ID_Cliente"]."\"><img src=\"images/x.gif\" alt=\"Cancella\" border=\"0\"></a></td>";
print "</tr>";
}
?>
</table>
</body>
</html>