Changeset 460


Ignore:
Timestamp:
Apr 29, 2025, 8:39:18 PM (7 months ago)
Author:
roby
Message:

-CLIENT
-- Correzioni varie al tema bootstrap

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/versione.php

    r459 r460  
    11<?php
    22
    3 $versione = "3.0 rev 459";
     3$versione = "3.0 rev 460";
    44$version_number = $versione;
    5 $datarel = "08 aprile 2025";
     5$datarel = "29 aprile 2025";
    66$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    77
  • trunk/client/modules/Elezioni/affluenze-inc.php

    r458 r460  
    2929include_once("modules/Elezioni/language/lang-$lang.php");
    3030$datipdf='';
     31#echo "<center>";
    3132if($csv==1){
    3233        include_once("modules/Elezioni/funzioni.php");
     
    3738        list($descr_com) = $res->fetch(PDO::FETCH_NUM);
    3839        $descr_com =stripslashes($descr_com);
    39         if($xls!=1) $datipdf .= "<div style=\"margin:0px auto; text-align:center;\">";
     40        if($xls!=1) $datipdf .= "<div style=\"width:40%; margin:0px auto;text-align:center;\">";
    4041        $siteistat=$id_comune;
    4142        # salva sull'hardisk lo stemma del comune
    4243        $logo=verificasimbolo();
    4344        $immagine= "<img src=\"modules/Elezioni/images/$logo\" alt=\"logo\" align=\"left\"/>";
    44 
    4545        if($xls!=1) $datipdf .= "<table><tr><td>$immagine</td><td>";
    4646       
    47         $datipdf .= ""._COMUNE." $descr_com <br />
     47        $datipdf .= ""._COMUNE." $descr_com<br />
    4848        "._RISULTA." "._CONSULTA."<br/ >";
    4949        $datipdf .= "$descr_cons<br />"._DISCLAIMER."
     
    5252 $datipdf .="";
    5353
    54         if($xls!=1)     {$html = "<style type=\"text/css\">
     54        if($xls!=1)     {
     55                $html="<div style=\"width:40%; margin:0px auto;text-align:center;\">";
     56                $html .= "<style type=\"text/css\">
    5557        <!--
    5658
     
    182184        if($csv && $pdf) $tabpdf="<col width=\"50\">";
    183185        else $tabpdf='';
    184         $html .= "<table class=\"td-100\"> $tabpdf";
     186        $html .= "<table style=\"width:50%; margin:0px auto;text-align:center;\"> $tabpdf";
    185187        $html .= "<tr class=\"bggray\"><td>"._SEZIONI."</td><td>"._ISCR_SEZ."</td>";
    186188        $sql="SELECT orario,data FROM ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc,orario desc limit 0,1";
     
    199201#               if(($data==$ultdata) and ($ora==$ultora))
    200202                {
    201                         $tot[$data.$ora]="<table style=\"width:100%;border:none;\"><tr class=\"bggray2\"><td style=\"width:30%;text-align:center;border:none;max-width:50px;\">
     203                        $tot[$data.$ora]="<table style=\"width:50%; margin:0px auto;border:none;\"><tr class=\"bggray2\"><td style=\"width:30%;text-align:center;border:none;max-width:50px;\">
    202204                        <b>".number_format($votiu,0,',','.')."</b></td><td style=\"width:30%;text-align:center;border:none;max-width:50px;\">
    203205                        <b>".number_format($votid,0,',','.')."</b></td><td style=\"width:40%;text-align:center;border:none;max-width:80px;\">
     
    318320        $style .="<br/><div style=\"text-align:center;\"><i>Eleonline by luciano apolito e roberto gigli - www.eleonline.it</i></div></td></tr></table>";               
    319321        $style .= "<br/>  ";         
    320 }       
     322}
     323if($csv==1 and $xls!=1) $html.="</div>";
     324#echo "</center>";     
    321325/*if($xls==1) { $cella=$html;
    322326                        $cella=str_replace("<table>","\n",$cella);
  • trunk/client/modules/Elezioni/crea_pagina.php

    r457 r460  
    150150                      $html .="<br/><span class=\"copy\"><i>Stampato: $data</i></span>";
    151151                      $html .="<br/><span class=\"copy\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></span>";
    152                       $html .="</center><br />";
    153                 }
     152                }
     153                $html .="</center><br />";
    154154
    155155            # inizio stampa a video o pdf
  • trunk/client/modules/Elezioni/crea_paginaphp5.php

    r457 r460  
    3030        if ($xls==1) {
    3131                $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls");
     32                if(!$nomefile) $nomefile="$descr_cons.xls";
    3233                header ("Content-Type: application/vnd.ms-excel");
    3334                header ("Content-Disposition: inline; filename=$nomefile");
  • trunk/client/modules/Elezioni/crea_paginaphp7.php

    r457 r460  
    3333        if ($xls==1) {
    3434                $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls");
     35                if(!$nomefile) $nomefile="$descr_cons.xls";
    3536                header ("Content-Type: application/vnd.ms-excel");
    3637                header ("Content-Disposition: inline; filename=$nomefile");
  • trunk/client/modules/Elezioni/votanti-inc.php

    r389 r460  
    9090        $logo=verificasimbolo();
    9191        $immagine= "<img src=\"modules/Elezioni/images/$logo\" alt=\"logo\" align=\"left\"/>";
    92         if($xls!=1) $datipdf .= "<table><tr><td>$immagine</td><td>";
    93     $datipdf .= ""._COMUNE." $descr_com <br/>
    94         "._RISULTA." "._CONSULTA."<br/>";
    95         $datipdf .= "$descr_cons <br />"._DISCLAIMER."";
     92        if($xls!=1) $datipdf .= "<table style=\"width:50%;margin:0px auto; text-align:center;\"><tr><td>$immagine</td><td>";
     93    $datipdf .= ""._COMUNE." $descr_com <br>
     94        "._RISULTA." "._CONSULTA."<br>";
     95        $datipdf .= "$descr_cons <br>"._DISCLAIMER."";
    9696        if($xls!=1) $datipdf .=  "</td></tr></table>";
    9797        $datipdf .="</div>";
     
    225225        left join  ".$prefix."_ele_gruppo as t3 on (t1.id_gruppo=t3.id_gruppo) left join ".$prefix."_ele_sede as t4 on (t2.id_sede=t4.id_sede)
    226226        where t1.id_cons='$id_cons' and t1.id_gruppo='$idg' $circos4 order by t2.num_sez ";
    227         $riga1  = "<div style=\"margin:0px auto;text-align:center;\">";
    228         $riga1  .="<h2>"._DETTAGLIO." "._VOTIE."</h2></div>";
     227        $riga1  = "<div style=\"width:80%;margin:0px auto;text-align:center;\">";
     228        $riga1  .="<h2>"._DETTAGLIO." "._VOTIE."</h2>";
    229229        $sql="select descrizione from ".$prefix."_ele_gruppo where id_gruppo='$idg'";
    230230        $des = $dbi->prepare("$sql");
    231231        $des->execute();
    232232        list($descrizione)=$des->fetch(PDO::FETCH_BOTH);
    233         $riga1 .="<h4>$descrizione</h4>";
     233        $riga1 .="<h4>$descrizione</h4></div>";
    234234}
    235235$sql="$tab ";
     
    238238$num_scr = $res->rowCount();
    239239//$riga2= "<div>"._SEZSCR." $num_scr su $num_sez</div>";//sezioni scrutinate
    240 $riga2 = "<table style=\"border:1px solid #6A6A6A;\" summary=\"Tabella dei voti espressi\">";
     240$riga2 = "<table style=\"width:80%;margin:0px auto; border:1px solid #6A6A6A;\" summary=\"Tabella dei voti espressi\">";
    241241$riga3 = "<tr class=\"bggray2\">
    242242<td>"._SEZIONI."</td>
     
    370370$righe .= "</table>";
    371371if(!isset($html)) $html='';
    372 $html .= "$riga1";
    373 $html .= $riga2."";
     372$html .= $riga1."<div style=\"width:80%;margin:0px auto; text-align:center;\">";
     373$html .= $riga2;
    374374$html .= $righet;
    375375$html .= $riga3;
    376376$html .= $righe;
    377 $html .="<div>";
     377#$html .="<div>";
    378378if($genere==0){ //se e' referendum
    379379        if ($xls!='1' && $pdf!='1' && $csv!='1'){
     
    404404        }
    405405}
     406$html .= "</div>";
    406407if($csv==1){
    407408  $data=date("d-m-y G:i");
    408   $html .="<br/><div style=\"margin:0 auto;text-align:center;\"><i>Stampato: $data</i>";
     409  $html .="<br/><div style=\"width:80%;margin:0 auto;text-align:center;\"><i>Stampato: $data</i>";
    409410  $html .="<br/><i>Eleonline by l. apolito & r. gigli - www.eleonline.it</i></div>";           
    410 }       
    411 $html .= "</div>";
     411}       #die($html);
    412412?>
  • trunk/client/modules/Elezioni/votanti.php

    r376 r460  
    3131}elseif($pdf=='1'){
    3232        $nomefile="$descr_cons votanti.pdf";
    33         $stampa ="$datipdf $html";             
     33        $stampa ="$datipdf $html";
    3434        $html2pdf = new Html2Pdf('P','A4', 'it');
    3535        $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml']));
  • trunk/client/temi/bootstrap/pagine/affluenza.php

    r459 r460  
    4444#if($genere>0) 
    4545        $row=elenco_orari();
    46         $aff2=affluenze_sezione(0,$data,$orario,$id_gruppo);$scrutinate=count($aff2);
     46        $aff2=affluenze_sezione(0,$data,$orario,$id_gruppo);
     47        $scrutinate=count($aff2);
    4748        $sezionitotali=sezioni_totali();
    4849        $getref='';
     
    161162                        if(isset($data))
    162163                        foreach($row as $campo=>$val) {
    163                         foreach($aff2 as $affkey=>$affval) {if($affval['id_sez']==$val['id_sez'] and $affval['id_gruppo']==$id_gruppo) {$aff[0]['voti_uomini']=$affval['voti_uomini'];$aff[0]['voti_donne']=$affval['voti_donne'];$aff[0]['voti_complessivi']=$affval['voti_complessivi']; break;}}
     164                        foreach($aff2 as $affkey=>$affval) { if($affval['id_sez']==$val['id_sez'] and ($affval['id_gruppo']==$id_gruppo or $id_gruppo==0)) {$aff[0]['voti_uomini']=$affval['voti_uomini'];$aff[0]['voti_donne']=$affval['voti_donne'];$aff[0]['voti_complessivi']=$affval['voti_complessivi']; break;}}
    164165                                if(!isset($aff[0]['voti_uomini'])) {$aff[0]['voti_uomini']='-';$aff[0]['voti_donne']='-';$aff[0]['voti_complessivi']='-';}
    165166        #                       $aff=affluenze_sezione($val['id_sez'],date_format(date_create($data) ,'Y-m-d'),$orario,$id_gruppo);                             
  • trunk/client/temi/bootstrap/pagine/candidatilistapercirco.php

    r459 r460  
    1616        foreach($elencoliste as $campo=>$val) {
    1717                if($num_lista==$val[2]) $sel='selected'; else $sel='';?>
    18                 <option <?php echo $sel; ?> value="modules.php?op=15&name=Elezioni&id_comune=<?php echo $id_comune.$cirpar;?>&id_cons_gen=<?php echo $id_cons_gen;?>&file=index&num_lista=<?php echo $val[2];?>"><?php echo $val[2].") ".$val[3];?></option>
     18                <option <?php echo $sel; ?> value="modules.php?op=18&name=Elezioni&id_comune=<?php echo $id_comune.$cirpar;?>&id_cons_gen=<?php echo $id_cons_gen;?>&file=index&num_lista=<?php echo $val[2];?>"><?php echo $val[2].") ".$val[3];?></option>
    1919        <?php } ?>
    2020        </select>
     
    7878                }
    7979                $totvoti=array_column($ar,$controllo);
    80                 array_multisort($totvoti, SORT_DESC,$ar); ?>   
     80                if(count($totvoti)==count($ar))
     81                        array_multisort($totvoti, SORT_DESC,$ar); ?>   
    8182                <tbody>
    8283                        <?php
  • trunk/client/temi/bootstrap/pagine/candidatilistapersezioni.php

    r459 r460  
    8080                }
    8181                $totvoti=array_column($ar,$controllo);
    82                 array_multisort($totvoti, SORT_DESC,$ar); ?>   
     82                if(count($totvoti)==count($ar))
     83                        array_multisort($totvoti, SORT_DESC,$ar); ?>   
    8384                <tbody>
    8485                        <?php
  • trunk/client/temi/bootstrap/pagine/tab_link_opendata.php

    r459 r460  
    44$linkgrafici='';
    55$linkrislutati='';
     6if(!isset($nosez)) $nosez=0;
     7$arval = array();
    68if ($op==51 or $op==52 or $op==53 or $op==54 or $op==41 or $op==42 or $op==43 or $op==44) {
    79        $attivaopendata=0;
     
    1012if(isset($linkopendatapdf))
    1113        $linktmp=substr($linkopendatapdf,strrpos($linkopendata,'?')+1);
    12 #       $nosez=0;
    1314else
    1415        $linktmp=substr($linkopendata,strrpos($linkopendata,'?')+1);
    15 #       $nosez=1;
    16 #}
    1716$parametri=explode('&',$linktmp);
    1817foreach($parametri as $key=>$val) {
     
    104103  <div class="modal-dialog">
    105104    <div class="modal-content">
    106       <form action="modules.php" method="get"> <!-- Imposta il tuo endpoint -->
     105      <form id="pdfForm" action="modules.php" method="get"  target="_blank"> <!-- endpoint -->
    107106        <div class="modal-header">
    108107          <h5 class="modal-title" id="pdfModalLabel">Opzioni PDF</h5>
    109108          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Chiudi"></button>
    110109        </div>
    111 
    112110        <div class="modal-body">
    113111          <div class="row">
     112            <?php if(!$nosez and sezioni_totali()>13) { ?>
     113              <div class="row">
     114                <fieldset>
     115                  <legend>Stampa Sezioni</legend>
     116                  <div class="mb-2">
     117                    <label for="sezmin" class="form-label">Da Sezione</label>
     118                    <input name="minsez" type="number" class="form-control" id="sezmin" value="1">
     119                  </div>
     120                  <div class="mb-2">
     121                    <label for="maxsez" class="form-label">A Sezione</label>
     122                    <input name="offsetsez" type="number" class="form-control" id="maxsez" value="14">
     123                  </div>
     124                </fieldset>
     125              </div>
     126            <?php } ?>
    114127            <div class="col">
    115               <?php if(!$nosez) { ?>
    116                           <fieldset>
    117                 <legend>Stampa Sezioni</legend>
    118                 <div class="mb-2">
    119                   <label for="sezmin" class="form-label">Da Sezione</label>
    120                   <input name="minsez" type="number" class="form-control" id="sezmin" value="1">
    121                 </div>
    122                 <div class="mb-2">
    123                   <label for="maxsez" class="form-label">A Sezione</label>
    124                   <input name="offsetsez" type="number" class="form-control" id="maxsez" value="18">
    125                 </div>
    126               </fieldset>
    127 <?php } ?>
    128               <fieldset class="mt-3">
     128              <fieldset>
    129129                <legend>Formato documento</legend>
    130130                <div class="form-check">
     
    138138              </fieldset>
    139139            </div>
    140 
    141140            <div class="col">
    142141              <fieldset>
     
    155154
    156155          <!-- Altri input hidden -->
    157          <?php foreach($arval as $val) echo "<input type=\"hidden\" name=\"".$val[0]."\" value=\"".$val[1]."\">"; ?>
     156          <?php foreach($arval as $val) echo "<input type=\"hidden\" name=\"".$val[0]."\" value=\"".$val[1]."\">"; ?>
    158157          <input name="pdf" type="hidden" value="1">
    159158        </div>
     
    161160        <div class="modal-footer">
    162161          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annulla</button>
    163                   <button type="submit" class="btn btn-primary">Crea PDF</button>
     162          <button type="submit" class="btn btn-primary">Crea PDF</button>
    164163        </div>
    165164      </form>
     
    168167</div>
    169168
    170 
     169<!-- Script per chiudere il modal dopo submit -->
     170<script>
     171document.getElementById('pdfForm').addEventListener('submit', function () {
     172  const modal = bootstrap.Modal.getInstance(document.getElementById('pdfModal'));
     173  if (modal) {
     174    modal.hide();
     175  }
     176});
     177</script>
     178<!-- Script per fullscreen -->
    171179<script>
    172180  const fullscreenBtn = document.getElementById('fullscreen-btn');
  • trunk/client/temi/bootstrap/pagine/votanti.php

    r459 r460  
    105105                        $totuomini=0;$totdonne=0;$totespressi=0;$totvalidi=0;$totnulli=0;$totbianchi=0;$totcontestati=0;
    106106                        $seztemp=elenco_sezioni(0);
     107                        $sezioni= array();
    107108                        foreach($seztemp as $sez) $sezioni[$sez['num_sez']]=$sez['id_sez'];
    108109                        if($genere==0)
  • trunk/client/temi/bootstrap/query.php

    r457 r460  
    199199        if($id_cons_pred)
    200200        {
    201                 $sql="SELECT id_cons_gen,id_cons,proiezione FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons_pred' ";
     201                $sql="SELECT id_cons_gen,id_cons,proiezione FROM ".$prefix."_ele_cons_comune where id_cons='$id_cons_pred' and chiusa<'2'";
    202202                $sth = $dbi->prepare("$sql");
    203203                $sth->execute();
     
    206206                        return($row);
    207207        }
    208         $sql="SELECT id_cons_gen,id_cons,proiezione FROM ".$prefix."_ele_cons_comune where id_comune='$id_comune' order by id_cons desc limit 0,1";
     208        $sql="SELECT id_cons_gen,id_cons,proiezione FROM ".$prefix."_ele_cons_comune where id_comune='$id_comune' and chiusa<'2' order by id_cons desc limit 0,1";
    209209        $sth = $dbi->prepare("$sql");
    210210        $sth->execute();
     
    344344        foreach($row1 as $val) $tmp[]=$val[1];
    345345        $elencoid=implode(',',$tmp);
    346         $sql="SELECT t1.descrizione, t1.id_cons_gen, t1.data_inizio,t2.id_cons,t1.tipo_cons,t1.link_trasparenza FROM ".$prefix."_ele_consultazione as t1,".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t2.chiusa<'2' and t1.id_cons_gen not in ($elencoid) order by t1.data_inizio desc";       
     346        if($sth->rowCount()) $cond="and t1.id_cons_gen not in ($elencoid)"; else $cond='';
     347        $sql="SELECT t1.descrizione, t1.id_cons_gen, t1.data_inizio,t2.id_cons,t1.tipo_cons,t1.link_trasparenza FROM ".$prefix."_ele_consultazione as t1,".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t2.chiusa<'2' $cond order by t1.data_inizio desc";       
    347348        $sth = $dbi->prepare("$sql");
    348349        $sth->execute();       
  • trunk/client/versione.php

    r459 r460  
    11<?php
    2 $versione = "3.0 rev 459";
     2$versione = "3.0 rev 460";
    33$version_number = $versione;
    4 $datarel = "08 aprile 2025";
     4$datarel = "29 aprile 2025";
    55$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    66
Note: See TracChangeset for help on using the changeset viewer.