Index: trunk/client/modules/Elezioni/affluenze-inc.php
===================================================================
--- trunk/client/modules/Elezioni/affluenze-inc.php	(revision 400)
+++ trunk/client/modules/Elezioni/affluenze-inc.php	(revision 407)
@@ -179,5 +179,7 @@
 	$num_ril= $resril->rowCount();  //numero delle rilevazioni previste
     if(!isset($html)) $html='';
-	$html .= "<table class=\"td-89\">";
+	if($csv && $pdf) $tabpdf="style=\"width:45%; margin:0px auto;text-align:center;\"";
+	else $tabpdf='';
+	$html .= "<table class=\"td-100\" $tabpdf>";
 	$html .= "<tr class=\"bggray\"><td>"._SEZIONI."</td><td>"._ISCR_SEZ."</td>";
 	$sql="SELECT orario,data FROM ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc,orario desc limit 0,1";
@@ -196,7 +198,7 @@
 #		if(($data==$ultdata) and ($ora==$ultora))
 		{
-			$tot[$data.$ora]="<table style=\"width:100%;border:none;\"><tr class=\"bggray2\"><td style=\"width:33%;text-align:center;border:none;\">
-			<b>".number_format($votiu,0,',','.')."</b></td><td style=\"width:33%;text-align:center;border:none;\">
-			<b>".number_format($votid,0,',','.')."</b></td><td style=\"width:33%;text-align:center;border:none;\">
+			$tot[$data.$ora]="<table style=\"width:100%;border:none;\"><tr class=\"bggray2\"><td style=\"width:33%;text-align:center;border:none;max-width:50px;\">
+			<b>".number_format($votiu,0,',','.')."</b></td><td style=\"width:33%;text-align:center;border:none;max-width:50px;\">
+			<b>".number_format($votid,0,',','.')."</b></td><td style=\"width:33%;text-align:center;border:none;max-width:50px;\">
 			<b>".number_format($somma,0,',','.')."</b></td>
 			</tr></table>";
@@ -227,6 +229,7 @@
 		$html .= "<br /><table style=\"width:100%;border:none;\"><tr class=\"bggray\">";
 		if ((isset($perc_u[$data1.$ora1]) or isset($perc_d[$data1.$ora1])) and ($perc_u[$data1.$ora1]+$perc_d[$data1.$ora1])>0) 
-			$html .= "<th style=\"width:28%;text-align:center;border:none;\">"._UOMINI."</th><th style=\"width:28%;text-align:center;border:none;\">"._DONNE."</th>";
-		$html .= "<th style=\"width:28%;text-align:center;border:none;\">"._COMPLESSIVI."</th></tr></table></td>";
+			$html .= "<th style=\"width:33%;max-width:100px;text-align:center;border:none;\">"._UOMINI."</th><th style=\"width:33%;max-width:50px;text-align:center;border:none;\">"._DONNE."</th><th style=\"width:33%;max-width:150px;text-align:center;border:none;\">"._COMPLESSIVI."</th></tr></table></td>";
+
+		else $html .= "<th style=\"width:150px;text-align:center;border:none;\">"._COMPLESSIVI."</th></tr></table></td>";
 
 		if (isset($tot[$data1.$ora1])){
@@ -234,7 +237,7 @@
 			if (($perc_u[$data1.$ora1] or $perc_d[$data1.$ora1])){
 				$ar['perc'][$data1.$ora1]="<table style=\"width:100%;border:none;\"><tr class=\"bggray2\">
-				<td style=\"width:33%;text-align:center;border:none;\"><b><i><span class=\"red\">".$perc_u[$data1.$ora1]."%</span></i></b></td>
-				<td style=\"width:33%;text-align:center;border:none;\"><b><i><span class=\"red\">".$perc_d[$data1.$ora1]."%</span></i></b></td>
-				<td style=\"width:33%;text-align:center;border:none;\" ><span class=\"red\"><b><i>".$perc_c[$data1.$ora1]."%</i></b></span></td>
+				<td style=\"width:33%;text-align:center;border:none;max-width:50px;\"><b><i><span class=\"red\">".$perc_u[$data1.$ora1]."%</span></i></b></td>
+				<td style=\"width:33%;text-align:center;border:none;max-width:50px;\"><b><i><span class=\"red\">".$perc_d[$data1.$ora1]."%</span></i></b></td>
+				<td style=\"width:33%;text-align:center;border:none;max-width:50px;\" ><span class=\"red\"><b><i>".$perc_c[$data1.$ora1]."%</i></b></span></td>
 				</tr></table>";
 				$ar[0][$data1.$ora1]=$tot[$data1.$ora1];
@@ -270,7 +273,7 @@
 		if(($uomini+$donne)>0)
 			$ar[$numsez][$data.$ora]="<table style=\"width:100%;border:none;\"><tr>
-			<td style=\"width:33%;text-align:center;border:none;\">$uomini</td>
-			<td style=\"width:33%;text-align:center;border:none;\">$donne</td>
-			<td style=\"width:33%;text-align:center;border:none;\">$complessivi</td>
+			<td style=\"width:33%;text-align:center;border:none;max-width:50px;\">$uomini</td>
+			<td style=\"width:33%;text-align:center;border:none;max-width:50px;\">$donne</td>
+			<td style=\"width:33%;text-align:center;border:none;max-width:50px;\">$complessivi</td>
 			</tr></table>";
 		else
@@ -285,5 +288,5 @@
 		foreach ($arr as $valore)
 		{			
-			$html .= "<td>$valore</td>";
+			$html .= "<td style=\"max-width:33%;text-align:center;border:none;\">$valore</td>";
 		}
 		$html .= "</tr>";
@@ -311,6 +314,6 @@
 if($csv==1){
 	$data=date("d-m-y G:i");
-	$style .="\t\t\n<br/><br/><br/><div style=\"margin:0px auto;text-align:center;\"><i>Stampato: $data</i></div>";
-	$style .="<br/><div style=\"text-align:center;\"><i>Eleonline by luciano apolito e roberto gigli - www.eleonline.it</i></div>";		
+	$style .="\t\t\n<br/><br/><br/><table style=\"width:50%; margin:0px auto;text-align:center;\"><tr><td><div style=\"margin:0px auto;text-align:center;\"><i>Stampato: $data</i></div>";
+	$style .="<br/><div style=\"text-align:center;\"><i>Eleonline by luciano apolito e roberto gigli - www.eleonline.it</i></div></td></tr></table>";		
 	$style .= "<br/>  ";	     
 }	
