Changeset 117
- Timestamp:
- Jun 2, 2011, 11:48:42 PM (13 years ago)
- Location:
- trunk/client/modules/Elezioni
- Files:
-
- 2 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 -
trunk/client/modules/Elezioni/votanti.php
r95 r117 74 74 $datipdf .= "<div style=\"margin:0px auto; text-align:center;\">"; 75 75 $siteistat=$id_comune; 76 if($xls!=1) $datipdf .= "<table><tr><td><img src=\"modules.php?name=Elezioni&file=foto&id_comune=".$id_comune."\" alt=\"mappa\" /></td><td>"; 76 # salva sull'hardisk lo stemma del comune 77 $logo=verificasimbolo(); 78 $immagine= "<img src=\"modules/Elezioni/images/$logo\" alt=\"logo\" align=\"left\"/>"; 79 80 81 82 83 84 if($xls!=1) $datipdf .= "<table><tr><td>$immagine</td><td>"; 77 85 $datipdf .= ""._COMUNE." $descr_com <br/> 78 86 "._RISULTA." "._CONSULTA."<br/>"; 79 $datipdf .= " <h1>$descr_cons</h1>"._DISCLAIMER."";87 $datipdf .= "$descr_cons <br />"._DISCLAIMER.""; 80 88 if($xls!=1) $datipdf .= "</td></tr></table>"; 81 89 $datipdf .="</div>"; 82 90 83 91 84 85 86 87 88 } 92 $html = "<style type=\"text/css\"> 93 <!-- 94 95 .td-89 { 96 width: 89%; 97 border: 1px; 98 text-align: left; 99 } 100 .td-vuoto { 101 102 width: 100%; 103 border: 1px; 104 text-align: left; 105 106 } 107 108 109 .td-5 { 110 111 margin: 0px 0 0 0px; 112 width: 5%; 113 /*border: none;*/ 114 padding: 0px; 115 116 text-align: center; 117 } 118 119 120 121 .bggray { 122 background: #ffffff; 123 FONT-SIZE: 13px; 124 FONT-FAMILY: Helvetica; 125 border: 1px; 126 } 127 128 .bggray2 { 129 background: #EFEFEF; 130 FONT-SIZE: 13px; 131 FONT-FAMILY: Helvetica; 132 border: 1px; 133 } 134 --> 135 </style>"; 136 137 138 139 140 } 141 142 143 144 145 146 147 148 89 149 90 150 … … 101 161 <img class=\"image\" src=\"modules/Elezioni/images/csv.gif\" alt=\"\" /></a> 102 162 163 <a href=\"modules.php?name=Elezioni&op=come&file=index&id_cons_gen=$id_cons_gen&id_comune=$id_comune&info=votanti&pdf=1&csv=1;&pag=$pag\"> 164 <img class=\"image\" src=\"modules/Elezioni/images/pdf.gif\" alt=\"\" /></a> 165 103 166 104 167 </div>"; … … 144 207 } 145 208 146 $riga1 = " <div style=\"margin:0px auto;text-align:center;\">";147 if($pag==0)$riga1 .="<h2>"._DETTAGLIO." "._VOTIE."</h2> </div>";148 else $riga1 .="<h2>"._DETTAGLIO." "._VOTIE." "._ASOLA_LISTA."</h2> </div>";209 $riga1 = ""; 210 if($pag==0)$riga1 .="<h2>"._DETTAGLIO." "._VOTIE."</h2>"; 211 else $riga1 .="<h2>"._DETTAGLIO." "._VOTIE." "._ASOLA_LISTA."</h2>"; 149 212 150 213 }else{ // e' un referendum … … 154 217 where t1.id_cons='$id_cons' and t1.id_gruppo='$idg' order by t2.num_sez "; 155 218 $riga1 = "<div style=\"margin:0px auto;text-align:center;\">"; 156 $riga1 ="<h2>"._DETTAGLIO." "._VOTIE."</h2></div>";219 $riga1 .="<h2>"._DETTAGLIO." "._VOTIE."</h2></div>"; 157 220 158 221 $des = mysql_query("select descrizione from ".$prefix."_ele_gruppo where id_gruppo='$idg'", $dbi); … … 165 228 166 229 $riga2 = "<table style=\"border:1px solid #6A6A6A;\" summary=\"Tabella dei voti espressi\">"; 167 $riga3 = "<tr class=\"bggray \">230 $riga3 = "<tr class=\"bggray2\"> 168 231 <td>"._SEZIONI."</td> 169 232 <td>"._VOTIU."</td> … … 204 267 $tot_bianchi+=$bianchi; 205 268 $tot_contestati+=$contestati; 206 $righe .= "<tr class=\"bggray \">269 $righe .= "<tr class=\"bggray2\"> 207 270 <td>$num</td> 208 271 <td>".number_format($votiu,0,',','.')."</td> … … 259 322 } 260 323 $righe .= "</table>"; 261 324 if(!isset($html)) $html=''; 262 325 $html .= "$riga1"; 263 326 $html .= $riga2.""; … … 269 332 $html .="<div>"; 270 333 if($genere==0){ //se e' referendum 334 if ($xls!='1' && $pdf!='1' && $csv!='1'){ 271 335 #'Pagina precedente' e 'Pagina Successiva' 272 336 $cur=$num_ref; … … 282 346 $html .= "[ <b>"._NEXT_MATCH."</b> ]</a>"; 283 347 } 284 }elseif((($genere==5) or ($genere==3))){ //se vi sono raggruppamenti 348 } 349 } 350 if($genere==5 or $genere==3){ //se vi sono raggruppamenti 285 351 if($csv!=1 and $fascia>$limite){ 286 352 … … 298 364 if($csv==1){ 299 365 $data=date("d-m-y G:i"); 300 $html .="<br/><div style=\"margin:0px auto;text-align:center;\"><i>Stampato: $data</i></div>";301 $html .="<br/>< div style=\"text-align:center;\"><i>Eleonline by l. apolito & r. gigli - www.eleonline.it</i></div>";366 $html .="<br/><div><i>Stampato: $data</i></div>"; 367 $html .="<br/><i>Eleonline by l. apolito & r. gigli - www.eleonline.it</i>"; 302 368 //$html .= $html; 303 369 … … 307 373 308 374 ############### stampa 309 if ($xls!='1' ){375 if ($xls!='1' && $pdf!='1'){ 310 376 echo "$datipdf $html"; 311 }else {312 $nomefile=" export.xls";377 }elseif($xls=="1"){ 378 $nomefile="votanti.xls"; 313 379 header ("Content-Type: application/vnd.ms-excel"); 314 380 header ("Content-Disposition: inline; filename=$nomefile"); … … 316 382 echo "$datipdf"; 317 383 echo "$html \n"; 384 }elseif($pdf=='1'){ 385 $nomefile="$descr_cons votanti.pdf"; 386 387 $stampa ="$datipdf $html"; 388 389 require_once('inc/hpdf403/html2pdf.class.php'); 390 $html2pdf = new HTML2PDF('L','A4', 'it'); 391 $html2pdf->WriteHTML($stampa, isset($_GET['vuehtml'])); 392 $html2pdf->Output($nomefile); 318 393 } 319 394
Note:
See TracChangeset
for help on using the changeset viewer.