View file modules/news/comments.php

File size: 927B
<?php
/**********************************
*	@package: PerfCMS			  *
*	@year: 2012					  *
*	@author: Artas				  *
*	@link: http://perfcms.pp.ua	  *
**********************************/
$locate = 'in_news';
$news_id = abs(intval($_GET['news_id']));
$news_t = $db->query("SELECT * FROM `news` WHERE `id` = '". $news_id ."'")->fetch();
$title = $lang->word('comments') .' | '. $news_t['name'] .' | '.$lang->word('news');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('comments') .' | '. $news_t['name']);
if(isset($user))
{
$tpl->div('menu', '<a href="/news/add_comment/?news_id='. $_GET['news_id'] .'">'. $lang->word('add_comment') .'</a>');
}
$comments = new Comments('news', $news_id);
$comments->view();
$tpl->div('block', NEWS_ICON .' <a href="/news/">'. $lang->word('news') .'</a><br/>' . HICO .' <a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>