[2] | 1 | <?php
|
---|
| 2 | /************************************************************************/
|
---|
| 3 | /* Eleonline - Raccolta e diffusione dei dati elettorali */
|
---|
| 4 | /* by Luciano Apolito & Roberto Gigli */
|
---|
| 5 | /* http://www.eleonline.it */
|
---|
[376] | 6 | /* info@eleonline.it rgigli@libero.it */
|
---|
[2] | 7 | /************************************************************************/
|
---|
| 8 |
|
---|
| 9 | if (!defined('MODULE_FILE')) {
|
---|
| 10 | die ("Non puoi accedere al file direttamente...");
|
---|
| 11 | }
|
---|
[347] | 12 | require_once('inc/hpdf5/autoload.php');
|
---|
| 13 | use Spipu\Html2Pdf\Html2Pdf;
|
---|
| 14 | use Spipu\Html2Pdf\Exception\Html2PdfException;
|
---|
| 15 | use Spipu\Html2Pdf\Exception\ExceptionFormatter;
|
---|
| 16 |
|
---|
[376] | 17 | include('votanti-inc.php');
|
---|
[2] | 18 |
|
---|
| 19 | ############### stampa
|
---|
[117] | 20 | if ($xls!='1' && $pdf!='1'){
|
---|
[376] | 21 | echo "$datipdf $html";
|
---|
[117] | 22 | }elseif($xls=="1"){
|
---|
| 23 | $nomefile="votanti.xls";
|
---|
[2] | 24 | header ("Content-Type: application/vnd.ms-excel");
|
---|
| 25 | header ("Content-Disposition: inline; filename=$nomefile");
|
---|
[371] | 26 | header("Pragma: no-cache");
|
---|
| 27 | header("Expires: 0");
|
---|
| 28 | $datipdf = mb_convert_encoding($datipdf , "HTML-ENTITIES", "UTF-8");
|
---|
[2] | 29 | echo "$datipdf";
|
---|
| 30 | echo "$html \n";
|
---|
[117] | 31 | }elseif($pdf=='1'){
|
---|
[376] | 32 | $nomefile="$descr_cons votanti.pdf";
|
---|
| 33 | $stampa ="$datipdf $html";
|
---|
| 34 | $html2pdf = new Html2Pdf('P','A4', 'it');
|
---|
| 35 | $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml']));
|
---|
| 36 | $html2pdf->Output($nomefile);
|
---|
[2] | 37 | }
|
---|
| 38 | if($csv!=1 ) include ("footer.php");
|
---|
| 39 |
|
---|
| 40 | ?>
|
---|