Changeset 257 for trunk/admin/temi/facebook
- Timestamp:
- Feb 9, 2019, 8:45:24 PM (6 years ago)
- Location:
- trunk/admin/temi/facebook
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/temi/facebook/index.php
r80 r257 95 95 // Blocco link 96 96 97 $result = mysql_query("select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid ", $dbi); 98 if (mysql_num_rows($result) == 0) { 97 $sql="select mid, title, preamble, content,editimage from ".$prefix."_ele_link where id_cons='$id_cons' order by mid"; 98 $sth = $dbi->prepare("$sql"); 99 $sth->execute(); 100 $row = $sth->fetchAll(); 101 if ($sth->rowCount() == 0) { 99 102 echo "</td></tr></table>"; 100 103 echo "</div></td><td>"; … … 103 106 } else { 104 107 echo "<h5>"._LINK."</h5><p>"; 105 while (list($mid, $title, $preamble,$content, $editimage) = mysql_fetch_row($result)) { 108 foreach($row as $row2) { 109 list($mid, $title,$preamble,$content,$editimage) = explode($row2)) { 106 110 if ($title != "" && $content != "") { 107 111 $content = stripslashes($content); -
trunk/admin/temi/facebook/menu.php
r34 r257 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 $sth = $dbi->prepare("$sql"); 23 $sth->execute(); 24 $row = $sth->fetch(PDO::FETCH_BOTH); 25 list($descr_com,$fascia)=explode($row); 24 26 echo '<style type="text/css"> 25 27 html,body{margin:0;padding:0} … … 52 54 if ($multicomune=='1') 53 55 { 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 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); 56 $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 group by t1.id_comune,t1.descrizione order by t1.descrizione asc"; 57 $sth = $dbi->prepare("$sql"); 58 $sth->execute(); 59 $row = $sth->fetch(PDO::FETCH_BOTH); 60 $esiste_multi=mysql_num_rows($rescomu); 57 61 if ($esiste_multi>=1) { 58 62 echo " <li> … … 61 65 <ul>"; 62 66 63 while (list($id,$descrizione,)= mysql_fetch_row($rescomu)){67 while (list($id,$descrizione,)=$sth->fetch(PDO::FETCH_NUM)){ 64 68 echo "<li><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id&file=index\">$descrizione</a></li>"; 65 69 } … … 75 79 ***********************************/ 76 80 77 $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); 78 $esiste=mysql_num_rows($res); 81 $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"; 82 $sth = $dbi->prepare("$sql"); 83 $sth->execute(); 84 $esiste=$sth->rowCount(); 79 85 //se esiste consultazione fa vedere i dati 80 86 if ($esiste>=1) { … … 83 89 <ul>"; 84 90 85 while(list($id,$descrizione) = mysql_fetch_row($res)) {91 while(list($id,$descrizione) = $sth->fetch(PDO::FETCH_NUM)) { 86 92 echo "<li><a href=\"modules.php?op=gruppo&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id\"> 87 93 ".substr($descrizione,0,31)."</a></li>"; … … 124 130 125 131 $res = mysql_query("SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' ", $dbi); 126 list($num_circ) = mysql_fetch_row($res); 132 $sql = "SELECT count(0) FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons'"; 133 $sth = $dbi->prepare("$sql"); 134 $sth->execute(); 135 list($num_circ) = $sth->fetch(PDO::FETCH_NUM); 127 136 echo " <li><a href=\"#\"><strong>"._RISULTATI."</strong></a> 128 137 <ul>";
Note:
See TracChangeset
for help on using the changeset viewer.