Changeset 117 for trunk/client/modules/Elezioni/affluenze.php
- Timestamp:
- Jun 2, 2011, 11:48:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/affluenze.php
r101 r117 18 18 if (isset($param['id_comune'])) $id_comune=intval($param['id_comune']); 19 19 if (isset($param['xls'])) $xls=intval($param['xls']); 20 if (isset($param['pdf'])) $pdf=intval($param['pdf']); 20 21 $res = mysql_query("SELECT t1.tipo_cons,t3.genere,t2.id_cons FROM ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2, ".$prefix."_ele_tipo as t3 where t1.tipo_cons=t3.tipo_cons and t1.id_cons_gen=t2.id_cons_gen and t2.id_cons_gen='$id_cons_gen' and t2.id_comune='$id_comune'" , $dbi); 21 22 list($tipo_cons,$genere,$id_cons) = mysql_fetch_row($res); … … 35 36 $datipdf .= "<div style=\"margin:0px auto; text-align:center;\">"; 36 37 $siteistat=$id_comune; 37 if($xls!=1) $datipdf .= "<table><tr><td><img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" alt=\"mappa\" /></td><td>"; 38 $datipdf .= ""._COMUNE." $descr_com <br/> 39 "._RISULTA." "._CONSULTA."<br/>"; 40 $datipdf .= "<h1>$descr_cons</h1>"._DISCLAIMER.""; 38 # salva sull'hardisk lo stemma del comune 39 $logo=verificasimbolo(); 40 $immagine= "<img src=\"modules/Elezioni/images/$logo\" alt=\"logo\" align=\"left\"/>"; 41 42 if($xls!=1) $datipdf .= "<table><tr><td>$immagine</td><td>"; 43 44 $datipdf .= ""._COMUNE." $descr_com <br /> 45 "._RISULTA." "._CONSULTA."<br/ >"; 46 $datipdf .= "$descr_cons<br />"._DISCLAIMER." 47 <br /><b>"._DETTAGLIO." "._AFFLUENZE."</b>"; 41 48 if($xls!=1) $datipdf .= "</td></tr></table>"; 42 $datipdf .=" <h2><b>"._DETTAGLIO." "._AFFLUENZE."</b></h2></div>";49 $datipdf .="</div>"; 43 50 44 51 $html = "<style type=\"text/css\"> … … 123 130 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez&csv=1&xls=1\"> 124 131 <img class=\"image\" src=\"modules/Elezioni/images/csv.gif\" alt=\"\" /></a> 132 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=affluenze_sez&csv=1&pdf=1\"> 133 <img class=\"image\" src=\"modules/Elezioni/images/pdf.gif\" alt=\"\" /></a> 125 134 126 135 </div> … … 296 305 if($genere==0){ //se e' referendum 297 306 #'Pagina precedente' e 'Pagina Successiva' 307 if ($xls!='1' && $pdf!='1' && $csv='1'){ 298 308 $html .= "<div class=\"modulo\">"; 299 309 $cur=$num_ref; … … 311 321 $html .= "</div>"; 312 322 } 313 323 } 314 324 315 325 if(!isset($style)) $style=''; … … 317 327 $data=date("d-m-y G:i"); 318 328 $style .="\t\t\n<br/><br/><br/><div style=\"margin:0px auto;text-align:center;\"><i>Stampato: $data</i></div>"; 319 $style .="<br/><div style=\"text-align:center;\"><i>Eleonline by l . apolito & r.gigli - www.eleonline.it</i></div>";329 $style .="<br/><div style=\"text-align:center;\"><i>Eleonline by luciano apolito & roberto gigli - www.eleonline.it</i></div>"; 320 330 $style .= "<br/> "; 321 331 322 332 } 323 $html .= "</div>";333 //$html .= "</div>"; 324 334 325 335 326 336 ############### stampa 327 if ($xls!='1' ){337 if ($xls!='1' && $pdf!='1'){ 328 338 echo "$datipdf $html $style"; 329 }else{ 330 $nomefile="export.xls"; 339 340 }elseif($xls=="1"){ 341 $nomefile="affluenze.xls"; 331 342 header ("Content-Type: application/vnd.ms-excel"); 332 343 header ("Content-Disposition: inline; filename=$nomefile"); 333 334 344 echo "$datipdf"; 335 345 echo "$html \t\n $style"; 346 }elseif($pdf=='1'){ 347 $nomefile="$descr_cons affluenze.pdf"; 348 349 $stampa ="$datipdf $html $style"; 350 351 require_once('inc/hpdf403/html2pdf.class.php'); 352 $html2pdf = new HTML2PDF('L','A4', 'it'); 353 $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml'])); 354 $html2pdf->Output($nomefile); 336 355 } 337 356
Note:
See TracChangeset
for help on using the changeset viewer.