Просмотр файла modules/padmin/pages.php

Размер файла: 1.28Kb
  1. <?php
  2. /**********************************
  3. * @package: PerfCMS *
  4. * @year: 2012 *
  5. * @author: Artas *
  6. * @link: http://perfcms.pp.ua *
  7. **********************************/
  8. $locate = 'in_padmin';
  9. if(isset($user) && $user['level'] >= 6) {
  10. $title = $lang->word('padmin_pages');
  11. require_once(SYS.'/view/header.php');
  12. $tpl->div('title', $lang->word('padmin_pages'));
  13. $pages_r = $db->query("SELECT * FROM `pages`")->rowCount();
  14. $paginator = new Paginator($pages_r, $ames);
  15. if($pages_r == 0) {
  16. $tpl->div('menu', $lang->word('no_pages'));
  17. } else {
  18. $pages_q = $db->query("SELECT * FROM `pages` ORDER BY name DESC LIMIT $start, $ames");
  19. while($pages = $pages_q->fetch()) {
  20. $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>]');
  21. }
  22. $paginator->view('/padmin/?');
  23. }
  24. $tpl->div('block', img('nav.png') .'<a href="/padmin/add-page/">'. $lang->word('add_page') .'</a><br/>'. img('admin.png') .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home') .'</a>');
  25. require_once(SYS.'/view/footer.php');
  26. } else { go('/'); }
  27. ?>