Файл: public_html/modules/library/add_cat.php
Строк: 22
<?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_library';
if($user['level'] < '5') { go('/'); }
if(isset($_POST['create']) && $_GET['act'] == 'create') {
$title = substr(input($_POST['title']), 0, 100);
$db->query("INSERT INTO `library_cats`(`title`) VALUES('".$title."')");
go('/library/');
}
$title = $lang->word('add_cat');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('add_cat'));
echo '<form action="/library/add_lib_cat/?act=create" method="post">
<div class="menu">
<b>'. $lang->word('name') .'</b>:<br/>
<input name="title" type="text" /><br/>
<input name="create" type="submit" value="'. $lang->word('create') .'" /><br/>
</div>
</form>';
$tpl->div('block', NAV .'<a href="/library/">'. $lang->word('library') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
?>