Index: trunk/client/modules/Elezioni/candidato.php
===================================================================
--- trunk/client/modules/Elezioni/candidato.php	(revision 421)
+++ trunk/client/modules/Elezioni/candidato.php	(revision 424)
@@ -12,9 +12,9 @@
 /*****************************************************/
 function candidato() {
-   global $tipo_cons, $prefix, $dbi, $offset, $min, $id_cons_gen, $id_cons,$file,$genere,$prev,$next,$lettera,$ltr,$ordine,$id_comune,$id_circ,$id_lista,$votog,$circo,$num;
+   global $tipo_cons, $prefix, $dbi, $offset, $min, $id_cons_gen, $id_cons,$file,$genere,$prev,$next,$lettera,$ltr,$ordine,$id_comune,$id_circ,$id_lista,$votog,$circo,$num,$datigenvis;
   
  
  
-  $offset=15;
+  $offset=$datigenvis;
   if ($circo==1) $offset=1000;
   if (!isset($min)) $min=0;
Index: trunk/client/modules/Elezioni/consiglieri.php
===================================================================
--- trunk/client/modules/Elezioni/consiglieri.php	(revision 421)
+++ trunk/client/modules/Elezioni/consiglieri.php	(revision 424)
@@ -132,24 +132,27 @@
 	elseif ($numgruppo>0){
 		$sqllis = "SELECT t1.id_lista,t1.num_lista,t1.descrizione,t1.id_gruppo from ".$prefix."_ele_lista as t1, ".$prefix."_ele_gruppo as t2 where t1.id_cons='$id_cons' and t1.id_gruppo=t2.id_gruppo and t2.num_gruppo not in (".$_SESSION['ballo1'].",".$_SESSION['ballo2'].")";
-$res_lis = $dbi->prepare("$sqllis");
-$res_lis->execute();
-
+		$res_lis = $dbi->prepare("$sqllis");
+		$res_lis->execute();
 		$yy=$res_lis->rowCount(); 
-			$sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons'";
-$res_voti = $dbi->prepare("$sql");
-$res_voti->execute();
-
-			list($validilista) = $res_voti->fetch(PDO::FETCH_NUM);
+		$sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_cons='$id_cons'";
+		$res_voti = $dbi->prepare("$sql");
+		$res_voti->execute();
+		list($validilista) = $res_voti->fetch(PDO::FETCH_NUM);
 		if ($yy){
-while(list($id_lista,$num_lista,$descr,$pgrup) = $res_lis->fetch(PDO::FETCH_NUM)) {
-			$sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_lista='$id_lista'";
-$res_voti = $dbi->prepare("$sql");
-$res_voti->execute();
-
-			list($votilista) = $res_voti->fetch(PDO::FETCH_NUM);
-			if(!isset($voti[$pgrup])) $voti[$pgrup]=0;
-			$voti[$pgrup]+=$votilista;
-}
-			foreach ($voti as $key=>$val){if($val<($validilista*3/100)) unset($voti[$key]);} ##################################################
+			while(list($id_lista,$num_lista,$descr,$pgrup) = $res_lis->fetch(PDO::FETCH_NUM)) {
+				$sql = "select sum(voti) from ".$prefix."_ele_voti_lista where id_lista='$id_lista'";
+				$res_voti = $dbi->prepare("$sql");
+				$res_voti->execute();
+				list($votilista) = $res_voti->fetch(PDO::FETCH_NUM);
+				if(!isset($voti[$pgrup])) $voti[$pgrup]=0;
+				$voti[$pgrup]+=$votilista;
+			}
+			$togli=array();
+			foreach ($voti as $key=>$val){
+				if($val<($validilista*3/100)) 
+					$togli[]=$key;
+			}
+			foreach($togli as $key=>$val)
+				unset($voti[$val]); ##################################################
 			$res_lis = $dbi->prepare("$sqllis");
 			$res_lis->execute();
@@ -161,5 +164,5 @@
 			echo "<input type=\"hidden\" name=\"id_comune\" value=\"$id_comune\"/></td>";
 
-echo "<td><b>".$_SESSION['grp1']."</b></td>";
+			echo "<td><b>".$_SESSION['grp1']."</b></td>";
 			echo "<td><b>".$_SESSION['grp2']."</b></td>";
 			echo "<td><b>"._NONCOLLE."</b></td></tr>";
Index: trunk/client/modules/Elezioni/gruppo.php
===================================================================
--- trunk/client/modules/Elezioni/gruppo.php	(revision 421)
+++ trunk/client/modules/Elezioni/gruppo.php	(revision 424)
@@ -91,5 +91,5 @@
 	global $prefix, $dbi, $descr_cons, $id_cons, $id_cons_gen,$tipo_cons,$votog,$votol,$votoc,$circo, $genere,$id_gruppo,$id_lista,$bgcolor1,$bgcolor2,$id_comune,$descr_comune,$id_circ;
 	global $id_comune,$id_cons_gen,$op,$minsez,$id_lista,$id_circ,$csv,$min,$orienta,$formato,$dettnulli,$disgiunto,
-	$orvert,$grupposg,$offset,$offsetsez,$perc,$info,$files,$nomefile;
+	$orvert,$grupposg,$offset,$offsetsez,$perc,$info,$files,$nomefile,$numcandvis,$numsezvis;
 	$nomefile="";
 	#Denominazione pagine
@@ -158,7 +158,7 @@
 		
 		$voticompl=0;
-		if (!($offset)) $offset=25;
+		if (!($offset)) $offset=$numcandvis;
 		if (!($min)) $min=1;
-		if (!($offsetsez)) $offsetsez=22; 
+		if (!($offsetsez)) $offsetsez=$numsezvis; 
 		if (!($minsez)) $minsez=1;
 		if ($min>$offset) { 
Index: trunk/client/modules/Elezioni/index.php
===================================================================
--- trunk/client/modules/Elezioni/index.php	(revision 421)
+++ trunk/client/modules/Elezioni/index.php	(revision 424)
@@ -200,5 +200,5 @@
 *************************/
 function menu() {
-	global $hondt,$lang,$multicomune, $tema, $op, $prefix, $dbi, $offset, $min,$descr_cons,$info,$dati, $votog,$votol,$votoc,$circo, $id_cons,$tipo_cons,$genere,$descr_cons,$id_cons_gen,$id_comune,$id_circ,$minsez,$offsetsez, $limite,$hondt,$tema_on,$js,$visgralista;
+	global $hondt,$lang,$multicomune, $tema, $op, $prefix, $dbi, $offset, $min,$descr_cons,$info,$dati, $votog,$votol,$votoc,$circo, $id_cons,$tipo_cons,$genere,$id_cons_gen,$id_comune,$id_circ,$minsez,$offsetsez, $limite,$tema_on,$js,$visgralista;
 
 $tema=htmlentities($tema); //xss        
@@ -453,5 +453,5 @@
 function sezione() {
    global $admin, $prefix, $dbi, $offset, $min,$votog,$circo, $id_cons_gen,$id_circ,$descr_circ,$id_cons,$file,$prev,$next,$id_comune,$googlemaps;
-	global $descr_com,$cap;
+	global $descr_com,$cap,$datigenvis;
  if(!isset($_GET['id_circ'])) unset($id_circ);
  dati();
@@ -475,5 +475,5 @@
  } 
 
-  $offset=15;
+  $offset=$datigenvis;
   if (!isset($min)) $min=0;
   if (!isset($id_circ)) $id_circ=0;
@@ -610,5 +610,5 @@
 
 function gruppo() {
-   global $fascia, $limite, $admin, $prefix, $dbi, $offset, $min, $id_cons_gen,$genere, $id_cons,$tipo_cons,$file,$prev,$next,$id_circ,$id_comune,$descr_circ,$id_sez,$votog,$votol,$circo,$limite;
+   global $fascia, $limite, $admin, $prefix, $dbi, $offset, $min, $id_cons_gen,$genere, $id_cons,$tipo_cons,$file,$prev,$next,$id_circ,$id_comune,$descr_circ,$id_sez,$votog,$votol,$circo,$limite,$datigenvis;
    	//dati();
 	// definizione variabile per button 'ok' nei form
@@ -704,5 +704,5 @@
 	
 		
-	$offset=15;
+	$offset=$datigenvis;
   	if (!isset($min)) $min=0;
   	$go="gruppo";
