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