Changeset 265 for trunk/client/modules/Elezioni/menu.php
- Timestamp:
- Apr 13, 2019, 8:05:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/menu.php
r254 r265 19 19 $button="<br /><object><noscript><div><input name=\"vai\" type=\"image\" src=\"modules/Elezioni/images/ok2.jpg\" alt=\"ok\" title=\"ok\" /></div></noscript></object>"; 20 20 21 $sqlcomu="select descrizione,fascia from ".$prefix."_ele_comuni where id_comune=$id_comune"; 22 $rescomu= mysql_query("$sqlcomu",$dbi); 23 list($descr_com,$fascia)=mysql_fetch_row($rescomu); 21 $sql="select descrizione,fascia from ".$prefix."_ele_comuni where id_comune=$id_comune"; 22 $rescomu = $dbi->prepare("$sql"); 23 $rescomu->execute(); 24 25 list($descr_com,$fascia)=$rescomu->fetch(PDO::FETCH_NUM); 24 26 25 27 … … 50 52 if ($multicomune=='1') 51 53 { 52 $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"; 53 54 $rescomu= mysql_query("$sqlcomu",$dbi); 55 $esiste_multi=mysql_num_rows($rescomu); 54 $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"; 55 56 $sql="$sqlcomu"; 57 $rescomu = $dbi->prepare("$sql"); 58 $rescomu->execute(); 59 60 $esiste_multi=$rescomu->rowCount(); 56 61 if ($esiste_multi>=1) { 57 62 echo " <td> … … 67 72 "; 68 73 69 while (list($id,$descrizione,)= mysql_fetch_row($rescomu)){74 while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){ 70 75 $sel=($id == $id_comune) ? "selected=\"selected\"":""; 71 76 echo "<option value=\"$id\" $sel >$descrizione</option>"; … … 84 89 85 90 echo "<td >"; 86 $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); 87 $esiste=mysql_num_rows($res); 91 $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" ; 92 $res = $dbi->prepare("$sql"); 93 $res->execute(); 94 95 $esiste=$res->rowCount(); 88 96 //se esiste consultazione fa vedere i dati 89 97 if ($esiste>=1) { … … 99 107 <select name=\"id_cons_gen\" class=\"moduloform\" onchange=\"javascript:top.location.href='modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen='+this.options[this.options.selectedIndex].value\">"; 100 108 101 while(list($id,$descrizione) = mysql_fetch_row($res)) {109 while(list($id,$descrizione) = $res->fetch(PDO::FETCH_NUM)) { 102 110 103 111 $sel = ($id == $id_cons_gen) ? "selected=\"selected\"":""; … … 149 157 Scelta Dati 150 158 ***********************************/ 151 $res = mysql_query("SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ", $dbi); 152 list($num_circ) = mysql_fetch_row($res); 159 $sql="SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' "; 160 $res = $dbi->prepare("$sql"); 161 $res->execute(); 162 163 list($num_circ) = $res->fetch(PDO::FETCH_NUM); 153 164 154 165 echo "<td>"; … … 188 199 } 189 200 } 190 $resc = mysql_query("SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'" , $dbi); 191 list($chiusa)=mysql_fetch_row($resc); 201 $sql="SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'" ; 202 $resc = $dbi->prepare("$sql"); 203 $resc->execute(); 204 205 list($chiusa)=$resc->fetch(PDO::FETCH_NUM); 192 206 if ($hondt>=1 and $chiusa==1) { 193 207 echo "<option value=\"consiglieri\" ".$temp['consiglieri']." >"._CALCONS."</option>";
Note:
See TracChangeset
for help on using the changeset viewer.