Changeset 265 for trunk/client/temi/spectral/menu.php
- Timestamp:
- Apr 13, 2019, 8:05:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/temi/spectral/menu.php
r254 r265 26 26 $button="<br /><object><noscript><div><input name=\"vai\" type=\"image\" src=\"modules/Elezioni/images/ok2.jpg\" alt=\"ok\" title=\"ok\" /></div></noscript></object>"; 27 27 28 $sqlcomu="select descrizione from ".$prefix."_ele_comuni where id_comune=$id_comune"; 29 $rescomu= mysql_query("$sqlcomu",$dbi); 30 list($descr_com)=mysql_fetch_row($rescomu); 31 $sqlcomu="select id_fascia from ".$prefix."_ele_cons_comune where id_comune=$id_comune and id_cons='$id_cons'"; 32 $rescomu= mysql_query("$sqlcomu",$dbi); 33 list($fascia)=mysql_fetch_row($rescomu); 28 $sql="select descrizione from ".$prefix."_ele_comuni where id_comune=$id_comune"; 29 $rescomu = $dbi->prepare("$sql"); 30 $rescomu->execute(); 31 32 list($descr_com)=$rescomu->fetch(PDO::FETCH_NUM); 33 $sql="select id_fascia from ".$prefix."_ele_cons_comune where id_comune=$id_comune and id_cons='$id_cons'"; 34 $rescomu = $dbi->prepare("$sql"); 35 $rescomu->execute(); 36 37 list($fascia)=$rescomu->fetch(PDO::FETCH_NUM); 34 38 echo ' 35 39 <div id="contiene"> … … 52 56 if ($multicomune=='1') 53 57 { 54 $sqlcomu="select t1.id_comune,t1.descrizione,count(0) from ".$prefix."_ele_comuni as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_comune=t2.id_comune and t2.chiusa!='2' group by t1.id_comune,t1.descrizione order by t1.descrizione asc"; 55 $rescomu= mysql_query("$sqlcomu",$dbi); 56 $esiste_multi=mysql_num_rows($rescomu); 58 $sql="select t1.id_comune,t1.descrizione,count(0) from ".$prefix."_ele_comuni as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_comune=t2.id_comune and t2.chiusa!='2' group by t1.id_comune,t1.descrizione order by t1.descrizione asc"; 59 $rescomu = $dbi->prepare("$sql"); 60 $rescomu->execute(); 61 62 $esiste_multi=$rescomu->rowCount(); 57 63 if ($esiste_multi>=1) { 58 64 echo " <li> … … 61 67 <ul>"; 62 68 63 while (list($id,$descrizione,)= mysql_fetch_row($rescomu)){69 while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){ 64 70 echo "<li><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id&file=index\"> 65 71 <img src=\"modules/Elezioni/images/logo.gif\" width=\"16\" height=\"16\" class=\"nobordo\"> $descrizione</a></li>"; … … 76 82 ***********************************/ 77 83 78 $res = mysql_query("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 t2.chiusa!='2' order by t1.data_fine desc" , $dbi); 79 $esiste=mysql_num_rows($res); 84 $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 t2.chiusa!='2' order by t1.data_fine desc" ; 85 $res = $dbi->prepare("$sql"); 86 $res->execute(); 87 88 $esiste=$res->rowCount(); 80 89 //se esiste consultazione fa vedere i dati 81 90 if ($esiste>=1) { … … 84 93 <ul>"; 85 94 86 while(list($id,$descrizione) = mysql_fetch_row($res)) {95 while(list($id,$descrizione) = $res->fetch(PDO::FETCH_NUM)) { 87 96 echo "<li class=\"icon matita\"><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id\"> 88 97 ".substr($descrizione,0,31)."</a></li>"; … … 124 133 ***********************************/ 125 134 126 $res = mysql_query("SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ", $dbi); 127 list($num_circ) = mysql_fetch_row($res); 135 $sql="SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' "; 136 $res = $dbi->prepare("$sql"); 137 $res->execute(); 138 139 list($num_circ) = $res->fetch(PDO::FETCH_NUM); 128 140 echo " <li><a href=\"#\"><strong>"._RISULTATI."</strong></a> 129 141 <ul>"; … … 153 165 } 154 166 } 155 $resc = mysql_query("SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'" , $dbi); 156 list($chiusa)=mysql_fetch_row($resc); 167 $sql="SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'" ; 168 $resc = $dbi->prepare("$sql"); 169 $resc->execute(); 170 171 list($chiusa)=$resc->fetch(PDO::FETCH_NUM); 157 172 158 173 if ($hondt>=1 and $chiusa==1) {
Note:
See TracChangeset
for help on using the changeset viewer.