Index: trunk/admin/modules/Elezioni/ele_sede.php
===================================================================
--- trunk/admin/modules/Elezioni/ele_sede.php	(revision 2)
+++ trunk/admin/modules/Elezioni/ele_sede.php	(revision 80)
@@ -59,5 +59,9 @@
    global $bgcolor1, $bgcolor2, $prefix, $dbi, $offset, $min,$id_cons,$id_cons_gen,$do,$id_sede,$id_circ;
 
-   echo "<center><font class=\"title\"><br><b>"._SEDE."</b></font><br><br><table border=\"0\" width=\"100%\" >"
+   echo "<center><font class=\"title\"><br><b>"._SEDE."</b></font><br><br>";
+	echo "<form name=\"sede2\" enctype=\"multipart/form-data\"  action=\"admin.php\" method=\"post\">"
+	."<input type=\"hidden\" name=\"op\" value=\"sede\">"
+	."<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
+   echo "<table border=\"0\" width=\"100%\" ><tr>"
 	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._CIRCO."</b></td>"
 	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._INDIRIZZO."</b></td>"
@@ -68,7 +72,4 @@
 	."<td bgcolor=\"$bgcolor1\" align=\"center\"><b>"._FUNZIONI."</b></td></tr>";
 	
-	echo "<form name=\"sede2\" enctype=\"multipart/form-data\"  action=\"admin.php\" method=\"post\">"
-	."<input type=\"hidden\" name=\"op\" value=\"sede\">"
-	."<input type=\"hidden\" name=\"id_cons_gen\" value=\"$id_cons_gen\">";
 	if ($id_sede){
 		$res = mysql_query("SELECT * FROM ".$prefix."_ele_sede where id_sede='$id_sede'", $dbi);
@@ -78,5 +79,6 @@
 		$pro['responsabile']='';$pro['id_circ']='';
 	}
-		echo "<tr><td align=\"right\"><select name=\"id_circ\">";
+		echo "<tr>";
+		echo "<td align=\"right\"><select name=\"id_circ\">";
 		$res= mysql_query("SELECT id_circ,descrizione FROM ".$prefix."_ele_circoscrizione where id_cons='$id_cons' order by num_circ", $dbi);
 		while(list($id,$descr) = mysql_fetch_row($res)) {
@@ -90,23 +92,18 @@
 		echo "</select></td>"; 
 		
-		echo "<td><input type=\"text\" name=\"indir\" maxlength=\"40\" value=\"".$pro['indirizzo']."\"></td>"
+		echo "<td><input type=\"text\" name=\"indir\" value=\"".$pro['indirizzo']."\"></td>"
 		."<td><input type=\"file\" name=\"mappa\" size=\"12\" value=\"".$pro['filemappa']."\"></td>"
       ."<td><input type=\"text\" name=\"tel1\" size=\"10\" value=\"".$pro['telefono1']."\"></td>"
       ."<td><input type=\"text\" name=\"fax\" maxlength=\"12\" size=\"10\" value=\"".$pro['fax']."\"></td>"
 
-      ."<td><input type=\"text\" name=\"resp\" maxlength=\"60\" value=\"".$pro['responsabile']."\"></td>";
+      ."<td><input type=\"text\" name=\"resp\" size=\"10\" value=\"".$pro['responsabile']."\"></td>";
 	if ($do == "modify"){
-		echo "<input type=\"hidden\" name=\"id_sede\" value=\"$id_sede\">"
+		echo "<td align=\"center\"><input type=\"hidden\" name=\"id_sede\" value=\"$id_sede\">"
 		."<input type=\"hidden\" name=\"do\" value=\"update\">";
-		echo "<td align=\"center\"><input type=\"submit\" name=\"update\" value=\""._MODIFY."\"></td></tr>";
+		echo "<input type=\"submit\" name=\"update\" value=\""._MODIFY."\"></td></tr>";
 	} else {
-		echo "<input type=\"hidden\" name=\"do\" value=\"add\">";
-
-		
-		
-		
-		echo "<td align=\"center\"><input type=\"submit\" name=\"add\" value=\""._ADD."\"></td></tr>";
+		echo "<td align=\"center\"><input type=\"hidden\" name=\"do\" value=\"add\"><input type=\"submit\" name=\"add\" value=\""._ADD."\"></td></tr>";
 	}	
-	echo "</form><tr></tr>";	
+#	echo "</table></form><table>";	
 	
 	
@@ -131,15 +128,16 @@
 	."</td><td align=\"center\" nowrap>[<a
 		href=\"admin.php?op=sede&amp;do=modify&amp;id_sede=$id_sede&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen\"><img src=\"modules/Elezioni/images/edit.gif\"
-                border=\"0\" align=\"center\"> "._EDIT."</a>]";
+                border=\"0\" align=\"middle\" alt=\"edit\"> "._EDIT."</a>]";
 		if (!$numtemp)
-			echo "[<a href=\"admin.php?op=sede&amp;do=delete&amp;id_sede=$id_sede&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;indir=$indir\">"._DELETE." <img src=\"modules/Elezioni/images/delete.gif\" border=\"0\" align=\"center\"></a>]";
+			echo "[<a href=\"admin.php?op=sede&amp;do=delete&amp;id_sede=$id_sede&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;indir=$indir\">"._DELETE." <img src=\"modules/Elezioni/images/delete.gif\" border=\"0\" align=\"middle\" alt=\"delete\"></a>]";
 		else
-			echo "["._DELETE." <img src=\"modules/Elezioni/images/delete.gif\" border=\"0\" align=\"center\">]";
+			echo "["._DELETE." <img src=\"modules/Elezioni/images/delete.gif\" border=\"0\" align=\"middle\" alt=\"delete\">]";
 	    echo "</td></tr>";
     }
-    echo "</table></center>";
+    echo "</table></form></center>";
 
 
       #'Pagina precedente' e 'Pagina Successiva'
+	if ($max>$offset){
       echo"<table align=\"center\" width=\"100%\" ><tr>";
       $prev=$min-$offset;
@@ -152,5 +150,5 @@
       if ($next>=($offset-1)) {
           if($next>=$max) $next = $max;
-	  else {
+	  	  else {
 
               echo "<td colspan=\"5\" align=\"center\" bgcolor=\"$bgcolor1\"><a href=\"admin.php?op=sede&amp;id_sede=$id_sede&amp;id_circ=$id_circ&amp;id_cons_gen=$id_cons_gen&amp;min=$next\">";
@@ -159,5 +157,5 @@
       }
      echo "</tr></table><br>";
-
+	}
 }
 
