Файл: modules/share/add_folder.php
Строк: 42
<?php
$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, 90);
$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('/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/'. abs(intval($_GET['rid'])) .'/?act=create" method="post">
<div class="menu">
<b>'. $lang->word('form_album_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').'</option>
</select><br/>
<input name="create" type="submit" value="'. $lang->word('create') .'" /><br/>
</div>
</form>';
$tpl->div('block', img('share.png') .'<a href="/share/">'. $lang->word('share') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>