Файл: modules/domens/add_folder.php
Строк: 47
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.ru *
**********************************/
$locate = 'in_share';
if($user['level'] < '6' || !isset($_GET['rid'])) { go('/'); }
if($db->query("SELECT * FROM `share` WHERE `id` = '". $_GET['rid'] ."'")->rowCount() == 0) {
go('/domens/');
}
if(isset($_POST['create']) && $_GET['act'] == 'create') {
$name = substr(input($_POST['name']), 0, 45);
$desc = substr(input($_POST['desc']), 0, 160);
$db->query("INSERT INTO `share_c`(`name`, `rid`, `who_upload`, `desc`) VALUES('".$name."', '". abs(intval($_GET['rid']))."', '". abs(intval($_POST['who_upload']))."', '". $desc ."')");
go('/domens/'. ABS(INTVAL($_GET['rid'])));
}
$title = $lang->word('create_dir');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('create_dir'));
echo '<form action="/domens/add_folder/'. abs(intval($_GET['rid'])) .'/?act=create" method="post">
<div class="menu">
<b>'. $lang->word('name') .'</b>:<br/>
<input name="name" type="text" /><br/>
<b>'. $lang->word('desc') .'</b>:<br/>
<input name="desc" type="text" /><br/>
<b>'.$lang->word('who_upload').'</b>:<br/>
<select name="who_upload">
<option value="1">'.$lang->word('administration').'</option>
<option value="2">'.$lang->word('alls').' '.$lang->word('regs').'</option>
</select><br/>
<input name="create" type="submit" value="'. $lang->word('create') .'" /><br/>
</div>
</form>';
$tpl->div('block', NAV .'<a href="/domens/">'. $lang->word('share') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>