Ignore:
Timestamp:
May 29, 2024, 1:45:09 PM (5 months ago)
Author:
roby
Message:
  • CLIENT

-- attivato l'rss per la pagina principale
-- eliminata una query non più in uso per il tema Futura2

  • INSTALL

-- corretta la creazione di una tabella del db

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/rss.php

    r390 r418  
    2727
    2828        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
     33echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
    3334echo "<rss version=\"2.0\" \n";
    3435echo "  xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";
    3536echo "  xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";
    3637echo "  xmlns:admin=\"http://webns.net/mvcb/\"\n";
     38echo "  xmlns:atom=\"http://www.w3.org/2005/Atom\"\n";
    3739echo "  xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n\n";
    3840echo "<channel>\n";
    3941echo "<title>".htmlspecialchars($descr_com)." - $descr_cons</title>\n";
    40 echo "<link>".htmlspecialchars($siteurl)."</link>\n";
     42echo "<link>https://".htmlspecialchars($siteurl)."</link>\n";
    4143echo "<description>".$sitename."</description>\n";
    4244echo "<dc:language>it-IT</dc:language>\n";
     
    4648echo "<sy:updateFrequency>1</sy:updateFrequency>\n";
    4749echo "<sy:updateBase>".$now."</sy:updateBase>\n\n";
    48 
    49 list ($gruppo,$pro,$titolo)=grupporss();
     50echo "<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";
     51
     52list ($gruppo,$pro,$titolo,$idg)=grupporss();
    5053
    5154
     
    5861    echo "<item>\n";
    5962    echo "<title>".$gruppo[$x]." ".$pro[$x] ."% </title>\n";
    60     echo "<link>$siteurl/modules.php?id_cons_gen=$id_cons_gen&amp;name=Elezioni&amp;id_comune=$id_comune&amp;file=index</link>\n";
     63    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";
     64        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";
    6165   
    6266#    echo "<description><![CDATA['aa']]></description>\n";
     
    8993        if ($genere==4){$tab="ele_voti_lista";}
    9094        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 ";
    9296        $res = $dbi->prepare("$sql");
    9397        $res->execute();
     
    138142                                left join ".$prefix."_$tab as t2 on (t1.id_gruppo=t2.id_gruppo)
    139143                                where   t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons $circondt1
    140                                 group by t2.id_gruppo
     144                                group by t1.id_gruppo,t1.num_gruppo,t1.descrizione
    141145                                order by somma desc";
    142146                                $res = $dbi->prepare("$sql");
     
    151155                        left join ".$prefix."_$tab as t2 on (t1.id_lista=t2.id_lista)
    152156                                where   t1.id_cons='$id_cons' and t1.id_cons=t2.id_cons
    153                                 group by t2.id_lista
     157                                group by t1.id_lista,t1.num_lista,t1.descrizione
    154158                                order by somma desc";
    155159                                $res = $dbi->prepare("$sql");
     
    176180
    177181
    178                                        
     182                                $idg[$i]=$id;   
    179183                               
    180184
     
    196200               
    197201
    198                 return array($gruppo,$pro,$titolo);
     202                return array($gruppo,$pro,$titolo,$idg);
    199203               
    200204               
Note: See TracChangeset for help on using the changeset viewer.