Index: trunk/client/modules/Elezioni/index.php
===================================================================
--- trunk/client/modules/Elezioni/index.php	(revision 417)
+++ trunk/client/modules/Elezioni/index.php	(revision 418)
@@ -1387,6 +1387,6 @@
 ########## icona rss da sistemare in un altra parte con calma...
 global $circo;
-if($genere!=0 && $id_circ==''){ // no referendum ne circoscrizioni
-	echo "<div align=\"right\"><a href=\"modules.php?id_cons_gen=$id_cons_gen&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index&amp;op=rss&amp;rss=1\"><img class =\"nobordo\" width=\"60\" src=\"modules/Elezioni/images/valid-rss.png\" alt=\"rss\"/></a></div>";
+if($genere!=0 && !$circo){ // no referendum ne circoscrizioni
+	echo "<div align=\"right\"><a href=\"modules.php?op=rss&amp;rss=1&amp;id_cons_gen=$id_cons_gen&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index\"><img class =\"nobordo\" width=\"60\" src=\"modules/Elezioni/images/valid-rss.png\" alt=\"rss\"/></a></div>";
 }
 
Index: trunk/client/modules/Elezioni/rss.php
===================================================================
--- trunk/client/modules/Elezioni/rss.php	(revision 417)
+++ trunk/client/modules/Elezioni/rss.php	(revision 418)
@@ -27,16 +27,18 @@
 
 	list($descr_com) = $res->fetch(PDO::FETCH_NUM);
-
-
-
-echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+//URL
+$PHP_SELF=$_SERVER['PHP_SELF'];
+$siteurl.=$PHP_SELF;
+
+echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
 echo "<rss version=\"2.0\" \n";
 echo "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
 echo "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
 echo "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
+echo "  xmlns:atom=\"http://www.w3.org/2005/Atom\"\n";
 echo "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n\n";
 echo "<channel>\n";
 echo "<title>".htmlspecialchars($descr_com)." - $descr_cons</title>\n";
-echo "<link>".htmlspecialchars($siteurl)."</link>\n";
+echo "<link>https://".htmlspecialchars($siteurl)."</link>\n";
 echo "<description>".$sitename."</description>\n";
 echo "<dc:language>it-IT</dc:language>\n";
@@ -46,6 +48,7 @@
 echo "<sy:updateFrequency>1</sy:updateFrequency>\n";
 echo "<sy:updateBase>".$now."</sy:updateBase>\n\n";
-
-list ($gruppo,$pro,$titolo)=grupporss();
+echo "<atom:link href=\"https://$siteurl?op=rss&amp;rss=1&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index&amp;id_cons_gen=$id_cons_gen\" rel=\"self\" type=\"application/rss+xml\" />\n";
+
+list ($gruppo,$pro,$titolo,$idg)=grupporss();
 
 
@@ -58,5 +61,6 @@
     echo "<item>\n";
     echo "<title>".$gruppo[$x]." ".$pro[$x] ."% </title>\n";
-    echo "<link>$siteurl/modules.php?id_cons_gen=$id_cons_gen&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index</link>\n";
+    echo "<link>https://$siteurl?op=rss&amp;rss=1&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index&amp;id_cons_gen=$id_cons_gen</link>\n";
+	echo "<guid>https://$siteurl?op=rss&amp;rss=1&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index&amp;id_cons_gen=$id_cons_gen&amp;gruppo=$idg[$x]</guid>\n";
     
 #    echo "<description><![CDATA['aa']]></description>\n";
@@ -89,5 +93,5 @@
 	if ($genere==4){$tab="ele_voti_lista";}
 	if ($votog){$tab="ele_voti_lista";}
-	$sql="select *  from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";
+	$sql="select id_sez  from ".$prefix."_$tab where id_cons='$id_cons' group by id_sez ";
 	$res = $dbi->prepare("$sql");
 	$res->execute();
@@ -138,5 +142,5 @@
         			left join ".$prefix."_$tab as t2 on (t1.id_gruppo=t2.id_gruppo)
 				where 	t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1
-				group by t2.id_gruppo
+				group by t1.id_gruppo,t1.num_gruppo,t1.descrizione
 				order by somma desc";
 				$res = $dbi->prepare("$sql");
@@ -151,5 +155,5 @@
         		left join ".$prefix."_$tab as t2 on (t1.id_lista=t2.id_lista)
 				where 	t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons
-				group by t2.id_lista
+				group by t1.id_lista,t1.num_lista,t1.descrizione
 				order by somma desc";
 				$res = $dbi->prepare("$sql");
@@ -176,5 +180,5 @@
 
 
-					
+				$idg[$i]=$id;	
 				
 
@@ -196,5 +200,5 @@
 		
 
-		return array($gruppo,$pro,$titolo);
+		return array($gruppo,$pro,$titolo,$idg);
                 
                
