Index: trunk/admin/aggiornadb.php
===================================================================
--- trunk/admin/aggiornadb.php	(revision 370)
+++ trunk/admin/aggiornadb.php	(revision 371)
@@ -102,7 +102,9 @@
 if(controllo($prefix.'_authors','admincomune',++$num))
 {
-	$sql="update `".$prefix."_authors` set admincomune='1' where aid='admin'";
-	$ret=aggiorna($sql,$dbi,'',$num);
-	$sql="update `".$prefix."_authors` set admincomune='0' where aid!='admin'";
+	$sql="UPDATE `soraldo_authors` SET `adminop` = '1', `adminsuper` = '0',`admincomune` = '0' WHERE `soraldo_authors`.`aid` != 'admin' AND `soraldo_authors`.`aid` != 'suser'";
+	$ret=aggiorna($sql,$dbi,'',$num);
+	$sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '1',`admincomune` = '0' WHERE `soraldo_authors`.`aid` = 'suser'";
+	$ret=aggiorna($sql,$dbi,'',$num);
+	$sql="UPDATE `soraldo_authors` SET `adminop` = '0', `adminsuper` = '0',`admincomune` = '1' WHERE `soraldo_authors`.`aid` = 'admin'";
 	$ret=aggiorna($sql,$dbi,'',$num);
 	echo "<br> La tabella dei permessi Ãš stata aggiornata<br>";
@@ -128,4 +130,16 @@
 	echo "<br>";
 }	
+++$num;
+$sql="ALTER TABLE `soraldo_ele_come` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 
+$ret=aggiorna($sql,$dbi,'',$num);
+echo "<br>";
+++$num;
+$sql="ALTER TABLE `soraldo_ele_link` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 
+$ret=aggiorna($sql,$dbi,'',$num);
+echo "<br>";
+++$num;
+$sql="ALTER TABLE `soraldo_ele_servizi` CHANGE `title` `title` VARCHAR(150) NOT NULL DEFAULT ' ', CHANGE `preamble` `preamble` TEXT NOT NULL DEFAULT ' ', CHANGE `content` `content` TEXT NOT NULL DEFAULT ' ', CHANGE `editimage` `editimage` VARCHAR(100) NOT NULL DEFAULT ' '"; 
+$ret=aggiorna($sql,$dbi,'',$num);
+echo "<br>";
 
 if(controllo($prefix.'_ele_rilaff','data',++$num))
Index: trunk/admin/modules/Elezioni/ele_controlli.php
===================================================================
--- trunk/admin/modules/Elezioni/ele_controlli.php	(revision 370)
+++ trunk/admin/modules/Elezioni/ele_controlli.php	(revision 371)
@@ -383,5 +383,5 @@
 						$totsl+=$svl;
 						$tnl+=$nl;
-						if(($votig+$svl)<($votil+$svg+$nl) and $disg)
+						if(($votig+$svl)<($votil+$svg+$nl) and ($solog or $disg))
 						{ $err=1; $tipo='lista'; break; }
 					}				
Index: trunk/admin/modules/Elezioni/ele_sede.php
===================================================================
--- trunk/admin/modules/Elezioni/ele_sede.php	(revision 370)
+++ trunk/admin/modules/Elezioni/ele_sede.php	(revision 371)
@@ -45,4 +45,5 @@
 if (isset($param['filemappa'])) $filemappa=addslashes($param['filemappa']); else $filemappa='';
 if (isset($param['mappa'])) $mappa=addslashes($param['mappa']); else $mappa='';
+if (isset($param['delmap'])) $delmap=addslashes($param['delmap']);
 
 
@@ -59,5 +60,5 @@
 
 function all() {
-   global $bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min,$id_cons,$id_cons_gen,$do,$id_sede,$id_circ;
+   global $bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min,$id_cons,$id_cons_gen,$do,$id_sede,$id_circ,$delmap;
 
    echo "<center><font class=\"title\"><br><b>"._SEDE."</b></font><br><br>";
@@ -68,6 +69,9 @@
 	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._CIRCO."</b></td>"
 	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._INDIRIZZO."</b></td>"
-	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._MAPPA."</b></td>"
-	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._TEL."</b></td>"
+	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._MAPPA."</b>";
+	if ($do=='modify')
+		echo "<br><input type=\"checkbox\" name=\"delmap\" value=\"false\"> "._DELETE;
+	echo "</td>";	
+	echo "<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._TEL."</b></td>"
 	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._FAX."</b></td>"
 	."<td bgcolor=\"$bgcolor1\" align=\"center\">&nbsp;<b>"._RESP."</b>&nbsp;</td>"
@@ -184,5 +188,5 @@
 
 function sede($ok, $do,$id_circ, $id_sede,$indir, $tel1, $tel2, $fax, $resp, $mappa, $filemappa, $id_sede2) {
-global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons, $id_cons,$id_cons_gen,$id_comune;
+global $admin, $bgcolor1, $bgcolor2, $prefix, $dbi, $descr_cons, $id_cons,$id_cons_gen,$id_comune,$delmap;
 $perms=ChiSei(0);
 
@@ -253,6 +257,8 @@
 				$mappanome=addslashes($nomemappa);
 				$cond=", mappa='$mappablob', filemappa='$mappanome'";
-			} else {$cond='';}
-        	
+			} else {
+					if ( $delmap=='false') {$cond=", mappa='', filemappa=''";}
+					else $cond='';
+			}       	
 			$sql="update  ".$prefix."_ele_sede set    id_circ='$id_circ',indirizzo='$indir' , telefono1='$tel1', telefono2='$tel2',fax='$fax',responsabile='$resp' $cond where id_sede='$id_sede2' ";
 			$res = $dbi->prepare("$sql");
Index: trunk/admin/modules/Elezioni/ele_spoglio.php
===================================================================
--- trunk/admin/modules/Elezioni/ele_spoglio.php	(revision 370)
+++ trunk/admin/modules/Elezioni/ele_spoglio.php	(revision 371)
@@ -164,5 +164,5 @@
 		."<input type=\"hidden\" name=\"id_gruppo\" value=\"$id_gruppo\"/>";
 		$riga[$y].= "</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>";}
+		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>";}
 		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>";
Index: trunk/admin/versione.php
===================================================================
--- trunk/admin/versione.php	(revision 370)
+++ trunk/admin/versione.php	(revision 371)
@@ -1,7 +1,7 @@
 <?php
 
-$versione = "3.0 rev 370";
+$versione = "3.0 rev 371";
 $version_number = $versione;
-$datarel = "01 giugno 2022";
+$datarel = "03 settembre 2022";
 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
 
