Файл: public_html/modules/share/add_dir.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($user['level'] < '6') { go('/'); }
if(isset($_POST['create']) && $_GET['act'] == 'create') {
$name = substr(input($_POST['name']), 0, 90);
$desc = substr(input($_POST['desc']), 0, 200);
$db->query("INSERT INTO `share`(`name`, `desc`) VALUES('".$name."', '$desc')");
// print_r($db->errorInfo());
go('/share/');
}
$title = $lang->word('create_dir');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('create_dir'));
echo '<form action="/share/add_dir/?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/>
<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');
?>