"; $siteistat=$id_comune; if($xls!=1) $datipdf .= "
";
$datipdf .= ""._COMUNE." $descr_com "._RISULTA." "._CONSULTA." "; $datipdf .= " $descr_cons"._DISCLAIMER.""; if($xls!=1) $datipdf .= " |
"._SEZIONI." | "._ISCR_SEZ." | "; # $ressomma = mysql_query("SELECT data,orario,sum(voti_complessivi),sum(voti_uomini),sum(voti_donne) from ".$prefix."_ele_voti_parziale where id_cons=$id_cons $cond group by data,orario,id_gruppo", $dbi); $resuo = mysql_query("SELECT orario,data FROM ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc,orario desc limit 0,1", $dbi); list($ultora,$ultdata)=mysql_fetch_row($resuo); $ressomma = mysql_query("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos $cond group by t3.data,t3.orario,t3.id_gruppo order by t3.data,t3.orario",$dbi); #die("select t3.data,t3.orario,sum(t3.voti_complessivi),sum(t3.voti_uomini),sum(t3.voti_donne) from ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t3.id_cons='$id_cons' $circos group by t3.data,t3.orario,t3.id_gruppo "); $perc_u=array(); $perc_d=array(); $perc_c=array(); while (list($data,$ora,$somma,$votiu,$votid) = mysql_fetch_row($ressomma)) { $perc_u[$data.$ora]=0; $perc_d[$data.$ora]=0; $perc_c[$data.$ora]=0; if($votiu or $votid) # if(($data==$ultdata) and ($ora==$ultora)) { $tot[$data.$ora]="
".number_format($votiu,0,',','.')." | ".number_format($votid,0,',','.')." | ".number_format($somma,0,',','.')." |
"._UOMINI." | "._DONNE." | "._COMPLESSIVI." |
---|
".$perc_u[$data1.$ora1]."% | ".$perc_d[$data1.$ora1]."% | ".$perc_c[$data1.$ora1]."% |
$uomini | $donne | $complessivi |