Размер файла: 1.51Kb
<?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('/share/');
}
if(isset($_POST['create']) && $_GET['act'] == 'create') {
$name = substr(input($_POST['name']), 0, 45);
$db->query("INSERT INTO `share_c`(`name`, `rid`, `who_upload`) VALUES('".$name."', '". abs(intval($_GET['rid']))."', '". abs(intval($_POST['who_upload']))."')");
go('/share/'. 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="/share/add_folder/'. $_GET['rid'] .'/?act=create" method="post">
<div class="menu">
<b>'. $lang->word('name') .'</b>:<br/>
<input name="name" 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="/share/">'. $lang->word('share') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>