Просмотр файла modules/news/comments.php

Размер файла: 927B
  1. <?php
  2. /**********************************
  3. * @package: PerfCMS *
  4. * @year: 2012 *
  5. * @author: Artas *
  6. * @link: http://perfcms.pp.ua *
  7. **********************************/
  8. $locate = 'in_news';
  9. $news_id = abs(intval($_GET['news_id']));
  10. $news_t = $db->query("SELECT * FROM `news` WHERE `id` = '". $news_id ."'")->fetch();
  11. $title = $lang->word('comments') .' | '. $news_t['name'] .' | '.$lang->word('news');
  12. require_once(SYS.'/view/header.php');
  13. $tpl->div('title', $lang->word('comments') .' | '. $news_t['name']);
  14. if(isset($user))
  15. {
  16. $tpl->div('menu', '<a href="/news/add_comment/?news_id='. $_GET['news_id'] .'">'. $lang->word('add_comment') .'</a>');
  17. }
  18. $comments = new Comments('news', $news_id);
  19. $comments->view();
  20. $tpl->div('block', NEWS_ICON .' <a href="/news/">'. $lang->word('news') .'</a><br/>' . HICO .' <a href="/">'. $lang->word('home').'</a>');
  21. require_once(SYS.'/view/footer.php');
  22. ?>