Changeset 418 for trunk/client


Ignore:
Timestamp:
May 29, 2024, 1:45:09 PM (6 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

Location:
trunk/client
Files:
4 edited

Legend:

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

    r416 r418  
    13871387########## icona rss da sistemare in un altra parte con calma...
    13881388global $circo;
    1389 if($genere!=0 && $id_circ==''){ // no referendum ne circoscrizioni
    1390         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>";
     1389if($genere!=0 && !$circo){ // no referendum ne circoscrizioni
     1390        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>";
    13911391}
    13921392
  • 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               
  • trunk/client/temi/Futura2/function_theme.php

    r376 r418  
    975975        if ($circo) $circos="and t2.id_circ='$id_circ'";
    976976        else $circos="";
    977         if (!$csv)
    978 
    979  
    980                 // numero sezioni scrutinate
    981                 //if ($circo)$circos="and id_circ='$id_circ'";
    982         if (!isset($data1)) $data1='';
    983         if (!isset($ora_ril)) $ora_ril='';
    984                 $sql="SELECT count(data) FROM ".$prefix."_ele_voti_parziale as t3 left join ".$prefix."_ele_sezioni as t1 on t3.id_sez=t1.id_sez left join ".$prefix."_ele_sede as t2 on t1.id_sede=t2.id_sede where t1.id_cons='$id_cons' and data='$data1' and orario='$ora_ril' $circos group by t3.id_gruppo";
    985         $res1 = $dbi->prepare("$sql");
    986         $res1->execute();
    987 # mysql_query("select *  from ".$prefix."_ele_voti_parziale where id_cons='$id_cons' $circos  group by id_sez ",$dbi);
    988                 $numero=$res1->rowCount();
    989                 $sql="SELECT t1.* FROM ".$prefix."_ele_sezioni as t1, ".$prefix."_ele_sede as t2 where t1.id_cons='$id_cons' and t1.id_sede=t2.id_sede $circos order by num_sez";
     977        $sql="SELECT t1.* FROM ".$prefix."_ele_sezioni as t1, ".$prefix."_ele_sede as t2 where t1.id_cons='$id_cons' and t1.id_sede=t2.id_sede $circos order by num_sez";
    990978        $res2 = $dbi->prepare("$sql");
    991979        $res2->execute();
    992 #mysql_query("select *  from ".$prefix."_ele_sezioni where id_cons='$id_cons' $circos",$dbi);
    993                 $sezioni=$res2->rowCount();
    994                
    995        
    996        
    997                
    998        
     980        $sezioni=$res2->rowCount();
     981
    999982// barre
    1000983    $l_size = getimagesize("modules/Elezioni/images/barre/leftbar.gif");
  • trunk/client/versione.php

    r417 r418  
    11<?php
    22
    3 $versione = "3.0 rev 417";
     3$versione = "3.0 rev 418";
    44$version_number = $versione;
    5 $datarel = "24 maggio 2024";
     5$datarel = "29 maggio 2024";
    66$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    77
Note: See TracChangeset for help on using the changeset viewer.