Index: /trunk/admin/modules/Elezioni/ele_associazioni.php
===================================================================
--- /trunk/admin/modules/Elezioni/ele_associazioni.php	(revision 207)
+++ /trunk/admin/modules/Elezioni/ele_associazioni.php	(revision 208)
@@ -188,5 +188,5 @@
 		while(list($id,$descr_conf)=mysql_fetch_row($rescomu)){
 			$sel='';
-			if ($idcomune and $id == $id_conf) $sel="selected"; elseif ($id==1) $sel="selected";
+			if ($idcomune and $id == $id_conf) $sel="selected"; 
 			echo "<option value=\"$id\" $sel>$descr_conf";
 		}
Index: /trunk/admin/modules/Elezioni/ele_riepilogo.php
===================================================================
--- /trunk/admin/modules/Elezioni/ele_riepilogo.php	(revision 207)
+++ /trunk/admin/modules/Elezioni/ele_riepilogo.php	(revision 208)
@@ -47,5 +47,5 @@
 	list($totm,$totf) = mysql_fetch_row($res);
 	$totel=$totm+$totf;
-	$res = mysql_query("SELECT data,orario FROM `soraldo_ele_rilaff` where id_cons_gen=$id_cons_gen order by data desc, orario desc limit 0,1", $dbi);
+	$res = mysql_query("SELECT data,orario FROM ".$prefix."_ele_rilaff where id_cons_gen=$id_cons_gen order by data desc, orario desc limit 0,1", $dbi);
 	list($giorno,$ora)=mysql_fetch_row($res);
 	$res = mysql_query("SELECT sum(voti_donne),sum(voti_uomini),sum(voti_complessivi) FROM ".$prefix."_ele_voti_parziale where id_cons='$id_cons' and data='$giorno' and orario='$ora'", $dbi);
@@ -66,14 +66,25 @@
 	if ($genere==5 and !$votog) {
 	$totnullil=$nullilista+$contestatilista;
+	$id_conf=0;
+	$res = mysql_query("SELECT t1.id_conf,t1.id_fascia, t2.limite from ".$prefix."_ele_cons_comune as t1 left join ".$prefix."_ele_conf as t2 on t1.id_conf=t2.id_conf where t1.id_cons='$id_cons'", $dbi);
+	if($res) list($id_conf,$fascia,$limite) = mysql_fetch_row($res);
+	if ($id_conf and $fascia<=$limite) {
 	echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
+	echo "<table border=\"1\" width=\"100%\"><tr><th><b>"._VALIDI."</b></th><th>"._NULLI."</th><th>"._BIANCHI."</th><th>"._CONTESTATI."</th><th>"._VOTINULLI."</th><th>"._TOTNON."</th></TR>";
+	ECHO "<TR><TH>".number_format($validi,0,',','.')."</TH><TH>".number_format($nulli,0,',','.')."</TH><TH>".number_format($bianchi,0,',','.')."</TH><TH>".number_format($contestati,0,',','.')."</TH><TH>".number_format($votinulli,0,',','.')."</TH><TH>".number_format($totnulli,0,',','.')."</TH></TR></table><br/>";
+	ECHO "</fieldset><br/><br/><br/>";
+	}else{
+		echo "<fieldset><legend>"._VOTI_LISTA."</legend>";
 	echo "<table border=\"1\" width=\"100%\"><tr><th>"._VALIDI."</th><th>"._VOTINULLI."</th><th>"._CONTESTATI."</th>";
 	// if ($genere==5 and !$votog)
 		echo "<th>"._SOLO_GRUPPO."</th>";
 	echo "<th>"._TOTNON."</th></TR>";
-	ECHO "<TR><TH>".number_format($validilista,0,',','.')."</TH><TH>".number_format($nullilista,0,',','.')."</TH><TH>".number_format($contestatilista,0,',','.')."</TH>";
+
+		ECHO "<TR><TH>".number_format($validilista,0,',','.')."</TH><TH>".number_format($nullilista,0,',','.')."</TH><TH>".number_format($contestatilista,0,',','.')."</TH>";
 	if($genere==5 and !$votog)
 		echo "<TH>".number_format($sg,0,',','.')."</TH>";
 	echo "<TH>".number_format($totnullil,0,',','.')."</TH></TR></table><br/>";
 	ECHO "</fieldset>";
+	}
 	}
 	echo "</center>";
