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 ("You can't access this file directly...");
|
---|
11 | }
|
---|
12 |
|
---|
13 |
|
---|
14 | require_once('inc/hpdf5/autoload.php');
|
---|
15 | use Spipu\Html2Pdf\Html2Pdf;
|
---|
16 | use Spipu\Html2Pdf\Exception\Html2PdfException;
|
---|
17 | use Spipu\Html2Pdf\Exception\ExceptionFormatter;
|
---|
18 |
|
---|
19 | include('affluenze-inc.php');
|
---|
20 |
|
---|
21 | ############### stampa
|
---|
22 | if ($xls!='1' && $pdf!='1'){
|
---|
23 | echo "$datipdf $html $style";
|
---|
24 | }elseif($xls=="1"){
|
---|
25 | $nomefile="affluenze.xls";
|
---|
26 | header ("Content-Type: application/vnd.ms-excel");
|
---|
27 | header ("Content-Disposition: inline; filename=$nomefile");
|
---|
28 | header("Pragma: no-cache");
|
---|
29 | header("Expires: 0");
|
---|
30 | $datipdf = mb_convert_encoding($datipdf , "HTML-ENTITIES", "UTF-8");
|
---|
31 | echo "$datipdf";
|
---|
32 | echo "$html \t\n $style";
|
---|
33 | }elseif($pdf=='1'){
|
---|
34 | $nomefile="$descr_cons affluenze.pdf";
|
---|
35 | $stampa ="$datipdf $html $style";
|
---|
36 | if($vismf)
|
---|
37 | $html2pdf = new Html2Pdf('L','A4', 'it');
|
---|
38 | else
|
---|
39 | $html2pdf = new Html2Pdf('P','A4', 'it');
|
---|
40 | $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml']));
|
---|
41 | $html2pdf->Output($nomefile);
|
---|
42 | }
|
---|
43 | if($csv!=1 ) include ("footer.php");
|
---|
44 |
|
---|
45 | ?>
|
---|