Файл: sys/inc/main_menu.php
Строк: 45
<?php
$rekl = mysql_result(mysql_query("SELECT COUNT(*) FROM `rekl` WHERE `sel` = '2'"), 0);
if ($rekl > 0) {
echo "<div class = 'rekl'>";
rekl(2);
echo "</div>";
}
$q_menu = mysql_query("SELECT * FROM `menu` ORDER BY `pos` ASC");
while ($post_menu = mysql_fetch_assoc($q_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', 'include', 'razd') NOT NULL DEFAULT 'link' AFTER `id`");
}
if ($post_menu['type'] == 'include') {
if ($post_menu['include'] != NULL && is_file(H . $post_menu['include'])) {
@include H . $post_menu['include'];
}
}
if ($post_menu['type'] == 'link') {
echo "<a href='$post_menu[url]'>";
echo "<div class = 'razd'>n";
echo icons($post_menu['icon'], 'code');
} elseif ($post_menu['type'] == 'include') {
echo "<div class = 'null'>";
} else {
echo "<div class = 'blok'>";
}
echo $post_menu['name'];
if ($post_menu['counter'] != NULL && is_file(H . $post_menu['counter'])) {
@include H . $post_menu['counter'];
}
if ($post_menu['type'] == 'link') {
echo "</div></a>";
} else {
echo "</div>n";
}
}