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

Aggiornamento per compatibilità con php7.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.