Changeset 265 for trunk/client/modules/Elezioni/blocchi/04_sezioni.php
- Timestamp:
- Apr 13, 2019, 8:05:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/blocchi/04_sezioni.php
r241 r265 11 11 } 12 12 global $prefix, $dbi,$id_cons_gen; 13 $sql = mysql_query("select chiusa from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen'",$dbi); 14 list($chiusa) = mysql_fetch_row($sql); 13 $sql = "select chiusa from ".$prefix."_ele_cons_comune where id_cons_gen='$id_cons_gen'"; 14 $res = $dbi->prepare("$sql"); 15 $res->execute(); 16 17 list($chiusa) = $res->fetch(PDO::FETCH_NUM); 15 18 16 19 //if($chiusa!='1') numeri_sezione(); # se la consultazione non Ú chiusa … … 33 36 34 37 # numero sezioni 35 $res = mysql_query("select t1.id_sez,t1.num_sez from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' $circos order by t1.num_sez",$dbi); 36 $max = mysql_num_rows($res); 38 $sql="select t1.id_sez,t1.num_sez from ".$prefix."_ele_sezioni as t1 left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' $circos order by t1.num_sez"; 39 $res = $dbi->prepare("$sql"); 40 $res->execute(); 41 42 $max = $res->rowCount(); 37 43 if(!isset($html)) $html=''; 38 44 $html = "\n<table style=\"margin:0px auto;border:0px; width:90%\"><tr>"; 39 45 40 46 $i=0;$id_circ_old=0;$e=0; 41 while(list($sez_id, $sez_num) = mysql_fetch_row($res)) {47 while(list($sez_id, $sez_num) = $res->fetch(PDO::FETCH_NUM)) { 42 48 $i++; 43 49 /****************************************************************/ … … 57 63 #colora la sezione 58 64 # verifica se la sezione Ú scrutinata 59 $res2 = mysql_query("select * from ".$prefix."_ele_voti_".$tab." where id_sez='$sez_id'",$dbi); 60 $numero=mysql_num_rows($res2); 65 $sql="select * from ".$prefix."_ele_voti_".$tab." where id_sez='$sez_id'"; 66 $res2 = $dbi->prepare("$sql"); 67 $res2->execute(); 68 69 $numero=$res2->rowCount(); 61 70 if ($numero!=0){$e++;$bgsez="#FFFF00";}else{$bgsez="";} 62 71
Note:
See TracChangeset
for help on using the changeset viewer.