Файл: modules/forum/add_forum.php
Строк: 28
<?php
$locate = 'in_forum';
if($user['level'] < '6') { go('/'); exit;}
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 `forum`(`name`, `desc`, `pos`) VALUES('".$name."', '$desc', 0)");
go('/forum/');
}
$title = $lang->word('create_forum');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('create_forum'));
echo '<form action="/forum/add_forum/?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/>
<input name="create" type="submit" value="'. $lang->word('create_forum') .'" /><br/>
</div>
</form>';
$tpl->div('block', img('forum.png') .'<a href="/forum/">'. $lang->word('forum') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>