Файл: index.php
Строк: 54
<?php
include 'engine/includes/start.php';
include 'engine/includes/head.php';
$cache = new Cache(tmpDir . 'index_page[lang='.Core::$language.'].swc');
if (!$cache->life())
{
ob_start();
$res = mysqli_query($sql->db, 'select * from `main_menu` order by `pos`');
while($menu = $sql->fetch($res))
{
$menu['icon'] = str_replace('{theme}', $set['theme'], $menu['icon']);
if (empty($menu['link'])) // раздел
{
echo
'<div class="menu_razd">',
(!empty($menu['icon']) ? '<img src="'.$menu['icon'].'" alt=""/> ' : ''),
__($menu['name']).'</div>';
if (!empty($menu['file']) && is_file(H . $menu['file']))
{
include H . $menu['file'];
}
}
else // ссылка
{
echo
'<a href="'.$menu['link'].'" class="link">',
(!empty($menu['icon']) ? '<img src="'.$menu['icon'].'" alt=""/> ' : ''),
__($menu['name']).
(!empty($menu['file']) && is_file(H . $menu['file']) ? include H . $menu['file'] : null),
'</a>';
}
}
$cache->write();
unset($res, $menu);
}
echo $cache->read();
unset($cache);
include 'engine/includes/foot.php';