Файл: modules/padmin/pages.php
Строк: 53
<?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
*/
$locate = 'in_padmin';
if(isset($user) && $user['level'] >= 6) {
$title = _t('padmin_pages');
include_header($title);
$tpl->div('title', _t('padmin_pages'));
$pages_r = $db->query("SELECT * FROM `pages`")->rowCount();
$paginator = new Paginator($pages_r, $ames);
if($pages_r == 0) {
$tpl->div('menu', _t('no_pages'));
} else {
$pages_q = $db->query("SELECT * FROM `pages` ORDER BY name DESC LIMIT $start, $ames");
while($pages = $pages_q->fetch()) {
$tpl->div('menu', NAV .' <a href="/pages/'. $pages['id'].'-'. cyrlat($pages['lat_name']).'.html">'.$pages['name'].'</a> [<a href="/padmin/edit-page/'. $pages['id'].'/">'. img('edit.png') .'</a> | <a href="/padmin/delete-page/'. $pages['id'].'/">'. img('delete.png') .'</a>]');
}
$paginator->view();
}
$tpl->div('block', img('nav.png') .'<a href="/padmin/add-page/">'. _t('add_page') .'</a><br/>'. img('admin.png') .'<a href="/padmin/">'. _t('padmin') .'</a><br/>'. HICO .'<a href="/">'. _t('home') .'</a>');
include_footer();
} else { go('/'); }
?>