Файл: sys/inc/main_menu.php
Строк: 53
<?
echo'<div class="cnm">';
$q_menu = $pdo->prepare("SELECT * FROM `menu` ORDER BY `pos` ASC");
$q_menu->execute();
while ($post_menu = $q_menu->fetch()) {
if ($post_menu['type'] == 'link')
echo "<div class='main_menu'>";
if (!isset($post_menu['icon']))
mysql_query('ALTER TABLE `menu` ADD `icon` VARCHAR( 32 ) NULL DEFAULT NULL');
if (!isset($post_menu['type']))
mysql_query("ALTER TABLE `menu` ADD `type` ENUM('link', 'razd') NOT NULL DEFAULT 'link' AFTER `id`");
if ($post_menu['type'] == 'link')
echo "<img src='/style/icons/".$post_menu['icon']."' alt='*'> ";
if ($post_menu['type'] == 'link')
echo "<a href='".$post_menu['url']."'>";
else
echo "<div class='menu_razd'>";
echo $post_menu['name'];
if ($post_menu['type'] == 'link')
echo "</a>n";
if ($post_menu['counter'] != NULL && is_file(H . $post_menu['counter'])) {
@include H . $post_menu['counter'];
}
echo "</div>";
}
if (user_access('adm_panel_show')) {
echo "<div class='main_menu' style = 'border-radius: 0px 0px 7px 7px;'>n";
echo "<img src='/style/themes/default/img/iconz.png' alt='*'> <a href='plugins/admin/'>Админ кабинет</a> ";
include_once "plugins/admin/count.php";
echo "</div>";
}
echo "</div>";
?>