<?

function sllist($key)
{
global $fslct;
$mslf=$fslct[$key];
$res="";
foreach ($mslf as $key => $value ){
$res=$res."<option value='$key'>$key";
}
return $res;
}

function sllist2($key)
{
global $fslct;
$mslf=$fslct['country'];
$res="";

$lnbmass=cntradsnumb();


foreach ($mslf as $key => $value ){
if ($lnbmass[$key]==''){$lnbmass[$key]='0';} 
$res=$res."<option value='$key'>$key (".$lnbmass[$key].")";
}
return $res;
}

function cntradsnumb()
{ 
global $table_ads, $schopt;
 
$sql_query="select country, count(idnum) from $table_ads $wrvl where visible=1 group by country ";
$sql_res=mysql_query("$sql_query"); 
while ($row = mysql_fetch_row($sql_res))
{$loct=$row[0];  
$lmass[$loct]=$row[1];
}
return $lmass;
}

?>