Changeset 418 for trunk/client/modules
- Timestamp:
- May 29, 2024, 1:45:09 PM (6 months ago)
- Location:
- trunk/client/modules/Elezioni
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/index.php
r416 r418 1387 1387 ########## icona rss da sistemare in un altra parte con calma... 1388 1388 global $circo; 1389 if($genere!=0 && $id_circ==''){ // no referendum ne circoscrizioni1390 echo "<div align=\"right\"><a href=\"modules.php? id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=rss&rss=1\"><img class =\"nobordo\" width=\"60\" src=\"modules/Elezioni/images/valid-rss.png\" alt=\"rss\"/></a></div>";1389 if($genere!=0 && !$circo){ // no referendum ne circoscrizioni 1390 echo "<div align=\"right\"><a href=\"modules.php?op=rss&rss=1&id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index\"><img class =\"nobordo\" width=\"60\" src=\"modules/Elezioni/images/valid-rss.png\" alt=\"rss\"/></a></div>"; 1391 1391 } 1392 1392 -
trunk/client/modules/Elezioni/rss.php
r390 r418 27 27 28 28 list($descr_com) = $res->fetch(PDO::FETCH_NUM); 29 30 31 32 echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; 29 //URL 30 $PHP_SELF=$_SERVER['PHP_SELF']; 31 $siteurl.=$PHP_SELF; 32 33 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; 33 34 echo "<rss version=\"2.0\" \n"; 34 35 echo " xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n"; 35 36 echo " xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n"; 36 37 echo " xmlns:admin=\"http://webns.net/mvcb/\"\n"; 38 echo " xmlns:atom=\"http://www.w3.org/2005/Atom\"\n"; 37 39 echo " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n\n"; 38 40 echo "<channel>\n"; 39 41 echo "<title>".htmlspecialchars($descr_com)." - $descr_cons</title>\n"; 40 echo "<link> ".htmlspecialchars($siteurl)."</link>\n";42 echo "<link>https://".htmlspecialchars($siteurl)."</link>\n"; 41 43 echo "<description>".$sitename."</description>\n"; 42 44 echo "<dc:language>it-IT</dc:language>\n"; … … 46 48 echo "<sy:updateFrequency>1</sy:updateFrequency>\n"; 47 49 echo "<sy:updateBase>".$now."</sy:updateBase>\n\n"; 48 49 list ($gruppo,$pro,$titolo)=grupporss(); 50 echo "<atom:link href=\"https://$siteurl?op=rss&rss=1&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id_cons_gen\" rel=\"self\" type=\"application/rss+xml\" />\n"; 51 52 list ($gruppo,$pro,$titolo,$idg)=grupporss(); 50 53 51 54 … … 58 61 echo "<item>\n"; 59 62 echo "<title>".$gruppo[$x]." ".$pro[$x] ."% </title>\n"; 60 echo "<link>$siteurl/modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index</link>\n"; 63 echo "<link>https://$siteurl?op=rss&rss=1&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id_cons_gen</link>\n"; 64 echo "<guid>https://$siteurl?op=rss&rss=1&name=Elezioni&id_comune=$id_comune&file=index&id_cons_gen=$id_cons_gen&gruppo=$idg[$x]</guid>\n"; 61 65 62 66 # echo "<description><![CDATA['aa']]></description>\n"; … … 89 93 if ($genere==4){$tab="ele_voti_lista";} 90 94 if ($votog){$tab="ele_voti_lista";} 91 $sql="select *from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";95 $sql="select id_sez from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez "; 92 96 $res = $dbi->prepare("$sql"); 93 97 $res->execute(); … … 138 142 left join ".$prefix."_$tab as t2 on (t1.id_gruppo=t2.id_gruppo) 139 143 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1 140 group by t 2.id_gruppo144 group by t1.id_gruppo,t1.num_gruppo,t1.descrizione 141 145 order by somma desc"; 142 146 $res = $dbi->prepare("$sql"); … … 151 155 left join ".$prefix."_$tab as t2 on (t1.id_lista=t2.id_lista) 152 156 where t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons 153 group by t 2.id_lista157 group by t1.id_lista,t1.num_lista,t1.descrizione 154 158 order by somma desc"; 155 159 $res = $dbi->prepare("$sql"); … … 176 180 177 181 178 182 $idg[$i]=$id; 179 183 180 184 … … 196 200 197 201 198 return array($gruppo,$pro,$titolo );202 return array($gruppo,$pro,$titolo,$idg); 199 203 200 204
Note:
See TracChangeset
for help on using the changeset viewer.