Файл: modules/pages/page.php
Строк: 15
<?php
if(isset($_GET['page_id']) && isset($_GET['page_name'])) {
if($db->query("SELECT * FROM `pages` WHERE `id` = '".abs(intval($_GET['page_id']))."' AND `lat_name` = '". cyrlat($_GET['page_name']) ."'")->rowCount() == 0) {
go('/');
exit;
}
$locate = 'in_site';
$page = $db->query("SELECT * FROM `pages` WHERE `id` = '".abs(intval($_GET['page_id']))."' AND `lat_name` = '". cyrlat($_GET['page_name']) ."'")->fetch();
$title = $page['name'];
require_once(SYS.'/view/header.php');
$tpl->div('title', $page['name']);
$tpl->div('post', output($page['text']));
$tpl->div('block', HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
} else { go('/'); }
?>