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