Файл: public_html/modules/share/add_comment.php
Строк: 33
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.net *
* ------------------------------- *
* @package: PerfCMS Ultra *
* @year: 2013 *
* @author: wanya26ua & Tesla *
* @link: http://perfclub.ru *
**********************************/
$locate = 'in_share';
if(!isset($user)) { go('/'); }
if(!empty($_GET['share_id'])) {
if(isset($_POST['create']) && $_GET['act'] == 'create') {
$comments = new Comments('share_files', $_GET['share_id'], '', 'share', 'file');
$comments->add($_POST['text']);
}
$title = $lang->word('add_comment');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('add_comment'));
echo '<form action="/share/add_comment/?act=create&share_id='. abs(intval($_GET['share_id'])) .'" method="post">
<div class="menu">
<b>'. $lang->word('message') .'</b>:<br/>
<textarea name="text" rows="5" cols="26">'.(isset($_GET['reply_to']) ? '[b]'.input($_GET['reply_to']).'[/b], ' : NULL).'</textarea><br/>
<input name="create" type="submit" value="'. $lang->word('create') .'" /><br/>
</div>
</form>';
$tpl->div('block', NAV .'<a href="/share/'. abs(intval($_GET['share_id'])) .'/comments/">'. $lang->word('back') .'</a><br/>' . NAV .'<a href="/news/">'. $lang->word('news') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
} else { go('/'); }
?>