Файл: modules/pages/page.php
Строк: 38
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
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'];
include_header($title);
$tpl->div('title', $page['name']);
$tpl->div('post', output($page['text']));
$tpl->div('block', HICO .'<a href="/">'. _t('home').'</a>');
include_footer();
} else { go('/'); }
?>