Файл: user/inc/settings.php
Строк: 37
<?php
only_reg();
$set['title'] = 'Настройки';
$cache_file = H.'sys/cache/user_menu/settings_'.mt_rand($user['id'], 99).'.html';
$cache_time = $set['user_cab_time'];
if (file_exists($cache_file) and time() - $cache_time < filemtime($cache_file)) {
echo "<!-- dcms-fiera ".date('H:i', filemtime($cache_file))."Время кэша))-->";
require_once($cache_file);
} else {
ob_start();
$q_menu = $db->query('SELECT * FROM `user_menu` where `type_set`=? ORDER BY `pos2` ASC', ['settings']);
while ($post_menu = $q_menu->row()) {
if ($post_menu['type'] != 'inc') {
if ($post_menu['type']=='link') {
echo "<a class='menu_s' style='display: block' href='$post_menu[url]'>";
} else {
echo "<div class='menu_razd'>";
}
echo lang($post_menu['name']);
if ($post_menu['type'] == 'link') {
echo "</a>";
} else {
echo "</div>";
}
} else {
if ($post_menu['type'] =='inc' and is_file(H.'sys/user/settings/'.$post_menu['url'])) {
include_once H.'sys/user/settings/'.$post_menu['url'];
}
}
}
$cached = fopen($cache_file, 'w');
fwrite($cached, ob_get_contents());
fclose($cached);
ob_end_flush(); # Отправялем вывод в браузер
}