Index: /trunk/admin/modules/Elezioni/ele_voti.php
===================================================================
--- /trunk/admin/modules/Elezioni/ele_voti.php	(revision 207)
+++ /trunk/admin/modules/Elezioni/ele_voti.php	(revision 208)
@@ -806,5 +806,5 @@
 
 	if(!$votog) {
-	   if ((($genere==3) OR ($genere==5)) and !$id_lista and ($fascia>$limite)) {
+	   if ((($genere==3) OR ($genere==5)) and !$id_lista and ($fascia>$limite or !$id_conf)) {
 			$valista=$arg[$i++]; 
 			$result = mysql_query("update ".$prefix."_ele_sezioni set solo_gruppo='".$arg[$i]."' where id_sez='$id_sez'",$dbi);
Index: /trunk/admin/versione.php
===================================================================
--- /trunk/admin/versione.php	(revision 207)
+++ /trunk/admin/versione.php	(revision 208)
@@ -1,3 +1,3 @@
 <?php
-$versione="2.0 rev 206";
+$versione="2.0 rev 208";
 ?> 
Index: /trunk/client/modules/Elezioni/index.php
===================================================================
--- /trunk/client/modules/Elezioni/index.php	(revision 207)
+++ /trunk/client/modules/Elezioni/index.php	(revision 208)
@@ -249,4 +249,11 @@
 	
 	
+	// camera e senato con raggruppamenti
+	 $res3 = mysql_query("select * from ".$prefix."_ele_lista where id_cons='$id_cons' ",$dbi);
+     $liste = mysql_num_rows($res3);
+	if($liste and $genere!=4){
+	 echo "<td><b><a href=\"modules.php?name=Elezioni&amp;op=liste&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune\">"._LISTE."</a></b></td>";
+	}
+	
 	
 
@@ -268,11 +275,4 @@
 	$gruppo = mysql_num_rows($res2);
         
-	// camera e senato con raggruppamenti
-	if($votog){
-	 echo "<td><b><a href=\"modules.php?name=Elezioni&amp;op=liste&amp;id_cons_gen=$id_cons_gen&amp;id_comune=$id_comune\">"._LISTE."</a></b></td>";
-	 $res3 = mysql_query("select * from ".$prefix."_ele_lista where id_cons='$id_cons' ",$dbi);
-         $liste = mysql_num_rows($res3);
-	}
-	
 	if($circo==1) $circo=$sedi;
 	$res4 = mysql_query("select sum(maschi),sum(femmine), sum(maschi+femmine)  from ".$prefix."_ele_sezioni where id_cons=$id_cons", $dbi);
@@ -286,9 +286,9 @@
 	."</td><td><b>$sez</b>"
 	."</td><td><b>$gruppo</b>";
+//        if ($tipo_cons >9) echo"</td><td><b>$liste</b>";
+        if ($liste and $genere!=4) echo"</td><td><b>$liste</b>";
 
 	if ($genere>2 && !$votoc) echo"</td><td><b>$candi</b>";
 	
-//        if ($tipo_cons >9) echo"</td><td><b>$liste</b>";
-        if ($votog) echo"</td><td><b>$liste</b>";
 	echo "</td></tr></table>";
 	//CloseTable();
Index: /trunk/client/versione.php
===================================================================
--- /trunk/client/versione.php	(revision 207)
+++ /trunk/client/versione.php	(revision 208)
@@ -1,3 +1,3 @@
 <?php
-$versione="2.0 rev 206";
+$versione="2.0 rev 208";
 ?> 
Index: /trunk/install/sql/eleonline.sql
===================================================================
--- /trunk/install/sql/eleonline.sql	(revision 207)
+++ /trunk/install/sql/eleonline.sql	(revision 208)
@@ -886,5 +886,5 @@
 /*!40000 ALTER TABLE `soraldo_ele_tipo` DISABLE KEYS */;
 LOCK TABLES `soraldo_ele_tipo` WRITE;
-INSERT INTO `soraldo_ele_tipo` VALUES (1,'PROVINCIALI','it',3,'0','0','0','0'),(2,'REFERENDUM','it',0,'0','0','0','0'),(3,'COMUNALI','it',5,'0','0','0','0'),(4,'CIRCOSCRIZIONALI','it',5,'0','0','0','1'),(5,'BALLOTTAGGIO COMUNALI','it',1,'0','0','0','0'),(6,'CAMERA','it',2,'0','0','0','0'),(7,'SENATO','it',2,'0','0','0','0'),(8,'EUROPEE','it',4,'0','0','0','0'),(9,'REGIONALI','it',5,'0','0','0','0'),(10,'SENATO CON GRUPPI','it',5,'1','0','1','0'),(11,'CAMERA CON GRUPPI','it',5,'1','0','1','0'),(12,'PROVINCIALI CON COLLEGI','it',3,'0','0','0','1'),(13,'BALLOTTAGGIO PROVINCIALI','it',1,'0','0','0','0'),(14,'EUROPEE CON COLLEGI','it',4,'0','0','0','1'),(15,'CAMERA CON GRUPPI E COLLEGI','it',5,'1','0','1','1'),(16,'SENATO CON GRUPPI E COLLEGI','it',5,'1','0','1','1'),(17,'REGIONALI CON COLLEGI','it',5,'0','0','0','1');
+INSERT INTO `soraldo_ele_tipo` VALUES (1,'PROVINCIALI','it',3,'0','0','0','0'),(2,'REFERENDUM','it',0,'0','0','0','0'),(3,'COMUNALI','it',5,'0','0','0','0'),(4,'CIRCOSCRIZIONALI','it',5,'0','0','0','1'),(5,'BALLOTTAGGIO COMUNALI','it',1,'0','0','0','0'),(6,'CAMERA','it',2,'0','0','0','0'),(7,'SENATO','it',2,'0','0','0','0'),(8,'EUROPEE','it',4,'1','0','0','0'),(9,'REGIONALI','it',5,'0','0','0','0'),(10,'SENATO CON GRUPPI','it',5,'1','0','1','0'),(11,'CAMERA CON GRUPPI','it',5,'1','0','1','0'),(12,'PROVINCIALI CON COLLEGI','it',3,'0','0','0','1'),(13,'BALLOTTAGGIO PROVINCIALI','it',1,'0','0','0','0'),(14,'EUROPEE CON COLLEGI','it',4,'0','0','0','1'),(15,'CAMERA CON GRUPPI E COLLEGI','it',5,'1','0','1','1'),(16,'SENATO CON GRUPPI E COLLEGI','it',5,'1','0','1','1'),(17,'REGIONALI CON COLLEGI','it',5,'0','0','0','1');
 UNLOCK TABLES;
 /*!40000 ALTER TABLE `soraldo_ele_tipo` ENABLE KEYS */;
