Changeset 455 for trunk


Ignore:
Timestamp:
Apr 6, 2025, 8:01:55 PM (8 months ago)
Author:
roby
Message:
  • CLIENT

-- Modifica alla funzione election day
-- Modificata l'esportazione su file da xls a csv
-- Modificato il controllo di fine scrutinio per la funzione di proiezione

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/versione.php

    r454 r455  
    11<?php
    22
    3 $versione = "3.0 rev 454";
     3$versione = "3.0 rev 455";
    44$version_number = $versione;
    5 $datarel = "05 aprile 2025";
     5$datarel = "06 aprile 2025";
    66$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    77
  • trunk/client/modules/Elezioni/affluenze.php

    r411 r455  
    2323    echo "$datipdf $html $style";
    2424}elseif($xls=="1"){
    25         $nomefile="affluenze.xls";
    26         header ("Content-Type: application/vnd.ms-excel");
     25        $nomefile="affluenze.csv";
     26        header ("Content-Type:  text/csv");
    2727        header ("Content-Disposition: inline; filename=$nomefile");
    2828        header("Pragma: no-cache");
  • trunk/client/modules/Elezioni/affluenzephp5.php

    r376 r455  
    1919    echo "$datipdf $html $style";
    2020}elseif($xls=="1"){
    21         $nomefile="affluenze.xls";
    22         header ("Content-Type: application/vnd.ms-excel");
     21        $nomefile="affluenze.csv";
     22        header ("Content-Type:  text/csv");
    2323        header ("Content-Disposition: inline; filename=$nomefile");
    2424        header("Pragma: no-cache");
  • trunk/client/modules/Elezioni/crea_pagina.php

    r371 r455  
    3636if ($xls==1) {
    3737
    38         $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls");
     38        $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".csv");
    3939#       $nomefile=$_SESSION['nomefile'].".xls";
    40         header ("Content-Type: application/vnd.ms-excel");
     40        header ("Content-Type:  text/csv");
    4141        header ("Content-Disposition: inline; filename=$nomefile");
    4242
  • trunk/client/modules/Elezioni/crea_paginaphp5.php

    r399 r455  
    2929        $data=date("d-m-y G:i");
    3030        if ($xls==1) {
    31                 $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls");
    32                 header ("Content-Type: application/vnd.ms-excel");
     31                $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".csv");
     32                header ("Content-Type:  text/csv");
    3333                header ("Content-Disposition: inline; filename=$nomefile");
    3434                $datipdf=str_replace("<br/>","\n",$datipdf);
  • trunk/client/modules/Elezioni/crea_paginaphp7.php

    r400 r455  
    3232        $data=date("d-m-y G:i");
    3333        if ($xls==1) {
    34                 $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".xls");
    35                 header ("Content-Type: application/vnd.ms-excel");
     34                $nomefile=strip_tags(str_replace(array('"', "'", ' ', ','), "_", $datipdf).".csv");
     35                header ("Content-Type:  text/csv");
    3636                header ("Content-Disposition: inline; filename=$nomefile");
    3737                $datipdf=str_replace("<br/>","\n",$datipdf);
  • trunk/client/temi/bootstrap/index.php

    r454 r455  
    1313        $proiezione=$row[0][11];
    1414}
    15 if(count(scrutinio_tot_cand_finale(0))<count(elenco_candidati_liste(0))) $proiezione=0;
     15if(scrutinate('candidati')<sezioni_totali()) $proiezione=0;
    1616$proiezioneattivo=$proiezione;
    1717$row=tipo_consultazione(0);
  • trunk/client/temi/bootstrap/pagine/electionday.php

    r453 r455  
    88$trascorsi=$interval->format('%a');
    99#echo "<br>$giorniviselday : $trascorsi";
    10 if($giorniviselday>=$trascorsi)
    11         $attivaelctionday =1;
    12 else
    13         $attivaelctionday = 0;
     10$attivaelctionday = 0;
     11
     12if($giorniviselday>=$trascorsi) {
     13        $row=elenco_cons();
     14        foreach($row as $val){
     15                $giornorif2=date_create($val[2]);
     16                $interval = date_diff($giornorif2, $oggi);
     17                $trascorsi=$interval->format('%a');
     18                if($giorniviselday>=$trascorsi)
     19                        $listacons[]=$val;
     20                else
     21                        $break;
     22        }
     23        if(count($listacons)>1)
     24                $attivaelctionday =1;
     25}
    1426                       
    1527?>
     
    3244                        <div class="row py-4 divided">
    3345                                <?php
    34                                 $row=elenco_cons();
    35                                 foreach($row as $val){
    36                                         $giornorif=date_create($val[2]);
    37                                         $interval = date_diff($giornorif, $oggi);
    38                                         $trascorsi=$interval->format('%a');
    39                                         if($giorniviselday>=$trascorsi)
    40                                                 $listacons[]=$val;
    41                                         else
    42                                                 $break;
    43                                 }
    4446                                foreach ($listacons as $val) {
    4547                                ?>
  • trunk/client/temi/bootstrap/pagine/tab_link_opendata.php

    r453 r455  
    3939<div class="d-flex justify-content-end align-items-center">
    4040  <div class="btn-group " role="group" aria-label="Pulsanti azione">
    41     <button type="button" class="btn-tab ">
     41    <!--button type="button" class="btn-tab ">
    4242      <a href="https://www.example.com/risultati" target="_blank">
    4343        <span>Risultati</span>
     
    4949        <span>Grafici</span>
    5050        <svg class="icon icon-sm icon-primary ms-auto"><use href="<?php echo $curdir?>/svg/sprites.svg#it-chart-line"></use></svg>
    51       </a>
     51      </a-->
    5252    </button>
    5353    <button type="button" class="btn-tab">
    54       <a href="https://www.example.com/stampa" target="_blank">
     54      <a href="modules.php?op=come&info=affluenze_sez&csv=1&id_comune=$il_comune&id_cons_gen=$id_cons_gen" target="_blank">
    5555        <span>Stampa</span>
    5656        <svg class="icon icon-sm icon-primary ms-auto"><use href="<?php echo $curdir?>/svg/sprites.svg#it-print"></use></svg>
     
    6464    </button>
    6565    <button type="button" class="btn-tab">
    66       <a href="https://www.example.com/csv" target="_blank">
     66      <a href="modules.php?op=come&info=affluenze_sez&csv=1&id_comune=$il_comune&id_cons_gen=$id_cons_gen&xls=1" target="_blank">
    6767        <span>Esporta in CSV</span>
    6868        <svg class="icon icon-sm icon-primary ms-auto"><use href="<?php echo $curdir?>/svg/sprites.svg#it-file-csv"></use></svg>
     
    8585        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Chiudi"></button>
    8686      </div>
     87      <form>
     88          <!--input name="minsez" type="hidden" value="1">
     89          <input name="offsetsez" type="hidden" value="<?php #echo $totsez;?>"-->
     90          <input name="op" type="hidden" value="<?php echo $oplink;?>">
     91          <input name="info" type="hidden" value="<?php echo $infolink;?>">
     92          <input name="csv" type="hidden" value="1">
     93          <input name="id_comune" type="hidden" value="<?php echo $id_comune;?>">
     94          <input name="id_cons_gen" type="hidden" value="<?php echo $id_cons_gen;?>">
    8795      <div class="modal-body">
    88         <form>
    8996          <div class="row">
    9097            <div class="col">
     98                                <fieldset>
     99                                        <legend>Stampa Sezioni</legend>
     100                                        <div class="form-check">
     101                                                <label for="sezmin"><span class="opendata"> Da Sezione</span></label>
     102                                                <input name="minsez" type="text" style="width: 80px;" id="sezmin" value="1">
     103                                        </div>
     104                                        <div class="form-check">
     105                                                <label for="maxsez"><span class="opendata"> A Sezione</span></label>
     106                                                <input name="offsetsez" type="text" style="width: 80px;" id="maxsez" value="18">
     107                                        </div>
     108                                </fieldset>
    91109              <fieldset>
    92110                <legend>Formato documento</legend>
     
    117135          <?php // foreach($arval as $val) echo "<input type=\"hidden\" name=\"".$val[0]."\" value=\"".$val[1]."\">"; ?>
    118136          <input type="hidden" name="pdf" value="1">
    119         </form>
    120137      </div>
    121138      <div class="modal-footer">
     
    124141      </div>
    125142    </div>
     143    </form>
    126144  </div>
    127145</div>
  • trunk/client/versione.php

    r454 r455  
    11<?php
    2 $versione = "3.0 rev 454";
     2$versione = "3.0 rev 455";
    33$version_number = $versione;
    4 $datarel = "05 aprile 2025";
     4$datarel = "06 aprile 2025";
    55$version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
    66
Note: See TracChangeset for help on using the changeset viewer.