Changeset 265 for trunk/client/temi/facebook/menu.php
- Timestamp:
- Apr 13, 2019, 8:05:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/temi/facebook/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 $res = $dbi->prepare("$sql"); 35 $res->execute(); 36 37 list($fascia)=$rescomu->fetch(PDO::FETCH_NUM); 34 38 echo '<style type="text/css"> 35 39 html,body{margin:0;padding:0} … … 62 66 if ($multicomune=='1') 63 67 { 64 $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"; 65 $rescomu= mysql_query("$sqlcomu",$dbi); 66 $esiste_multi=mysql_num_rows($rescomu); 68 $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"; 69 $rescomu = $dbi->prepare("$sql"); 70 $rescomu->execute(); 71 72 $esiste_multi=$rescomu->rowCount(); 67 73 if ($esiste_multi>=1) { 68 74 echo " <li> … … 71 77 <ul>"; 72 78 73 while (list($id,$descrizione,)= mysql_fetch_row($rescomu)){79 while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){ 74 80 echo "<li><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id&file=index\"> 75 81 <img src=\"modules/Elezioni/images/logo.gif\" width=\"16\" height=\"16\" class=\"nobordo\"> $descrizione</a></li>"; … … 86 92 ***********************************/ 87 93 88 $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); 89 $esiste=mysql_num_rows($res); 94 $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" ; 95 $res = $dbi->prepare("$sql"); 96 $res->execute(); 97 98 $esiste=$res->rowCount(); 90 99 //se esiste consultazione fa vedere i dati 91 100 if ($esiste>=1) { … … 94 103 <ul>"; 95 104 96 while(list($id,$descrizione) = mysql_fetch_row($res)) {105 while(list($id,$descrizione) = $res->fetch(PDO::FETCH_NUM)) { 97 106 echo "<li class=\"icon matita\" ><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id\"> 98 107 ".substr($descrizione,0,33)."</a></li>"; … … 134 143 ***********************************/ 135 144 136 $res = mysql_query("SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ", $dbi); 137 list($num_circ) = mysql_fetch_row($res); 145 $sql="SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' "; 146 $res = $dbi->prepare("$sql"); 147 $res->execute(); 148 149 list($num_circ) = $res->fetch(PDO::FETCH_NUM); 138 150 echo " <li><a href=\"#\"><strong>"._RISULTATI."</strong></a> 139 151 <ul>"; … … 163 175 } 164 176 } 165 $resc = mysql_query("SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'" , $dbi); 166 list($chiusa)=mysql_fetch_row($resc); 177 $sql="SELECT chiusa FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons'" ; 178 $resc = $dbi->prepare("$sql"); 179 $resc->execute(); 180 181 list($chiusa)=$resc->fetch(PDO::FETCH_NUM); 167 182 168 183 if ($hondt>=1 and $chiusa==1) {
Note:
See TracChangeset
for help on using the changeset viewer.