Файл: core/modules/static.php
Строк: 24
<?php
if (!defined('CMS')) { die('Access Denied!'); }
$row = $db->selectRow( "SELECT * FROM ?_pages WHERE `name` = ? AND `active` = '1' LIMIT 1", $mod );
if (!empty($row)) {
show_header($row['title'], $row['keys'], $row['desc']);
$row['text'] = html_entity_decode($row['text'], ENT_QUOTES, 'UTF-8');
if ($row['allow_br'] == 1) echo '<div class="bl">' . nl2br(bb_code(smiles($row['text']))) . '</div>';
else echo '<div class="bl">' . bb_code(smiles($row['text'])) . '</div>';
//echo '<div class="bl">Просмотров: <b>' . intval($row['views']) . '</b><br />';
//echo 'Опубликовано: ' . date('d.m.Y в H:i', strtotime($row['date'])) . '<br /></div>';
if ($config['share_links'] == 1) echo '<div class="bl"><script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script>
<div class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="button" data-yashareQuickServices="yaru,vkontakte,facebook,twitter,odnoklassniki,moimir,lj,moikrug"></div></div>';
if (is_admin(array(101))) {
echo '<div class="bl">' . icon('list.png');
echo '<a href="' . gen_admin('?m=static&' . RND) . '">Управление</a></div>';
}
else {
if ( empty($_SESSION[SP]['views'][$row['id']]) ) {
$db->query( "UPDATE ?_pages SET `views` = (`views` + 1) WHERE `id` = ? LIMIT 1", $row['id'] );
}
$_SESSION[SP]['views'][$row['id']] = 1;
}
}
else {
$inSes->addMessage('Ошибка 404! Страница не найдена или ссылка не верна!');
gen_red('index', '', RND);
}
?>