Вход Регистрация
Файл: public_html/modules/news/add_news.php
Строк: 39
<?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_news';
if(
$user['level'] < '6') { go('/'); }
if(isset(
$_POST['create']) && $_GET['act'] == 'create') {
$name substr(input($_POST['name']), 0100);
$text substr(input($_POST['text']), 03000);
$db->query("INSERT INTO `news`(`name`, `text`, `time`, `user_id`) VALUES('".$name."', '"$text ."', '"time() ."', '"$user['id']."')");
go('/news/');
}
$title $lang->word('add_news');
require_once(
SYS.'/view/header.php');
$tpl->div('title'$lang->word('add_news'));
echo 
'<form action="/news/add_news/?act=create" method="post">
        <div class="menu">
            <b>'
$lang->word('name') .'</b>:<br/>
            <input name="name" type="text" /><br/>
            <b>'
$lang->word('message') .'</b>:<br/>
            <textarea name="text" rows="5" cols="26"></textarea><br/>
            <input name="create" type="submit" value="'
$lang->word('create') .'" /><br/>
        </div>
        </form>'
;
        
$tpl->div('block'NAV .'<a href="/news/">'$lang->word('news') .'</a><br/>' HICO .'<a href="/">'$lang->word('home').'</a>');
require_once(
SYS.'/view/footer.php');
?>
Онлайн: 0
Реклама