Changeset 342 for trunk/admin/modules
- Timestamp:
- Nov 18, 2020, 11:05:49 PM (4 years ago)
- Location:
- trunk/admin/modules/Elezioni
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/modules/Elezioni/ele_colora_sez.php
r339 r342 1 1 <?php 2 2 if (!isset($_SESSION['aid'])) die ("You can't access this file directly..."); 3 global $id_cons,$id_circ,$id_sez,$dbi,$prefix,$genere,$id_cons_gen ,$circo;3 global $id_cons,$id_circ,$id_sez,$dbi,$prefix,$genere,$id_cons_gen; 4 4 5 if ($circo) $iscirco="and id_circ=$id_circ"; else $iscirco=''; 6 $sql="SELECT t1.voto_c FROM ".$prefix."_ele_tipo as t1 left join ".$prefix."_ele_consultazione as t2 on t1.tipo_cons=t2.tipo_cons where id_cons_gen='$id_cons_gen'"; 5 $sql="SELECT t1.voto_c,circo FROM ".$prefix."_ele_tipo as t1 left join ".$prefix."_ele_consultazione as t2 on t1.tipo_cons=t2.tipo_cons where id_cons_gen='$id_cons_gen'"; 7 6 $res = $dbi->prepare("$sql"); 8 7 $res->execute(); 9 list($votoc)=$res->fetch(PDO::FETCH_NUM); 8 list($votoc,$circo)=$res->fetch(PDO::FETCH_NUM); 9 if ($circo) $iscirco="and id_circ=$id_circ"; else $iscirco=''; 10 10 $sql="select * from ".$prefix."_ele_controlli where id_cons='$id_cons' and id_sez='$id_sez'"; 11 11 $resc = $dbi->prepare("$sql"); … … 33 33 $sql="UPDATE ".$prefix."_ele_sezioni set colore='#99CC33' where id_cons='$id_cons' and id_sez='$id_sez'"; #VERDE 34 34 $res = $dbi->prepare("$sql"); 35 $res->execute(); 35 $res->execute(); 36 36 } 37 37 if(!$sezstat) { #liste 38 $sql="SELECT id_lista FROM ".$prefix."_ele_voti_lista where id_cons='$id_cons' and id_sez='$id_sez'"; 38 if($genere==2) 39 $sql="SELECT id_gruppo FROM ".$prefix."_ele_voti_gruppo where id_cons='$id_cons' and id_sez='$id_sez'"; 40 else 41 $sql="SELECT id_lista FROM ".$prefix."_ele_voti_lista where id_cons='$id_cons' and id_sez='$id_sez'"; 39 42 $res = $dbi->prepare("$sql"); 40 43 $res->execute(); -
trunk/admin/modules/Elezioni/ele_voti.php
r340 r342 298 298 // Menu spoglio 299 299 //************************************ 300 $sql="select id_cons,id_sez,id_sede,num_sez, maschi, femmine from ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sez='$id_sez'"; 301 $result = $dbi->prepare("$sql"); 302 $result->execute(); 303 304 305 list($id_cons2,$id_sez2,$id_sede,$num_sez, $maschi, $femmine) = $result->fetch(PDO::FETCH_NUM); 306 307 echo "<hr><table><tr><td width=\"200\"><font size =\"4\" color=\"black\" align=\"left\"><b>Sezione N. $num_sez</b></font></td><td><table><tr>"; 308 echo "\n<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=1\">"._AFFLUENZE."</a></b></p></td>\n"; 309 if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){ 310 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=4\">"._GRUPPO."</a></b></p></td>\n"; 311 } 312 if(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){ 313 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=3\">"._LISTA."</a></b></p></td>\n"; 314 } 315 echo "</tr></table></td></tr></table><hr>\n"; 300 $sql="select id_cons,id_sez,id_sede,num_sez, maschi, femmine from ".$prefix."_ele_sezioni where id_cons='$id_cons' and id_sez='$id_sez'"; 301 $result = $dbi->prepare("$sql"); 302 $result->execute(); 303 list($id_cons2,$id_sez2,$id_sede,$num_sez, $maschi, $femmine) = $result->fetch(PDO::FETCH_NUM); 304 echo "<hr><table><tr><td width=\"200\"><font size =\"4\" color=\"black\" align=\"left\"><b>Sezione N. $num_sez</b></font></td><td><table><tr>"; 305 echo "\n<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=1\">"._AFFLUENZE."</a></b></p></td>\n"; 306 if(!($genere==4) and !($votog)){ //if(!($genere==4) and !($tipo_cons==10 or $tipo_cons==11)){ 307 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=4\">"._GRUPPO."</a></b></p></td>\n"; 308 } 309 if($genere==2 and $votog) 310 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=4\">"._GRUPPO."</a></b></p></td>\n"; 311 elseif(($genere>2 or $votog)){ //if(($genere>2 or $tipo_cons==10 or $tipo_cons==11)){ 312 echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><p style=\"margin-left:10px;margin-right:10px;\"><b><a href=\"admin.php?op=voti&id_cons_gen=$id_cons_gen&id_sez=$id_sez&id_circ=$id_circ&id_sede=$id_sede&do=spoglio&ops=3\">"._LISTA."</a></b></p></td>\n"; 313 } 314 echo "</tr></table></td></tr></table><hr>\n"; 316 315 317 316 ############# … … 322 321 } else{ 323 322 $sql="SELECT data, orario from ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc,orario desc limit 0,1"; 324 $res = $dbi->prepare("$sql"); 325 $res->execute(); 326 327 323 $res = $dbi->prepare("$sql"); 324 $res->execute(); 328 325 list($data,$orario)=$res->fetch(PDO::FETCH_NUM); 329 326 $sql="SELECT voti_complessivi from ".$prefix."_ele_voti_parziale where id_sez='$id_sez' and orario='$orario' and data='$data'"; 330 $res = $dbi->prepare("$sql"); 331 $res->execute(); 332 333 327 $res = $dbi->prepare("$sql"); 328 $res->execute(); 334 329 list($voti) = $res->fetch(PDO::FETCH_NUM); 335 330 if (!$voti) $ops=1; … … 337 332 if($genere<4){ 338 333 $sql="SELECT sum(voti) from ".$prefix."_ele_voti_gruppo where id_sez='$id_sez'"; 339 $res = $dbi->prepare("$sql"); 340 $res->execute(); 341 342 334 $res = $dbi->prepare("$sql"); 335 $res->execute(); 343 336 list($voti) = $res->fetch(PDO::FETCH_NUM); 344 337 if ($voti==0 or $genere<3) $ops=4;
Note:
See TracChangeset
for help on using the changeset viewer.