$val) { if($key=='ops') $ops=intval($val); if($key=='id_lista') $id_lista=intval($val); } include_once("header.php"); #$nometema=$tema; #require_once("class/db/db.php"); //classe db global $tema,$id_comune,$descr_cons,$multicomune,$dbi,$prefix,$currentlang,$ops,$id_sez,$id_cons,$id_cons_gen; include_once("modules/Elezioni/query.sql"); #if(($tema='Futura2' and !$id_sez) or $_SESSION['id_cons']!=$id_cons) {Header("Location: admin.php?id_comune=$id_comune&op=logout&is=$id_sez"); die();} #die( "OP: $op - aid:".$_SESSION['aid']." - tema:$tema"); include_once("modules/Elezioni/ele_spoglio.php"); $row=setconsultazione(); $sql="select id_sez from ".$prefix."_ele_operatori where aid='$aid' and id_cons=$id_cons"; $res = $dbi->prepare("$sql"); $res->execute(); list($id_sez) = $res->fetch(PDO::FETCH_NUM);#include("TEST:$id_sez:$sql:"); if (!$id_sez) { $BASE=substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['REQUEST_URI'], "/")-18); Header("Location: ".$BASE."admin.php?op=logout&msglogout=4"); } if(isset($row[0])) { $tipo_cons=$row[0]; $descr_cons=$row[1]; $id_cons_gen=$row[2]; } else { $tipo_cons=0; $descr_cons=''; $id_cons_gen=0; } $row=tipocons(); if(isset($row[0])) { $genere=$row[0];$votog=$row[1];$votol=$row[2];$votoc=$row[3];$conscirc=$row[4]; } else { $genere=0;$votog=0;$votol=0;$votoc=0;$conscirc=0; } include("temi/$tema/config.php"); #if($colortheme=='')$colortheme="c"; # descrizione comune if(!$id_comune or $id_comune=='') $id_comune=$siteistat; $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); #include_once("header.php"); testata(); #################################### function testata(){ #################################### global $op,$tema,$dbi,$file,$bgcolor,$sitename,$prefix,$blocco,$lang,$siteistat,$id_cons_gen,$descr_cons,$minsez,$offsetsez,$multicomune,$id_comune,$multicomune,$rss,$colortheme,$descr_com; global $id_cons,$do,$id_circ,$id_sede,$id_sez,$ops,$ov,$mv,$gv,$msv,$av,$votog,$genere,$aid,$bgcolor1,$language; include("temi/$tema/function_theme.php"); $logo=''; echo "\n"; # if(!$ops) $ops=1; $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); echo '
'; echo '

Elezioni on line

'; $oggi=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y"))); $sql="select t1.id_cons_gen,t1.descrizione from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t1.data_fine>'$oggi' and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and id_sez>0 and permessi>0)"; $rese = $dbi->prepare("$sql"); $rese->execute(); if ($rese->rowCount()>1){ echo "
"; echo ""; echo ""; echo "
"; } $sql="select tipo from ".$prefix."_ele_controlli where id_sez='$id_sez' group by tipo"; $rese = $dbi->prepare("$sql"); $rese->execute(); $bordoini="style='cursor: pointer;"; $errbordoa=''; $errbordog=''; $errbordol=''; while (list($tipo)=$rese->fetch(PDO::FETCH_NUM)) { if ($tipo=='affluenze') $errbordoa="border: 6px solid; border-color: rgb(255, 0, 0);"; if ($tipo=='gruppo' or $tipo=='referendum') $errbordog="border: 6px solid; border-color: rgb(255, 0, 0);"; if ($tipo=='lista') $errbordol="border: 6px solid; border-color: rgb(255, 0, 0);"; } $bordoa=$bordoini.$errbordoa."'"; $bordog=$bordoini.$errbordog."'"; $bordol=$bordoini.$errbordol."'"; if($rese->rowCount()) $segna="style=\"background-color: #dd0000;\""; else $segna=''; if($ops=="4" ) {$bgcolorg="yellow"; $tcolorg='blue';} else {$bgcolorg="grey"; $tcolorg='white';} #$active_gruppo=" class=\"ui-btn-active\""; else $active_gruppo=''; if($ops=="3") {$bgcolorl="yellow"; $tcolorl='blue';} else {$bgcolorl="grey"; $tcolorl='white';} # $active_lista=" class=\"ui-btn-active\""; else $active_lista=''; if($ops=="1") {$bgcolora="yellow"; $tcolora='blue';} else {$bgcolora="grey"; $tcolora='white';} # $active_aff=" class=\"ui-btn-active\""; else $active_aff=''; echo "
"; echo'
'.$logo.' Comune di '.$descr_com.'

Consultazione: '.$descr_cons.'

'; ############### //************************************ // Menu spoglio //************************************ $sql="select id_sez from ".$prefix."_ele_operatori where id_cons='$id_cons' and aid='$aid' and id_comune='$id_comune'"; $sth = $dbi->prepare("$sql"); #echo $sql; $sth->execute(); list($id_sez)=$sth->fetch(PDO::FETCH_NUM); $sql="select id_cons,id_sez,id_sede,num_sez, maschi, femmine, colore from ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sez='$id_sez'"; $result = $dbi->prepare("$sql");#echo $sql; $result->execute(); list($id_cons2,$id_sez2,$id_sede,$num_sez, $maschi, $femmine, $colore) = $result->fetch(PDO::FETCH_NUM); echo "

Sezione
N. $num_sez
"; # echo "\n\n"; if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){ echo "\n"; } if($genere==2 and $votog) echo "\n"; elseif($genere>=4 and !$votoc) echo "\n"; elseif(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){ echo "\n"; } echo "

"._AFFLUENZE."

"._GRUPPO."

"._GRUPPO."

"._LISTAPREF."

"._LISTA."


\n"; if($ops=="1")votanti($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops,$ov,$mv,$gv,$msv,$av); elseif($ops=="3")preferenze($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops); elseif($ops=="4")preferenze_gruppi($id_cons,$do,$id_circ,$id_sede,$id_sez,$ops); footer_mon(); die(); } ######################################## function footer_mon(){ global $id_comune,$id_cons_gen,$tema,$colortheme,$rss; echo '
'; echo '
Eleonline di luciano apolito & roberto gigli
'; echo ""._ESCI.""; # echo ' Versione Desktop'; } ?>