1 | <?php
|
---|
2 | /************************************************************************/
|
---|
3 | /* Eleonline - Raccolta e diffusione dei dati elettorali */
|
---|
4 | /* by Luciano Apolito & Roberto Gigli */
|
---|
5 | /* http://www.eleonline.it */
|
---|
6 | /* info@eleonline.it rgigli@libero.it */
|
---|
7 | /************************************************************************/
|
---|
8 |
|
---|
9 | if (!defined('MODULE_FILE')) {
|
---|
10 | die ("Non puoi accedere al file direttamente...");
|
---|
11 | }
|
---|
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 |
|
---|
17 | include('votanti-inc.php');
|
---|
18 |
|
---|
19 | ############### stampa
|
---|
20 | if ($xls!='1' && $pdf!='1'){
|
---|
21 | echo "$datipdf $html";
|
---|
22 | }elseif($xls=="1"){
|
---|
23 | $nomefile="votanti.xls";
|
---|
24 | header ("Content-Type: application/vnd.ms-excel");
|
---|
25 | header ("Content-Disposition: inline; filename=$nomefile");
|
---|
26 | header("Pragma: no-cache");
|
---|
27 | header("Expires: 0");
|
---|
28 | $datipdf = mb_convert_encoding($datipdf , "HTML-ENTITIES", "UTF-8");
|
---|
29 | echo "$datipdf";
|
---|
30 | echo "$html \n";
|
---|
31 | }elseif($pdf=='1'){
|
---|
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);
|
---|
37 | }
|
---|
38 | if($csv!=1 ) include ("footer.php");
|
---|
39 |
|
---|
40 | ?>
|
---|