dimenticavo la funzione per la navigazione:
codice:
function navlimitsell ($offset = 0,$this_script="") {
		global $limit;
		global $PHP_SELF;
		global $zone;
		global $type;
		global $contract;
		global $price;
		global $sizemax;
		global $sizemin;
		if (empty($this_script)) { $this_script = $PHP_SELF; }
if (empty($offset)) { $offset= 0; }
		
$result = safe_query("SELECT count(*) FROM sell WHERE contract='$contract'");

list($total_row) = mysql_fetch_array($result);

if ($offset > 0) {print "<h4><span class=grassetto><a href=\"$this_script?offset=".($offset-$limit)."\">
&lt;&lt; precedente</a></span>";
			}
else
{print "";
}

if (!isset($total_row))
{print "<span class=gras_arancio>- Nessun dato trovato- </span>";}

else {print "<span class=gras_arancio>- ".$total_row[5]." 
casa- </span>";
				}

if ($offset+$limit < $total_row) 
{print "<a href=\"$this_script?offset=".($offset+$limit)."\">
<span class=grassetto>successiva &gt;&gt;
  </span></h4>";
		 }
}