Просмотр файла modules/forum/add_forum.php

Размер файла: 1Kb
  1. <?php
  2. /**********************************
  3. * @package: PerfCMS *
  4. * @year: 2012 *
  5. * @author: Artas *
  6. * @link: http://perfcms.pp.ua *
  7. **********************************/
  8. $locate = 'in_forum';
  9. if($user['level'] < '6') { go('/'); }
  10. if(isset($_POST['create']) && $_GET['act'] == 'create') {
  11. $name = substr(input($_POST['name']), 0, 45);
  12. $db->query("INSERT INTO `forum`(`name`) VALUES('".$name."')");
  13. go('/forum/');
  14. }
  15. $title = $lang->word('create_forum');
  16. require_once(SYS.'/view/header.php');
  17. $tpl->div('title', $lang->word('create_forum'));
  18. echo '<form action="/forum/add_forum/?act=create" method="post">
  19. <div class="menu">
  20. <b>'. $lang->word('name') .'</b>:<br/>
  21. <input name="name" type="text" /><br/>
  22. <input name="create" type="submit" value="'. $lang->word('create') .'" /><br/>
  23. </div>
  24. </form>';
  25. $tpl->div('block', NAV .'<a href="/forum/">'. $lang->word('forum') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
  26. require_once(SYS.'/view/footer.php');
  27. ?>