<?

include("dblib.inc");

include("clublib.inc");

checkAdmin();

$message = "";

?>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">



<html>

<head>

	<title>Fatture Vendita</title>

	<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>
<body bgcolor="#FFFFFF" link="#504C43" alink="#000000" vlink="#504C43" text="#000000">

<? 

include("Header.php"); 



?>
<p><br></p>
<div align="center">
  <p><font class="FacetFormHeaderFont"><a href="Admin_Nuovo_DDT.php">Crea Nuovo DDT </a></font></p>
</div>



<p>
<div align="center"><font class="FacetFormHeaderFont">Elenco DDT Emesse</font></div>
<?
$recordnav = new recordnav($DDT_table, $session['where'], $session['limit'], $session['passo']);
$recordnav -> output();
?>
<table border="0" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="center">

  <!-- BEGIN Error -->

   <tr>

    <td colspan="4" class="FacetDataTD"><?print $message?></td></tr>

   <tr>
<?
	$headers_fatture = array(
		"N. DDT" => "ID_DDT",
		"CLIENTE" => "Ragione_Sociale",
		"DATA DDT" => "Data_DDT",
		"TOTALE" => "Totale",
		"CANCELLA" => ""
		);
	$headerFatture = new linkHeaders($headers_fatture);
	$headerFatture -> output();	
?>
 
   </tr>

<?php


$result = dynQuery('*' ,$DDT_table, $session['where'], $orderby, $session['limit'], $session['passo']);


while ($a_row = dbms_fetch_array($result))

	{

	print "<tr>";

	print "<td class=\"FacetDataTD\"><a href=\"Admin_Stampa_DDT.php?ID_DDT=".$a_row['ID_DDT']."\">".$a_row["Prog_DDT_Annuo"]."</a> &nbsp;</td>";
	print "<td class=\"FacetDataTD\">".$a_row["Ragione_Sociale"]." &nbsp;</td><td class=\"FacetDataTD\">".formatDate($a_row["Data_DDT"])." &nbsp;</td><td class=\"FacetDataTD\">".$a_row['Totale'] ."&nbsp;</td>";
    print "<td class=\"FacetDataTD\"><a href=\"Admin_Del_DDT.php?ID_DDT=".$a_row["ID_DDT"]."\"><img src=\"images/x.gif\" alt=\"Cancella\" border=\"0\"></a></td>";
	print "</tr>";

	}   

   ?>

</table>






<? include ("footer.php");?>
</body>

</html>

