View file modules/downloads/comments.php

File size: 1.15Kb
<?php
/**********************************
*	@package: PerfCMS			  *
*	@year: 2012					  *
*	@author: Artas				  *
*	@link: http://perfcms.pp.ua	  *
**********************************/
$locate = 'in_downloads';
$downloads_id = abs(intval($_GET['id']));
$_GET['downloads_id'] = $downloads_id;
$downloads_t = $db->query("SELECT * FROM `downloads_files` WHERE `id` = '". $downloads_id ."'")->fetch();
$title = $lang->word('comments') .' | '. $downloads_t['name'] .' | '.$lang->word('downloads');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('comments') .' | '. $downloads_t['name']);
if(isset($user)) {
$tpl->div('menu', '<a href="/downloads/add_comment/?downloads_id='. abs(intval($_GET['downloads_id'])) .'">'. $lang->word('add_comment') .'</a>');
}
$comments = new Comments('downloads', $downloads_id);
$comments->view();
$tpl->div('block', NAV .'<a href="/downloads/file/'. abs(intval($_GET['downloads_id'])) .'/">'. $lang->word('back') .'</a><br/>' . img('download.png') .' <a href="/downloads/">'. $lang->word('downloads') .'</a><br/>' . HICO .' <a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>