Index: /trunk/client/modules/Elezioni/crea_pagina.php
===================================================================
--- /trunk/client/modules/Elezioni/crea_pagina.php	(revision 117)
+++ /trunk/client/modules/Elezioni/crea_pagina.php	(revision 118)
@@ -20,10 +20,7 @@
 
 
-global $prefix,$dbi,$pdf,$csv,$xls,$lang,$descr_cons,$prefix,$dbi,$id_comune,$descrizione,$siteistat,$min,$offset,$minsez,$offsetsez,$datipdf;
+global $prefix,$dbi,$pdf,$csv,$xls,$lang,$descr_cons,$prefix,$dbi,$id_comune,$descrizione,$siteistat,$min,$offset,$minsez,$offsetsez,$datipdf,$orienta,$formato;
 $res = mysql_query("SELECT descrizione,simbolo,stemma FROM ".$prefix."_ele_comuni where id_comune='$id_comune' ", $dbi);
 	list($descr_com,$simbolo,$stemma) = mysql_fetch_row($res);
-
-
-
 
 
@@ -256,6 +253,7 @@
 		// conversion HTML => PDF
 		//$nomefile="elezioni_tabelle.pdf";
+		//$orienta="P";
 		require_once('inc/hpdf403/html2pdf.class.php');
-		$html2pdf = new HTML2PDF('L','A4', 'it');
+		$html2pdf = new HTML2PDF($orienta,$formato, 'it');
 		$html2pdf->WriteHTML($style, isset($_GET['vuehtml']));
 		$html2pdf->Output($nomefile);
Index: /trunk/client/modules/Elezioni/gruppo.php
===================================================================
--- /trunk/client/modules/Elezioni/gruppo.php	(revision 117)
+++ /trunk/client/modules/Elezioni/gruppo.php	(revision 118)
@@ -35,5 +35,8 @@
 if (isset($param['id_gruppo'])) $id_gruppo=intval($param['id_gruppo']); else $id_gruppo='';
 #if (isset($param['tipo_cons'])) $tipo_cons=intval($param['tipo_cons']); else $tipo_cons='';
-
+if (isset($param['pdf'])) $pdf=intval($param['pdf']); else $pdf='';
+if (isset($param['orienta'])) get_magic_quotes_gpc() ? $orienta=$param['orienta']:$orienta=addslashes($param['orienta']); else $orienta='';
+if (isset($param['datipdf'])) get_magic_quotes_gpc() ? $datipdf=$param['datipdf']:$datipdf=addslashes($param['datipdf']); else $datipdf='';
+if (isset($param['formato'])) get_magic_quotes_gpc() ? $formato=$param['formato']:$formato=addslashes($param['formato']); else $formato='';
 # anti-xss nov. 2009 
 $id_comune=htmlentities($id_comune);
@@ -46,6 +49,6 @@
 $files=htmlentities($files);
 $lettera=htmlentities($lettera);
-
-
+$orienta=htmlentities($orienta);
+$formato=htmlentities($formato);
 
 
@@ -54,4 +57,5 @@
 
 include("crea_pagina.php");
+
 $res = mysql_query("SELECT descrizione from  ".$prefix."_ele_comuni where id_comune='$id_comune'" , $dbi);
 list($descr_comune) = mysql_fetch_row($res);
@@ -117,4 +121,23 @@
 		$colonne='';
 	}
