Файл: modules/downloads/comments.php
Строк: 74
<?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_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();
if(User::logged())
{
$db->query("UPDATE `notify` SET `read` = '1' WHERE `request_id` = '/downloads/comments/".$downloads_id."' AND `user_id` = '".User::Id()."' AND `type` = 'notify_comments_reply'");
$db->query("UPDATE `notify` SET `read` = '1' WHERE `request_id` = '/downloads/comments/".$downloads_id."' AND `user_id` = '".User::Id()."' AND `type` = 'notify_file_reply'");
}
$title = _t('comments') .' | '. $downloads_t['name'] .' | '._t('downloads');
include_header($title);
$tpl->div('title', _t('comments') .' | '. $downloads_t['name']);
if(User::logged())
{
$tpl->div('menu', '<a href="/downloads/add_comment/?downloads_id='. $downloads_id .'">'. _t('add_comment') .'</a>');
}
$comments = new Comments('downloads', $downloads_id, '', 'downloads', 'downloads_files');
$comments->view();
$tpl->div('block', NAV .'<a href="/downloads/file/'. $downloads_id .'/">'. _t('back') .'</a><br/>' . img('download.png') .' <a href="/downloads/">'. _t('downloads') .'</a><br/>' . HICO .' <a href="/">'. _t('home').'</a>');
include_footer();
?>