<?





if (isset($_GET['menu'])){
$menu=mysql_escape_string($_GET['menu']);
$count_menu_q = mysql_query("SELECT COUNT(*) FROM `$mysql[pref]menu` WHERE `menu` = '$menu';");
if (mysql_result($count_menu_q, 0)==0){$menu='';}}else {$menu='';}



$q_menu = mysql_query("SELECT * FROM `$mysql[pref]menu` WHERE `menu` = '$menu' ORDER BY num ASC;");

while ($main_menu = mysql_fetch_array($q_menu))
{
//echo "<img src=\"".BASEDIR."SYSTEM/themes/$them/img/2.gif\" alt=\"\" /> ";
//echo "[+]";
echo "<a href=\"".BASEDIR."$main_menu[link]\"><b>$main_menu[name]</b></a>";


if ($main_menu['count']!='' && is_file(BASEDIR.$main_menu['count']))
{
echo ' <b>(';

@include BASEDIR.$main_menu['count'];

echo ')</b>';
}
echo "<br />\n";
}

?>