Changeset 347 for trunk


Ignore:
Timestamp:
May 14, 2021, 2:00:23 PM (3 years ago)
Author:
roby
Message:

Aggiornamento per compatibilità con php7.4

Location:
trunk
Files:
640 added
2 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/versione.php

    r346 r347  
    11<?php
    22
    3 $versione = "3.0 rev 346";
     3$versione = "3.0 rev 376";
    44$version_number = $versione;
    5 $datarel = "30 marzo 2021";
     5$datarel = "14 maggio 2021";
    66$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    77
  • trunk/client/header.php

    r251 r347  
    2525function head(){
    2626        global $csv,$tema,$tour,$sitename,$pagetitle,$simbolo,$siteurl,$siteistat;
    27         echo '
    28         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    29         <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
     27#       echo '
     28#       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     29#       <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
     30echo '<!DOCTYPE html><html lang="it">';
    3031        echo "<head>\n";
    3132        echo "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />";
     
    4243
    4344        echo "<link rel=\"stylesheet\" href=\"temi/$tema/style.css\" type=\"text/css\" />\n\n\n";
    44 
     45        include("temi/$tema/head.php");
    4546       
    4647
  • trunk/client/inc/csrf-magic/csrf-magic.php

    r253 r347  
    157157    $buffer = preg_replace('#(<form[^>]*method\s*=\s*["\']post["\'][^>]*>)#i', '$1' . $input, $buffer);
    158158    if ($GLOBALS['csrf']['frame-breaker']) {
    159         $buffer = str_ireplace('</head>', '<script type="text/javascript">if (top != self) {top.location.href = self.location.href;}</script></head>', $buffer);
     159        $buffer = str_ireplace('</head>', '<script>if (top != self) {top.location.href = self.location.href;}</script></head>', $buffer);
    160160    }
    161161    if ($js = $GLOBALS['csrf']['rewrite-js']) {
    162162        $buffer = str_ireplace(
    163163            '</head>',
    164             '<script type="text/javascript">'.
     164            '<script">'.
    165165                'var csrfMagicToken = "'.$tokens.'";'.
    166166                'var csrfMagicName = "'.$name.'";</script>'.
     
    168168            $buffer
    169169        );
    170         $script = '<script type="text/javascript">CsrfMagic.end();</script>';
     170        $script = '<script>CsrfMagic.end();</script>';
    171171        $buffer = str_ireplace('</body>', $script . '</body>', $buffer, $count);
    172172        if (!$count) {
  • trunk/client/inc/javascript.php

    r247 r347  
    4242# googlemaps per sezioni
    4343# variabili nel config.php
    44 # gkey= chiave google reperibile per il proprio sito qui
    45 # http://code.google.com/intl/it/apis/maps/signup.html
     44# gkey= chiave google informazioni su come reperirla per il proprio sito qui
     45# https://cloud.google.com/maps-platform/user-guide/account-changes/#no-plan
    4646# googlemaps 1=attivo 2: disattivo
    4747# funzione by eleonline.it
     
    5858# recupera gli inidirizzi
    5959    $id_sede=$_GET['id_sede'];
    60     $sql = mysql_query("SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi);
    61     list($comune) = mysql_fetch_row($sql);
    62     $sql = mysql_query("select indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede'", $dbi);
    63     list($indirizzo)=mysql_fetch_row($sql);
     60        $sql="SELECT descrizione FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ";
     61        $res = $dbi->prepare("$sql");
     62        $res->execute();
     63        list($comune) = $res->fetch(PDO::FETCH_NUM);
     64        $sql="SELECT indirizzo from ".$prefix."_ele_sede where id_sede='$id_sede' ";
     65        $res = $dbi->prepare("$sql");
     66        $res->execute();
     67        list($indirizzo) = $res->fetch(PDO::FETCH_NUM);
     68
    6469    $address=rawurlencode("$indirizzo,$comune,58047");
    6570
    6671        $resultGeoCode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$address.'&amp;sensor=false');
    67 
    6872        $output= json_decode($resultGeoCode);
    6973       
     
    7276                $longitude      = $output->results[0]->geometry->location->lng; // Returns Longitude
    7377                $location       = $output->results[0]->formatted_address;
     78        }else{
     79                $latitude=0;
     80                $longitude=0;
     81                $location='';
    7482        }
    7583
     
    108116
    109117
    110 
     118# type="text/javascript"
    111119
    112120
    113121echo '
    114 <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true&language=it"></script>
    115    <script type="text/javascript">
     122<script src="http://maps.google.com/maps/api/js?sensor=true&language=it"></script>
     123   <script>
    116124      function maps() {
    117125         var latlng = new google.maps.LatLng('.$coords['lat'].','.$coords['long'].'); // centro della mappa
  • trunk/client/modules/Elezioni/affluenze.php

    r337 r347  
    1111}
    1212
    13 
     13require_once('inc/hpdf5/autoload.php');
     14use Spipu\Html2Pdf\Html2Pdf;
     15use Spipu\Html2Pdf\Exception\Html2PdfException;
     16use Spipu\Html2Pdf\Exception\ExceptionFormatter;
    1417
    1518if (isset($param['id_cons_gen'])) $id_cons_gen=intval($param['id_cons_gen']); else $id_cons_gen='';
     
    252255                if (($perc_u[$data1.$ora1] or $perc_d[$data1.$ora1])) $html .= "<br />
    253256               
    254                 <table class=\"td-vuoto\"  width=\"100%\"><tr class=\"bggray\">
    255                 <th class=\"td-30\">"._UOMINI."</th>
    256                 <th class=\"td-30\">"._DONNE."</th>
    257                 <th>"._COMPLESSIVI."</th>
     257                <table style=\"width:180px;\"><tr class=\"bggray\">
     258                <th style=\"width:28%;text-align:center;\">"._UOMINI."</th>
     259                <th style=\"width:28%;text-align:center;\">"._DONNE."</th>
     260                <th style=\"width:28%;text-align:center;\">"._COMPLESSIVI."</th>
    258261                </tr></table>";
    259262               
     
    263266##              if ($ora_rif=="$data1.$ora1")
    264267if (($perc_u[$data1.$ora1] or $perc_d[$data1.$ora1]))           {
    265                         $ar['perc'][$data1.$ora1]="<table class=\"td-vuoto\"  width=\"100%\"><tr class=\"bggray2\">
    266                         <td class=\"td-30\"><b><i><span class=\"red\">".$perc_u[$data1.$ora1]."%</span></i></b></td>
    267                         <td class=\"td-30\"><b><i><span class=\"red\">".$perc_d[$data1.$ora1]."%</span></i></b></td>
    268                         <td ><span class=\"red\"><b><i>".$perc_c[$data1.$ora1]."%</i></b></span></td>
     268                        $ar['perc'][$data1.$ora1]="<table style=\"width:180px;\"><tr class=\"bggray2\">
     269                        <td style=\"width:33%;text-align:center;\"><b><i><span class=\"red\">".$perc_u[$data1.$ora1]."%</span></i></b></td>
     270                        <td style=\"width:33%;text-align:center;\"><b><i><span class=\"red\">".$perc_d[$data1.$ora1]."%</span></i></b></td>
     271                        <td style=\"width:33%;text-align:center;\" ><span class=\"red\"><b><i>".$perc_c[$data1.$ora1]."%</i></b></span></td>
    269272                        </tr></table>";
    270273                        $ar[0][$data1.$ora1]=$tot[$data1.$ora1];
     
    300303#               if ($ora_rif=="$data.$ora")
    301304                if(($uomini+$donne)>0)
    302                         $ar[$numsez][$data.$ora]="<table class=\"td-vuoto\"  width=\"100%\"><tr class=\"bggray2\">
    303                         <td class=\"td-30\" width=\"33%\">$uomini</td>
    304                         <td class=\"td-30\" width=\"33%\">$donne</td>
    305                         <td >$complessivi</td>
     305                        $ar[$numsez][$data.$ora]="<table style=\"width:180px;\"><tr class=\"bggray2\">
     306                        <td style=\"width:33%;text-align:center;\">$uomini</td>
     307                        <td style=\"width:33%;text-align:center;\">$donne</td>
     308                        <td style=\"width:33%;text-align:center;\">$complessivi</td>
    306309                        </tr></table>";
    307310                else
     
    315318                {
    316319               
    317                         $html .= "<td class=\"bggray2\">$valore</td>";
     320                        $html .= "<td class=\"bggray2\" style=\"text-align:center;\">$valore</td>";
    318321                }
    319322                $html .= "</tr>";
     
    348351      $data=date("d-m-y G:i");
    349352      $style .="\t\t\n<br/><br/><br/><div style=\"margin:0px auto;text-align:center;\"><i>Stampato: $data</i></div>";
    350       $style .="<br/><div style=\"text-align:center;\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></div>";           
     353      $style .="<br/><div style=\"text-align:center;\"><i>Eleonline by luciano apolito &amp roberto gigli - www.eleonline.it</i></div>";               
    351354      $style .= "<br/>  ";     
    352355     
     
    370373                $stampa ="$datipdf $html $style";
    371374               
    372                 require_once('inc/hpdf403/html2pdf.class.php');
    373                 $html2pdf = new HTML2PDF('L','A4', 'it');
     375                $html2pdf = new Html2Pdf('P','A4', 'it');
    374376                $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml']));
    375377                $html2pdf->Output($nomefile);
  • trunk/client/modules/Elezioni/blocchi/02_risultati.php

    r228 r347  
    2121    echo "<table>";
    2222    for($x=0;$x<count($gruppo);$x++){
    23         echo "<tr><td><strong><big>&middot;</big></strong></td><td>".$gruppo[$x]." </td><td  align=\"right\"><b><span style=\"color:#ff0000;\">".$pro[$x] ."%</span></b></td></tr>\n";
     23        echo "<tr><td class=\"td-big\">&middot;</td><td>".$gruppo[$x]." </td><td  style=\"text-align:right\"><b><span style=\"color:#ff0000;\">".$pro[$x] ."%</span></b></td></tr>\n";
    2424    }
    2525    echo "</table>";
  • trunk/client/modules/Elezioni/blocchi/04_sezioni.php

    r265 r347  
    7474                        else $pos="gruppo_sezione";
    7575                       
    76                         $html .="<td style=\"margin:0px auto; text-align:center; width:5%;\" bgcolor=\"$bgsez\"><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&perc=true&file=index&op=$pos&minsez=$sez_num&offsetsez=$sez_num\"><b>$sez_num</b></a></td>";
     76                        $html .="<td style=\"margin:0px auto; text-align:center; width:5%;background-color:$bgsez;\" ><a href=\"modules.php?id_cons_gen=$id_cons_gen&amp;name=Elezioni&amp;id_comune=$id_comune&amp;perc=true&amp;file=index&amp;op=$pos&amp;minsez=$sez_num&amp;offsetsez=$sez_num\"><b>$sez_num</b></a></td>";
    7777
    7878                        if (($i%5) ==0) $html .="</tr>\n<tr>";
    7979                }
    80                
     80                while($i%5!=0) {$i++; $html.="<td></td>";}
    8181                $html .="</tr></table>\n";
    8282    // stampa
    8383    if($e!='0'){
    8484          echo "<div><h5>"._SEZSCRU."</h5></div>";
    85           echo "<center> <img  alt=\"Grafico\" src=\"modules/Elezioni/grafici/ledex2.php?sez=$e&max=$max\" /></center>";
     85          echo "<img style=\"display:block;margin:0px auto;text-align:center;\" alt=\"Grafico\" src=\"modules/Elezioni/grafici/ledex2.php?sez=$e&amp;max=$max\" />";
    8686           
    8787    echo $html; }       
  • trunk/client/modules/Elezioni/blocchi/bar_affluenze.php

    r279 r347  
    8282
    8383
    84                         echo "<center><img src=\"http://chart.apis.google.com/chart?
    85                         chs=160x160
    86                         &cht=bvs
    87                         &chd=t:0,$perc,0
    88                         &chxt=y
    89                         &chco=
    90                         &chl=|$perc% |\"
    91                        
    92                         alt=\"Sample chart\" />
    93                        
    94                          <br/><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=affluenze_graf\">Tutte le affluenze</a>
    95                         </center>";
     84                        echo "<img style=\"display:block;margin:0px auto;text-align:center;\" src=\"http://chart.apis.google.com/chart?chs=160x160&ampcht=bvs&ampchd=t:0,$perc,0&ampchxt=y&ampchco=&ampchl=|$perc% |\" alt=\"Sample chart\" /><br/><a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=affluenze_graf\">Tutte le affluenze</a>";
    9685
    9786
  • trunk/client/modules/Elezioni/blocchi/cerca_candidato.php

    r344 r347  
    88/* widget cerca candidato
    99  by luciano apolito 2015 */
    10 
    11 
     10# http://localhost/ele3/trunk/client/modules.php?cognome=vince&id_comune=58047&op=gruppo&name=Elezioni&file=index&id_cons_gen=66
     11# http://localhost/ele3/trunk/client/modules.php?op=gruppo&name=Elezioni&id_comune=58047&file=index&id_cons_gen=66
    1212if (!defined('MODULE_FILE')) {
    1313    die ("You can't access this file dirrectly...");
    1414}
    15 global $id_comune;
     15global $id_comune,$id_cons_gen,$op;
    1616
    1717# validatore form
    1818echo '
    19  <script type="text/javascript">
     19 <script>
    2020function validateForm()
    2121        {
     
    3131
    3232# form
    33 echo '
     33#$url=$_SERVER['REQUEST_URI']; // url della pagina per il reload
     34
     35echo "
    3436                <div><h5>Cerca il candidato</h5> 
    35                 <form method="post" name="form_candi" action="" onsubmit="return validateForm()" >
     37                <form method=\"get\" name=\"form_candi\" action=\"modules.php\" onsubmit='return validateForm()' >
    3638                Inserisci il cognome o/e il nome intero del candidato da cercare<br/>
    37                 <input type="text" name="cognome" maxlength="30" size="10" value="">';
    38 echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\">";
    39 echo    '<input type="submit" value="Cerca">
     39                <input type=\"text\" name=\"cognome\" maxlength=\"30\" size=\"10\" value=\"\">";
     40echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"><input type=\"hidden\" name=\"op\" value=\"$op\"><input type=\"hidden\" name=\"name\" value=\"Elezioni\"><input type=\"hidden\" name=\"file\" value=\"index\"><input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
     41echo    "<input type=\"submit\" value=\"Cerca\">
    4042                </form>
    4143                </div>
    42 ';
    43 
    44 if(isset($_SESSION['cerca_cand'])) $cerca_cand=$_SESSION['cerca_cand']; else $cerca_cand="";
    45 echo $cerca_cand;
    46 $_SESSION['cerca_cand']='';
     44";
    4745
    4846
    49 $url=$_SERVER['REQUEST_URI']; // url della pagina per il reload
     47
     48
    5049
    5150$param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST;
    5251if (isset($param['cognome'])) $cognome=addslashes($param['cognome']); else $cognome='';
    5352$chiave="$cognome";
    54 global $id_comune;
    55 
     53$cerca_cand="";
     54$_SESSION['cerca_cand']='';
    5655
    5756if($cognome!=''){
     
    101100                $sezioni=$res4->rowCount();
    102101                $cerca_cand .= "<div style=\"text-align:left\"><hr/>";
    103                 $cerca_cand .= "<img src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista\" width=\"30\" heigth=\"30\" align=\"left\">";
     102                $cerca_cand .= "<img src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista\" alt=\"foto\" style=\"width:30px; text-align:left;\">";
    104103
    105104                if($tipo_consul!='4'){ // non Ú circoscrizione
     
    117116
    118117        $_SESSION['cerca_cand']=$cerca_cand;
    119         header("location:$url ");
     118#       header("location:$url");
    120119        //$cognome='';
    121120}
    122 
     121if(isset($_SESSION['cerca_cand'])) $cerca_cand=$_SESSION['cerca_cand']; else $cerca_cand="";
     122echo $cerca_cand;
     123$_SESSION['cerca_cand']='';
    123124
    124125
  • trunk/client/modules/Elezioni/blocchi/social.php

    r233 r347  
    1717 
    1818<!-- Facebook -->
    19 <a href=\"http://www.facebook.com/sharer.php?t=modules/Elezioni/images/$simbolo&u=$url\" target=\"_blank\"><img src=\"modules/Elezioni/images/facebook.png\" alt=\"Facebook\" /></a>
     19<a href=\"http://www.facebook.com/sharer.php?t=modules/Elezioni/images/$simbolo&amp;u=$url\" target=\"_blank\"><img src=\"modules/Elezioni/images/facebook.png\" alt=\"Facebook\" /></a>
    2020 
    2121
     
    2323
    2424<!-- Twitter -->
    25 <a href=\"http://twitter.com/share?url=$url&text=$descr_com $descr_cons&hashtags=Eleonline\" target=\"_blank\"><img src=\"modules/Elezioni/images/twitter.png\" alt=\"Twitter\" /></a>
     25<a href=\"http://twitter.com/share?url=$url&amp;text=$descr_com $descr_cons&amp;hashtags=Eleonline\" target=\"_blank\"><img src=\"modules/Elezioni/images/twitter.png\" alt=\"Twitter\" /></a>
    2626 
    2727
  • trunk/client/modules/Elezioni/crea_pagina.php

    r265 r347  
    1515    die ("You can't access this file directly...");
    1616}
     17
     18require_once('inc/hpdf5/autoload.php');
     19use Spipu\Html2Pdf\Html2Pdf;
     20use Spipu\Html2Pdf\Exception\Html2PdfException;
     21use Spipu\Html2Pdf\Exception\ExceptionFormatter;
     22
    1723global $name;
    1824
     
    259265                //$nomefile="elezioni_tabelle.pdf";
    260266                //$orienta="P";
    261                 require_once('inc/hpdf403/html2pdf.class.php');
    262                 $html2pdf = new HTML2PDF($orienta,$formato, 'it');
     267                $html2pdf = new Html2Pdf($orienta,$formato, 'it');
    263268                $html2pdf->WriteHTML($style, isset($_GET['vuehtml']));
    264269                $html2pdf->Output($nomefile);
  • trunk/client/modules/Elezioni/gruppo.php

    r346 r347  
    463463                                        $datipdf="<b>"._COMUNE." $descr_comune</b> - "._RISULTATI.": $descr_cons<br/><b>$pagina</b><br/><br/> $list1 $list2 $list3 ";
    464464# verificare la stampa sulle circoscrizioni                                     
    465                                          echo "<div style=\"text-align:right;width:40%;margin-left:10px;margin-right:0px;font-size:12px; \">";
    466                                          echo "<table style=\"text-align:center;margin-right:0px;border-top : 1px solid Blue;width: 140px;\"><tr style=\" background:#eceff5;\"><td>"._ESPORTA."<br />";
     465                                         echo "<div style=\"text-align:right;width:65%;margin-left:10px;margin-right:0px;font-size:12px; \">";
     466                                         echo "<table style=\"text-align:center;margin-right:0px;border-top : 1px solid Blue;width: 280px;\"><tr style=\" background:#eceff5;\"><td>"._ESPORTA."<br />";
    467467                                         if($circo){ echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;id_circ=$id_circ&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/printer.gif\" alt=\"Stampa\" /></a>";
    468468                                }else{
     
    470470                                        echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;xls=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/csv.gif\" alt=\"Export Csv\" /></a>";
    471471                                        echo "<img class=\"image\"  src=\"modules/Elezioni/images/rss.png\" alt=\"Export rss\" />";                             
    472                                         echo "  </td></tr> ";                           
     472                                        echo "  </td>";                         
    473473        # stampa pdf
     474                                        echo "<td>";
    474475                                        echo "<form id=\"pdf\" method=\"post\" action=\"modules.php\">";                                       
    475476                                        echo "<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\"></input>";     
     
    489490        #                               echo "<input type=\"hidden\" name=\"name\" value=\"$elezioni\"></input>";                       
    490491                                        echo "<input type=\"hidden\" name=\"name\" value=\"Elezioni\"></input>";
    491                                         echo "<tr><td>";
    492492                                        echo "<input type=\"image\" name=\"submit\" src=\"modules/Elezioni/images/pdf.gif\" align=\"left\">";                                   
    493493                                        echo "&nbsp; L &nbsp;<input type=\"radio\" name=\"orienta\" $land value=\"L\"></input>P &nbsp;<input
     
    495495                                        echo "&nbsp; A3<input type=\"radio\" name=\"formato\" $A3 value=\"A3\"></input>A4<input
    496496                                        type=\"radio\" name=\"formato\" $A4 value=\"A4\"></input>";                                     
    497                                         echo "  </td></tr></table></form> ";
     497                                        echo "  </form></td></tr></table> ";
    498498                                }
    499499                                echo "</div></br />";
     
    574574                        $maxpos=max($pos);
    575575                        ////////////////////////////////////////////////////////////////////
     576                        if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog))
     577                                        $sqlvoti2="select $tab3, sum(t3.validi),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t5, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t5.id_cons=$id_cons and t5.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by $tab3";
     578                        else
     579                                if ($votog) $sqlvoti2="select t1.num_circ, (t3.validi_lista),(t3.nulli),(t3.bianchi),(t3.contestati),(t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t1.id_cons=$id_cons and t1.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by t1.num_circ";
    576580                       
     581                                else $sqlvoti2="select t1.num_circ, sum(t3.validi_lista),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati_lista),sum(t3.voti_nulli_lista+t3.voti_nulli) from ".$prefix."_ele_circoscrizione as t1, ".$prefix."_ele_sezioni as t3, ".$prefix."_ele_sede as t4 where t1.id_cons=$id_cons and t1.id_circ=t4.id_circ and t3.id_sede=t4.id_sede group by t1.num_circ";
     582                       
     583                        $res_voti = $dbi->prepare("$sqlvoti2");
     584                        $res_voti->execute();
     585                               
     586                        ///////////////////////////
    577587                        if ($res_voti->rowCount())
    578                         while (list($num_circ,$desc_circ,$num_cand,$nome,$voti,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = $res_voti->fetch(PDO::FETCH_NUM)){
     588                        while (list($num_circ,$sevalidi,$senulli,$sebianchi,$secontestati,$sevonulli) = $res_voti->fetch(PDO::FETCH_NUM)){
    579589#                               if($genere==4) $sevalidi=$voti;
    580590                                $z=array_search($num_circ, $pos);
     
    587597                                        if($sevonulli) $sevnutot+=$sevonulli;
    588598                                }
    589                                 $votitot[($z)]+=$voti;
    590                                 if(!isset($valsez[$z])) $valsez[$z]=0;
     599#                               $votitot[($z)]+=$voti;
     600#                               if(!isset($valsez[$z])) $valsez[$z]=0;
    591601                                $valsez[$z]=$sevalidi;
    592                                 $voticompl+=$voti;
     602                                $nulsez[$z]=$senulli;
     603                                $biasez[$z]=$sebianchi;
     604                                $consez[$z]=$secontestati;
     605                                $vonsez[$z]=$sevonulli;
     606#                               $voticompl+=$voti;
    593607                        }
    594608                        if ($voticompl) {
     
    667681                                                        //$posvoti++;
    668682                                                                $ar[($z)][$posvoti+1]="<b>$valsez[$z]</b>";
    669                                                                 $ar[($z)][$posvoti+2]="<b>$senulli</b>";
    670                                                                 $ar[($z)][$posvoti+3]="<b>$sebianchi</b>";
    671                                                                 $ar[($z)][$posvoti+4]="<b>$secontestati</b>";
    672                                                                 $ar[($z)][$posvoti+5]="<b>$sevonulli</b>";
     683                                                                $ar[($z)][$posvoti+2]="<b>$nulsez[$z]</b>";
     684                                                                $ar[($z)][$posvoti+3]="<b>$biasez[$z]</b>";
     685                                                                $ar[($z)][$posvoti+4]="<b>$consez[$z]</b>";
     686                                                                $ar[($z)][$posvoti+5]="<b>$vonsez[$z]</b>";
    673687                                                        }
    674688                                                }
  • trunk/client/modules/Elezioni/index.php

    r344 r347  
    569569        $femmine_t=$femmine_t+$femmine;
    570570        echo "<tr class=\"bggray2\"><td><b>$num_sez</b>"
    571         ."</td><td><b><a href=\"modules.php?name=Elezioni&amp;op=sezione&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;id_sede=$id_sed\"><img class=\"nobordo\" src=\"modules/Elezioni/images/mappa.gif\" align=\"left\">
     571        ."</td><td><b><a href=\"modules.php?name=Elezioni&amp;op=sezione&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;id_sede=$id_sed\"><img class=\"nobordo\" src=\"modules/Elezioni/images/mappa.gif\" style=\"text-align:left;\" alt=\"mappa\"/>
    572572$indir</a></b>"
    573573        ."</td><td>$maschi"
     
    889889                                        $i++;
    890890                                        echo "<td class=\"table-main\"><a href=\"modules.php?name=Elezioni&amp;id_gruppo=$id_gruppo2&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;id_lista=$id_lista2&amp;op=partiti&amp;voti_lista=$voti_lista&amp;perc_lista=$perc_lista&amp;id_comune=$id_comune\">
    891                                         <img class=\"stemma\" src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista2\"  alt=\"\" /><br />N. $num_lista  $descr_lista";                           
     891                                        <img class=\"stemma\" src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista2\"  alt=\"stemma\" /><br />N. $num_lista  $descr_lista";                             
    892892                                        if ($voti_lista) echo "<br />voti: $voti_lista ";
    893893                                        if ($perc_lista) echo "<span class=\"red\"> $perc_lista </span>%";                                     
     
    10311031               
    10321032               
    1033                 echo "<img src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista\" width=\"50\" heigth=\"50\" align=\"middle\"><h2> $descr_lista</h2><br />";
     1033                echo "<img src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_lista=$id_lista\" style=\"width:50; text-align:center;\"><h2> $descr_lista</h2><br />";
    10341034                if ($voti_lista OR $perc_lista){ echo "<h5>";
    10351035                echo _VOTI.": <font color=\"red\">$voti_lista</font> "._PERC.": <font color=\"red\">$perc_lista %</font><br /></h5>";
     
    13601360global $circo;
    13611361if($genere!=0 && $id_circ==''){ // no referendum ne circoscrizioni
    1362         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\" /></a></div>";
     1362        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>";
    13631363}
    13641364
  • trunk/client/modules/Elezioni/votanti.php

    r344 r347  
    1010    die ("Non puoi accedere al file direttamente...");
    1111}
     12
     13require_once('inc/hpdf5/autoload.php');
     14use Spipu\Html2Pdf\Html2Pdf;
     15use Spipu\Html2Pdf\Exception\Html2PdfException;
     16use Spipu\Html2Pdf\Exception\ExceptionFormatter;
     17
    1218$param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ?
    1319        $_GET : $_POST;
    14 
    15 
    1620
    1721$id_comune= (isset($param['id_comune'])) ? $param['id_comune']:$siteistat;
     
    521525                $stampa ="<div style=\"margin:0 auto;text-align:center;\">$datipdf $html</div>";
    522526               
    523                 require_once('inc/hpdf403/html2pdf.class.php');
    524                 $html2pdf = new HTML2PDF('L','A4', 'it');
     527                $html2pdf = new Html2Pdf('P','A4', 'it');
    525528                $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml']));
    526529                $html2pdf->Output($nomefile);
  • trunk/client/temi/facebook/index.php

    r129 r347  
    3030               
    3131        if ($blocco=='1' && $check!=0){
    32                 echo "<td valign=\"top\" class=\"sidebar\">";
     32                echo "<td style=\"vertical-align:text-top;\" class=\"sidebar\">";
    3333                block("dx");
    34                 echo "</td><td>&nbsp;&nbsp;</td><td valign=\"top\">";
     34                echo "</td><td>&nbsp;&nbsp;</td><td style=\"vertical-align:top;\">";
    3535               
    3636        }else {
    37                 echo "<td valign=\"top\">";
     37                echo "<td style=\"vertical-align:top;\">";
    3838        }
    3939
  • trunk/client/temi/facebook/menu.php

    r344 r347  
    3636
    3737        list($fascia)=$rescomu->fetch(PDO::FETCH_NUM);
    38         echo '<style type="text/css">
    39                 html,body{margin:0;padding:0}
    40                 body{background:#FFF;color:#333}
    41                 div#contiene{width:999px;margin:0 auto;background:  #3B5998;color:#fff}
    42             </style>     
    43             <link rel="stylesheet" type="text/css" href="temi/facebook/menu/menu-dd.css">
    44             <script type="text/javascript" src="temi/facebook/menu/jquery-1.2.6.pack.js"></script>
    45             <script type="text/javascript" src="temi/facebook/menu/jquery.hoverIntent.minified.js"></script>
    46             <script type="text/javascript" src="temi/facebook/menu/jquery-ddi2.js"></script>
     38        echo '
    4739            <div id="contiene">
    4840               
     
    7971                      while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){
    8072                            echo "<li><a href=\"modules.php?op=gruppo&amp;name=Elezioni&amp;id_comune=$id&amp;file=index\">
    81     <img src=\"modules/Elezioni/images/logo.gif\" width=\"16\" height=\"16\" class=\"nobordo\"> $descrizione</a></li>";
     73    <img src=\"modules/Elezioni/images/logo.gif\" width=\"16\" height=\"16\" class=\"nobordo\" alt=\"$descrizione\" /> $descrizione</a></li>";
    8274                        }
    8375                      echo "</ul></li>";
     
    243235            </li>";
    244236
    245 echo "</div>";
     237echo "</ul></div>";
    246238
    247239
  • trunk/client/temi/facebook/style.css

    r85 r347  
    340340       
    341341        padding: 0px;
     342}               
     343
     344.td-big {
     345        float: right;
     346        text-align:center;
     347        margin: 0px 0 0 1px;
     348        border: none;
     349        font-size: 2em;
     350    line-height: .2em;
    342351}               
    343352       
  • trunk/client/temi/realistic/menu.php

    r344 r347  
    6969                      while (list($id,$descrizione,)=$rescomu->fetch(PDO::FETCH_NUM)){
    7070                            echo "<li><a href=\"modules.php?op=gruppo&amp;name=Elezioni&amp;id_comune=$id&amp;file=index\">
    71     <img src=\"modules/Elezioni/images/logo.gif\" width=\"16\" height=\"16\" class=\"nobordo\"> $descrizione</a></li>";
     71    <img src=\"modules/Elezioni/images/logo.gif\" width=\"16\" height=\"16\" class=\"nobordo\" alt=\"$descrizione\"/> $descrizione</a></li>";
    7272                        }
    7373                      echo "</ul></li>";
  • trunk/client/versione.php

    r346 r347  
    11<?php
    22
    3 $versione = "3.0 rev 346";
     3$versione = "3.0 rev 347";
    44$version_number = $versione;
    5 $datarel = "30 marzo 2021";
     5$datarel = "14 maggio 2021";
    66$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    77
Note: See TracChangeset for help on using the changeset viewer.