Location: PHPKode > projects > WebArchive > phparchive.0.1.82.beta/distribuzione.php
<?php
/**
 * @version $Id: distribuzione.php,v 1.1 2003/11/23 06:05:36 freedev Exp $
 * @author Vincenzo D'Amore <hide@address.com>
 * @package wa_segreteria
*/

/**
 *
 */

require_once("wacommon.inc.php");
require_once("./includes/databases.inc.php");
require_once("./includes/modifyform.inc.php");
require_once("./includes/searchform.inc.php");
require_once("./includes/waform.inc.php");
require_once("./includes/wafields.inc.php");

	CheckSession();
	PrintHTMLHeader("Distribuzione pratiche", "");
?>
<body class="BodyStandard">
<?php include("header.php"); ?>
<!--- Main Table Start -->
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td></td>
  </tr>
  <tr>
    <td>
		<!--- Content Table Start -->
		<?php
		if (!empty($_GET["IdForm"]))
		{
			$_SESSION["gIdForm"] = $_GET["IdForm"];
			if ($_SESSION["gIdCurrentForm"] != $_SESSION["gIdForm"])
			{
				$_SESSION["gIdCurrentForm"] = $_SESSION["gIdForm"];
				ClearAllForms();
			}
		}

		$_SESSION["giIdContext"] = $_SESSION["giIdMenu"];

		$form = new WAForm();

		if ($form->Init($_SESSION["gIdForm"], $_SESSION["giIdContext"]) )
		{
			$sSql = "";
			$sMessage = "";
			$form->m_Form["WAActions"] = "";
			$sSql = "SELECT count(*) as Distrib, (tbanag_REF1.RagSoc) as RagSoc1, (tbanag_REF1.Cognome) as Cognome1, (tbanag_REF1.Nome) as Nome1 ";
			$sSql .= "FROM tbsegnalanti LEFT JOIN tbanag tbanag_REF1 ON tbsegnalanti.IdAnag = tbanag_REF1.IdAnag ";
//			$sSql .= " GROUP BY tbsegnalanti.IdAnag ORDER BY RagSoc1, Cognome1, Nome1;";
			$sSql .= " GROUP BY tbsegnalanti.IdAnag ORDER BY Distrib desc, RagSoc1, Cognome1, Nome1;";
//			echo $sSql;
			$iCurrentPage = 0;
			$iRowsPerPage = 1000;
			echo "<table border='0' cellpadding='0' cellspacing='0' width='100%' class='FormTableE'>";
			echo "<tr><td colspan='2' class='FormTitleE'>Distrubuzione pratiche tra i segnalanti</td></tr>";
			echo "</table>";
			CreateSearchResults($form->m_Form, $sSql, $iCurrentPage, $iRowsPerPage);
		}
		?>
		<!--- Content Table End -->
	</td>
  </tr>
  <tr>
	<td>
    </td>
  </tr>
</table>
<!--- Main Table End -->
<?php include("footer.php"); ?>
</body>
</html>
Return current item: WebArchive