include ("../common/public.php") ; $arrId = array() ; $arrVal = array() ; $arrTot = array('0','0','0','0','0','0','0','0','0','0','0','0','0','0') ; $Totale = 0 ; /************************************************** * mi ricavo il numero totale degli ordini per mese ***************************************************/ if ($profilo = 3) $wagente = " O.idagente != 4 and O.idagente != 5 and O.idagente != 9 and O.idagente != 10" ; else $wagente = " 1=1" ; $qtot = " select month(O.dataordine) as mese, count(O.idordini) as num_ord from clienti C inner join ordini O on O.idcliente = C.idclienti and O.Anno = $anno where month(O.dataordine) > 0 and $wagente 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] ; $Totale += $dtot['num_ord'][$idx] ; } if (! isset($colToSort) or $colToSort == '') $colToSort = 0 ; if (! isset($direction) or $direction == '') $direction = "ASC" ; $strLoadXml = "LoadStatisticheAgentiMese.php?ordinaper=$colToSort&direction=$direction" ; $header = "AGENTE,GEN,FEB,MAR,APR,MAG,GIU,LUG,AGO,SET,OTT,NOV,DIC,TOTALE" ; $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] . ",$Totale" ; $strSort = "str,int,int,int,int,int,int,int,int,int,int,int,int,int" ; $iniWP = "22,6,6,6,6,6,6,6,6,6,6,6,6,6" ; $setColType = "ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro" ; $setColAlign = "center,center,center,center,center,center,center,center,center,center,center,center,center,center" ; ?>
| Ordini per Agente per Mese | Grafici - Totale Generale | Grafici - Distribuzione per Mese |