$statics_menus=mysql_query("select * from statics_menu order by menu",$mydb);
if (mysql_num_rows($statics_menus)>0)
{
$changes[$changesection].='<hr>';
$changes[$changesection].='<ul>';
$x=1;
while ($statics_menu=mysql_fetch_assoc($statics_menus))
{
if ($setting['staticssort']==0)
{
$statics_contents=mysql_query("select * from statics_content where menu='".$statics_menu['id']."' and showitem='1' order by title",$mydb);
}
else
{
$statics_contents=mysql_query("select * from statics_content where menu='".$statics_menu['id']."' and showitem='1' order by hitcount desc,title",$mydb);
}
if ($browser=="Internet Explorer")
{
$changes[$changesection].='<li onmouseover="javascript:menuopen(\'submenu'.$x.'\');" onmouseout="javascript:menuclose(\'submenu'.$x.'\');">';
$changes[$changesection].=$statics_menu['menu'];
if (mysql_num_rows($statics_contents)>0)
{
$changes[$changesection].='<ul class="csssubmenu" id="submenu'.$x.'">';
while ($statics_content=mysql_fetch_assoc($statics_contents))
{
$changes[$changesection].='<li><a href="index.php?action=showstatics&content='.$statics_content['id'].$sessionparm_link.'">'.$statics_content['title'].'</a></li>';
}
$changes[$changesection].='</ul>';
}
$changes[$changesection].='</li></span>';
$x++;
}
else
{
$changes[$changesection].='<li class="cssmenu">';
$changes[$changesection].=$statics_menu['menu'];
if (mysql_num_rows($statics_contents)>0)
{
$changes[$changesection].='<ul class="csssubmenu">';
while ($statics_content=mysql_fetch_assoc($statics_contents))
{
$changes[$changesection].='<li class="cssitem"><a href="index.php?action=showstatics&content='.$statics_content['id'].$sessionparm_link.'">'.$statics_content['title'].'</a></li>';
}
$changes[$changesection].='</ul>';
}
$changes[$changesection].='</li>';
}
}
$changes[$changesection].='</ul>';
}