Index: /trunk/admin/admin.php
===================================================================
--- /trunk/admin/admin.php	(revision 368)
+++ /trunk/admin/admin.php	(revision 369)
@@ -279,5 +279,5 @@
 else {
 	$oggi=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y")));
-	$sql="select t1.id_cons_gen from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t1.data_fine>'$oggi' and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and id_sez>0 and permessi>0) limit 0,1";
+	$sql="select t1.id_cons_gen from ".$prefix."_ele_consultazione as t1, ".$prefix."_ele_cons_comune as t2 where t1.id_cons_gen=t2.id_cons_gen and t2.id_comune=$id_comune and t1.data_fine>'$oggi' and t2.id_cons in (select id_cons from ".$prefix."_ele_operatori where aid='$aid' and permessi>0) limit 0,1"; # TEST: and id_sez>0 
 	$rese = $dbi->prepare("$sql");
 	$rese->execute();
@@ -455,4 +455,5 @@
 #include("TEST tema: $tema--");
 #include("modules/Elezioni/language/lang-".$_SESSION['lang'].".php");
+
 if(isset($id_cons_gen) and isset($id_comune)){
 	if(!isset($id_cons)){
@@ -491,4 +492,5 @@
 #
 #die("TEST: qui $aid $id_cons $id_sez ".$_SESSION['aid']);
+
 if (isset($_SESSION['aid']) AND $_SESSION['remote']==$_SERVER['REMOTE_ADDR']) {
 	if($tema=='Futura2' and $op!='logout') 
Index: /trunk/admin/header.php
===================================================================
--- /trunk/admin/header.php	(revision 368)
+++ /trunk/admin/header.php	(revision 369)
@@ -45,6 +45,4 @@
 if($is_mobile && $nocell!=1){
 	global $id_sez;
-#####TEST sezione fissa da impostare iniziando con l'assegnazione del permesso all'operatore di sezione
-#$id_sez=3378;
 	$tema="Futura2";
 } elseif (isset($_SESSION['tema']))
Index: /trunk/admin/modules/Elezioni/ele_spoglio.php
===================================================================
--- /trunk/admin/modules/Elezioni/ele_spoglio.php	(revision 368)
+++ /trunk/admin/modules/Elezioni/ele_spoglio.php	(revision 369)
@@ -72,5 +72,6 @@
 
 $riga=array();
-$rigat=array();
+$rigat=array();	
+$uscita=0;
 while (list($ora,$giorno)= $res->fetch(PDO::FETCH_NUM)){
 	$y++;
@@ -95,4 +96,6 @@
 	$rigat[$y].= "</div>";
 	$errvot1=0;
+	$numril=0;
+
 	for ($i=1;$i<=$max;$i++){
 		$query="SELECT * FROM ".$prefix."_ele_voti_parziale as t1 left join ".$prefix."_ele_gruppo as t2 
@@ -112,5 +115,6 @@
 		$resril = $dbi->prepare("$sql");
 		$resril->execute();
-        list($numril)=$resril->fetch(PDO::FETCH_NUM);
+        list($tmpril)=$resril->fetch(PDO::FETCH_NUM);
+		if($tmpril>$numril) $numril=$tmpril;
 		if ($res2)
 			list($gruppo)= $res2->fetch(PDO::FETCH_NUM);
@@ -160,9 +164,9 @@
 		."<input type=\"hidden\" name=\"id_gruppo\" value=\"$id_gruppo\"/>";
 		$riga[$y].= "</span>";
-		if (chisei($id_cons_gen)>=64 and $y==$numril)   $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\">"._DELETE." <input type=\"checkbox\" name=\"delete\" value=\"true\"/></span>";
+		if (chisei($id_cons_gen)>=64 and ($y==$numril and $voti_t!='')) { $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\">"._DELETE." <input type=\"checkbox\" name=\"delete\" value=\"true\"/></span>";}
 		else $riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\"><input type=\"hidden\" name=\"delete\" value=\"\"/></span>";
 		$riga[$y].= "<span class=\"td\" style=\"text-align: right;\" rowspan=\"1\" colspan=\"6\"><input type=\"submit\" name=\"update\" value=\""._OK."\"/></span>";
 		$riga[$y].= "</form>";
-
+		if($numril>$uscita) $uscita=$numril; 
 	}
 #		echo "</div>";
@@ -179,4 +183,5 @@
 		echo $rigat[$key];
 		echo $riga[$key];
+		if($key>$uscita) { break;}
 	}
 	echo "</div></td></tr></table>";
Index: /trunk/admin/versione.php
===================================================================
--- /trunk/admin/versione.php	(revision 368)
+++ /trunk/admin/versione.php	(revision 369)
@@ -1,7 +1,7 @@
 <?php
 
-$versione = "3.0 rev 368";
+$versione = "3.0 rev 369";
 $version_number = $versione;
-$datarel = "17 maggio 2022";
+$datarel = "23 maggio 2022";
 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
 
Index: /trunk/client/versione.php
===================================================================
--- /trunk/client/versione.php	(revision 368)
+++ /trunk/client/versione.php	(revision 369)
@@ -1,7 +1,7 @@
 <?php
 
-$versione = "3.0 rev 368";
+$versione = "3.0 rev 369";
 $version_number = $versione;
-$datarel = "17 maggio 2022";
+$datarel = "23 maggio 2022";
 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
 
