/****************************** * VERSIONE 3.0 READY ***********************/ include ("../common/public.php") ; print_r($_GET + $_POST) ; if ($_POST["anno"] != "") $GLOBALS["anno"] = $_POST["anno"] ; if ($direction == "DES") $direction = "DESC" ; $arrId = array() ; $arrVal = array() ; $arrTot = array('0','0','0','0','0','0','0','0','0','0','0','0','0','0') ; /************************************************** * mi ricavo il numero totale degli ordini per mese ***************************************************/ $qtot = " select month(O.dataordine) as mese, count(O.idordini) as num_ord from clienti C left join ordini O on O.idcliente = C.idclienti and O.Anno = $anno where (C.Attivo = 1 or (C.Attivo = 0 and Year(DataDisattivazione) > '$anno') ) and month(O.dataordine) > 0 group by month(O.dataordine) order by month(O.dataordine) " ; list($ntot, $dtot) = $db->RecuperaDati($qtot) ; $totale = $dtot['num_ord'] ; foreach ($dtot['mese'] as $idx => $mese) $arrTot[$mese] = $dtot['num_ord'][$idx] ; if (! isset($colToSort) or $colToSort == '') $colToSort = 0 ; if (! isset($direction) or $direction == '') $direction = "ASC" ; $strLoadXml = "LoadStatisticheClientiMese.php?ordinaper=$colToSort&direction=$direction" ; $header = "CLIENTE,GEN,FEB,MAR,APR,MAG,GIU,LUG,AGO,SET,OTT,NOV,DIC" ; $footer = "TOTALE:," . $arrTot[1] . "," . $arrTot[2] . "," . $arrTot[3] . "," . $arrTot[4] . "," . $arrTot[5] . "," . $arrTot[6] . "," . $arrTot[7] . "," . $arrTot[8] . "," . $arrTot[9] . "," . $arrTot[10] . "," . $arrTot[11] . "," . $arrTot[12] ; $strSort = "str,int,int,int,int,int,int,int,int,int,int,int,int" ; $iniWP = "39,5,5,5,5,5,5,5,5,5,5,5,5" ; $setColType = "ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro" ; $setColAlign = "left,center,center,center,center,center,center,center,center,center,center,center,center" ; ?>
| Ordini per Cliente | Ordini per Cliente per Mese |