Changeset 117 for trunk/client/modules/Elezioni/votanti.php
- Timestamp:
- Jun 2, 2011, 11:48:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.