<?
$query = mysqli_query($dbi, "SELECT * FROM `main_menu` ORDER BY `pos` ASC");
while ($post = mysqli_fetch_array($query))
{
if ($post['type']=='link')
{
echo "<div class='list'>n";
echo "<a href='$post[link]'".title_link($post['name']).">n";
echo main_menu_icon($post['icon'])." ";
echo $post['name']." n";
if (is_file(H.$post['counter']))
{
echo "(";
include(H.$post['counter']);
echo ")n";
}
echo "</a>n";
echo "</div>n";
}
}
?>