+
+	if ($orienta) {
+		$land='';
+		$port='checked';
+	}else{
+		$land='checked';
+		$port='';
+	}
+
+	if ($formato) {
+		$A3='';
+		$A4='checked';
+	}else{
+		$A3='checked';
+		$A4='';
+	}
+
+
+
 	if ($genere>0) {       //se non e' un referendum
 		
@@ -181,5 +204,5 @@
 
 			if (!$csv) echo "<div><h5>$pagina</h5></div>";
-			if (!$csv) echo "<div style=\"text-align:left; margin-left:20px;\">";
+			if (!$csv) echo "<div style=\" text-align:left; margin-left:20px;\">";
 
 			if(strstr( $op,'candidato')){
@@ -404,13 +427,55 @@
 				
 				  # verificare la stampa sulle circoscrizioni
-				echo "<div style=\"text-align:right;width:900px;margin-left:10px;margin-right:20px;font-size:12px \">"._ESPORTA."<br />";
-				 if($circo) echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;id_circ=$id_circ&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/printer.gif\" alt=\"Stampa\" /></a>";
-				else{ 
+				
+				 echo "<div style=\"text-align:right;width:900px;margin-left:10px;margin-right:20px;font-size:12px; \">";
+				 echo "<table style=\"margin-right:10px;\"><tr><td>"._ESPORTA."<br />";
+				 if($circo){ echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;id_circ=$id_circ&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/printer.gif\" alt=\"Stampa\" /></a>";
+				}else{ 
 				  echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/printer.gif\" alt=\"Stampa\" /></a>";
 				  echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;xls=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/csv.gif\" alt=\"Export Csv\" /></a>";
-				  echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;pdf=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/pdf.gif\" alt=\"Export Pdf\" /></a>";
-				}
-				echo "</div>";
+				  //echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;orvert=$orvert&amp;min=$min&amp;offset=$offset&amp;minsez=$minsez&amp;offsetsez=$offsetsez&amp;perc=$perc&amp;id_lista=$id_lista&amp;pdf=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/pdf.gif\" alt=\"Export Pdf\" /></a>";
+				echo "<img class=\"image\"  src=\"modules/Elezioni/images/rss.png\" alt=\"Export rss\" />";
+				
+				echo "	</td></tr></table></form> ";
+				
+				
+				echo "<form id=\"pdf\" method=\"post\" action=\"modules.php\">";
+					
+				echo "<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\"></input>";	
+				echo "<input type=\"hidden\" name=\"op\" value=\"$op\"></input>";			
+				echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"></input>";
+				echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"></input>";	
+				echo "<input type=\"hidden\" name=\"csv\" value=\"1\"></input>";
+				echo "<input type=\"hidden\" name=\"overt\" value=\"$overt\"></input>";
+				echo "<input type=\"hidden\" name=\"min\" value=\"$min\"></input>";					
+			        echo "<input type=\"hidden\" name=\"offset\" value=\"$id_offset\"></input>";
+				echo "<input type=\"hidden\" name=\"minsez\" value=\"$minsez\"></input>";	
+				echo "<input type=\"hidden\" name=\"offsetsez\" value=\"$offsetsez\"></input>";		
+				echo "<input type=\"hidden\" name=\"perc\" value=\"$perc\"></input>";	
+				echo "<input type=\"hidden\" name=\"id_lista\" value=\"$id_lista\"></input>";
+				echo "<input type=\"hidden\" name=\"pdf\" value=\"1\"></input>";
+				echo "<input type=\"hidden\" name=\"datipdf\" value=\"$datipdf\"></input>";
+				echo "<input type=\"hidden\" name=\"name\" value=\"$elezioni\"></input>";			
+				echo "<input type=\"hidden\" name=\"name\" value=\"Elezioni\"></input>";
+
+				echo "<table style=\"margin-right:10px;\"><tr><td>";
+				echo "<input type=\"image\" name=\"submit\" src=\"modules/Elezioni/images/pdf.gif\">";
+				echo "</td><td>";
+				echo "L &nbsp;<input type=\"radio\" name=\"orienta\" $land value=\"L\"></input>P &nbsp;<input
+				type=\"radio\" name=\"orienta\" $port value=\"P\"></input><br />";
+				echo "A3<input type=\"radio\" name=\"formato\" $A3 value=\"A3\"></input>A4<input
+				type=\"radio\" name=\"formato\" $A4 value=\"A4\"></input>";
+				
+				
+				echo "	</td></tr></table></form> ";
+					
+					
+				}
+
+
+
+				echo "</div></br />";
 				/*
+
 				if (!$circo)
 				echo "dalla $tipo3 n. <b>$minsez</b> alla $tipo3 n. <b>$offsetsez</b> di <b>$num_sez</b> $tipo2<br/><br/>";
@@ -423,7 +488,7 @@
 			
 			if (!$csv){
-				echo "<div style=\"text-align:right;width:900px;margin-left:10px;margin-right:2px;font-size:12px \"><h5> Sezioni scrutinate";
+				echo "<h5> Sezioni scrutinate";
 				if ($tipo_cons!=4) echo ": $tot_scr su $tot_sez &nbsp;&nbsp;&nbsp;  ";
-				echo "</h5>&nbsp; </div>";
+				echo "</h5>&nbsp;";
 			}
 			
@@ -662,11 +727,56 @@
 				$datipdf="<b>"._COMUNE." $descr_comune</b> - "._RISULTATI.": $descr_cons<br/><b>$pagina</b><br/><br/> ";
 				$datipdf .="<br/><b>Referendum n. ".$num_gruppo." </b><br/>".$descr."";
-				echo "<div style=\"text-align:right;width:900px;margin-left:10px;margin-right:20px;font-size:12px \">"._ESPORTA."<br />";
+				echo "<div style=\"text-align:right;width:900px;margin-left:10px;margin-right:20px;font-size:12px \">";
+				echo "<table style=\"margin-right:10px;\"><tr><td>"._ESPORTA."<br />";
 				
 			        echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;perc=$perc&amp;id_gruppo=$id_gruppo&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/printer.gif\" alt=\"Stampa\" /></a>";
 				  echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;perc=$perc&amp;id_gruppo=$id_gruppo&amp;xls=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/csv.gif\" alt=\"Export Csv\" /></a>";
 
-				  echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;perc=$perc&amp;id_gruppo=$id_gruppo&amp;pdf=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/pdf.gif\" alt=\"Export Pdf\" /></a>";
-				
+				  //echo "<a href=\"modules.php?name=Elezioni&amp;op=$op&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune&amp;csv=1&amp;perc=$perc&amp;id_gruppo=$id_gruppo&amp;pdf=1&amp;datipdf=$datipdf\" ><img class=\"image\"  src=\"modules/Elezioni/images/pdf.gif\" alt=\"Export Pdf\" /></a>";
+				
+
+			echo "<img class=\"image\"  src=\"modules/Elezioni/images/rss.png\" alt=\"Export rss\" />";
+				
+				echo "	</td></tr></table></form> ";
+				
+				
+				echo "<form id=\"pdf\" method=\"post\" action=\"modules.php\">";
+					
+				echo "<input type=\"hidden\" name=\"id_circ\" value=\"$id_circ\"></input>";	
+				echo "<input type=\"hidden\" name=\"op\" value=\"$op\"></input>";			
+				echo "<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\"></input>";
+				echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"></input>";	
+				echo "<input type=\"hidden\" name=\"csv\" value=\"1\"></input>";
+				echo "<input type=\"hidden\" name=\"overt\" value=\"$overt\"></input>";
+				echo "<input type=\"hidden\" name=\"min\" value=\"$min\"></input>";					
+			        echo "<input type=\"hidden\" name=\"offset\" value=\"$id_offset\"></input>";
+				echo "<input type=\"hidden\" name=\"minsez\" value=\"$minsez\"></input>";	
+				echo "<input type=\"hidden\" name=\"offsetsez\" value=\"$offsetsez\"></input>";		
+				echo "<input type=\"hidden\" name=\"perc\" value=\"$perc\"></input>";	
+				echo "<input type=\"hidden\" name=\"id_gruppo\" value=\"$id_gruppo\"></input>";
+				echo "<input type=\"hidden\" name=\"pdf\" value=\"1\"></input>";
+				echo "<input type=\"hidden\" name=\"datipdf\" value=\"$datipdf\"></input>";
+				echo "<input type=\"hidden\" name=\"name\" value=\"$elezioni\"></input>";			
+				echo "<input type=\"hidden\" name=\"name\" value=\"Elezioni\"></input>";
+
+				echo "<table style=\"margin-right:10px;\"><tr><td>";
+				echo "<input type=\"image\" name=\"submit\" src=\"modules/Elezioni/images/pdf.gif\">";
+				echo "</td><td>";
+				echo "L &nbsp;<input type=\"radio\" name=\"orienta\" $land value=\"L\"></input>P &nbsp;<input
+				type=\"radio\" name=\"orienta\" $port value=\"P\"></input><br />";
+				echo "A3<input type=\"radio\" name=\"formato\" $A3 value=\"A3\"></input>A4<input
+				type=\"radio\" name=\"formato\" $A4 value=\"A4\"></input>";
+				
+				
+				echo "	</td></tr></table></form> ";
+					
+
+
+
+
+
+
+
+
 				echo "</div>";
 
