prepare("$sql"); $res->execute(); list($tipo_cons,$genere,$id_cons) = $res->fetch(PDO::FETCH_NUM); if (isset($param['ops'])) $ops=$param['ops']; else $ops=''; if (isset($param['pag'])) $pag=$param['pag']; else $pag=0; if (isset($param['num_ref'])) $num_ref=$param['num_ref']; if (isset($param['num_refs'])) $num_refs=$param['num_refs']; $bgcolor2='#cacaca'; if (!IsSet($num_ref)) { $num_ref=1; $sql="SELECT id_gruppo from ".$prefix."_ele_gruppo where id_cons=$id_cons"; $resg = $dbi->prepare("$sql"); $resg->execute(); $num_refs= $resg->rowCount(); //quante pagine? } //************************************************************************** // ELE //************************************************************************** //controllo_finale($id_cons); global $prefix, $dbi,$id_circ,$lang, $fascia, $limite, $votog; include_once("modules/Elezioni/language/lang-$lang.php"); # testata if($csv==1){ include_once("modules/Elezioni/funzioni.php"); $sql="SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' "; $res = $dbi->prepare("$sql"); $res->execute(); list($descr_com) = $res->fetch(PDO::FETCH_NUM); $descr_com =stripslashes($descr_com); $datipdf .= "
$immagine | ";
$datipdf .= ""._COMUNE." $descr_com "._RISULTA." "._CONSULTA." "; $datipdf .= "$descr_cons "._DISCLAIMER.""; if($xls!=1) $datipdf .= " |
"._SEZIONI." | "._VOTIU." | "._VOTID." | "._VOTIE." | "; //testata con nomi dei campi if ($genere==0) { //se e' un referendum $riga3 .= ""._SI." | "._NO." | "; } elseif ((($genere==5) or ($genere==3)) and $pag==1){ $riga3 .= "Voti "._LISTE." | "; if(isdisgiunto()){ $riga3 .= "Voti "._PRESI." | "; $riga3 .= ""._SOLO_LISTA." | "; } // voto disgiunto if (!$votog) $riga3 .= ""._ASOLO_GRUPPO." | "; } $riga3 .= ""._VALIDI." | "._NULLI." | "._BIANCHI." | "._CONTESTATI." | " ."
$scrutinate | |||||||||||||
$num | ".number_format($votiu,0,',','.')." | ".number_format($votid,0,',','.')." | ".number_format($voti,0,',','.')." | "; if ($genere==0 or ((($genere==5) or ($genere==3)) and $pag==1)){ $righe .= "".number_format($si,0,',','.')." | "; if(isdisgiunto()){ $righe .= "".number_format($sindaco,0,',','.')." | "; $righe .= "".number_format($sololista,0,',','.')." | "; } if (!$votog) $righe .= "".number_format($no,0,',','.')." | "; } $righe .= "".number_format($validi,0,',','.')." | $nulli | $bianchi | $contestati | ||
"; $righe .="$scrutinate | |||||||||||||
"._VOTIU." | "._VOTID." | "._VOTIE." | "; //testata con nomi dei campi if ($genere==0) { //se e' un referendum $righet .= ""._SI." | "._NO." | "; } elseif ((($genere==5) or ($genere==3)) and $pag==1){ $righet .= "Voti "._LISTE." | "; if(isdisgiunto()){ $righet .= "Voti "._PRESI." | "; $righet .= ""._SOLO_LISTA." | "; } // voto disgiunto if (!$votog) $righet .= ""._ASOLO_GRUPPO." | "; } if($totel==0) $totelrip="0.00"; else $totelrip=number_format($tot_voti*100/$totel,2); if($totf==0) $totfrip="0.00"; else $totfrip=number_format($tot_d*100/$totf,2); if($totm==0) $totmrip="0.00"; else $totmrip=number_format($tot_u*100/$totm,2); $righet .= ""._VALIDI." | "._NULLI." | "._BIANCHI." | "._CONTESTATI." | " ."|
"._TOT." | ".number_format($tot_u,0,',','.')." (".$totmrip."%) | ".number_format($tot_d,0,',','.')." (".$totfrip."%) | ".number_format($tot_voti,0,',','.')." (".$totelrip."%) | ";
// se e' un referendum o una consultazione con raggruppamenti
if($tot_validi){
if ($genere==0 or ((($genere==5) or ($genere==3)) and $pag==1)){
$righet .= "".number_format($tot_si,0,',','.')." (".number_format($tot_si*100/$tot_validi,2)."%) | ";
if(isdisgiunto()){
$righet .="".number_format($tot_gruppo,0,',','.')." (".number_format($tot_gruppo*100/$tot_validi,2)."%) | ";
$righet .="".number_format($tot_sololista,0,',','.')." (".number_format($tot_sololista*100/$tot_validi,2)."%) | ";
}
if(!$votog) $righet .="".number_format($tot_no,0,',','.')." (".number_format($tot_no*100/$tot_validi,2)."%) | ";
}
$righet .= "".number_format($tot_validi,0,',','.')." (".($tot_voti ? number_format($tot_validi*100/$tot_voti,2):'0.00')."%) | "
.number_format($tot_nulli,0,',','.')." (".($tot_voti ? number_format($tot_nulli*100/$tot_voti,2):'0.00')."%) | ".number_format($tot_bianchi,0,',','.')." (".($tot_voti ? number_format($tot_bianchi*100/$tot_voti,2):'0.00')."%) | ".number_format($tot_contestati,0,',','.')." (".($tot_voti ? number_format($tot_contestati*100/$tot_voti,2):'0.00')."%) | ".number_format($tot_si,0,',','.')." (0.00%) | ".number_format($tot_no,0,',','.')." (0.00%) | ";}
$righet .= "0 (0.00%) | "
.number_format($tot_nulli,0,',','.')." (".($tot_voti ? number_format($tot_nulli*100/$tot_voti,2):'0,00')."%) | ".number_format($tot_bianchi,0,',','.')." (".($tot_voti ? number_format($tot_bianchi*100/$tot_voti,2):'0,00')."%) | ".number_format($tot_contestati,0,',','.')." (".($tot_voti ? number_format($tot_contestati*100/$tot_voti,2):'0,00')."%) | ";
}
}
$righe .= "