File size: 1.9Kb
<?
include_once "../SYSTEM/include/functions.php";
include_once "../SYSTEM/include/mysql.php";
include_once "../SYSTEM/include/param.php";
include_once "../SYSTEM/include/ban.php";
include_once "../SYSTEM/include/sess.php";
include_once "../SYSTEM/include/ban_2.php";
include_once "../SYSTEM/include/theme.php";
$title='Создать подфорум';
$mesto='Создает подфорум';
head();
if (!isset($user) || $user['level']<3)
{
header("Location: index.php?".SID."&");
exit;
}
if (isset($_GET['act']) && $_GET['act']=='add' && isset($_POST['name']) && isset($_POST['num']))
{
$name=$_POST['name'];
$num=intval($_POST['num']);
if (isset($_POST['tr']))
{
$name=translit($name);
}
$name=stripslashes(htmlspecialchars($name));
$name_t=$name;
mysql_query("INSERT INTO `$mysql[pref]forum_f` (name, num, t_created)
values('$name_t', '$num', '$time')");
action("Создание подфорума");
header("Location: index.php?".SID."&msg=add_f");
exit;
}
echo "<div class=\"h\"><b>Добавить форум</b></div><hr />\n";
if ($mail_in_new>0)echo "<div class=\"privat\"><img src=\"../SYSTEM/themes/$them/img/mail0.gif\" alt=\"\" /> <a href=\"../mail.php?act=in\">Приват</a> [$mail_in_new]</div><hr />\n";
echo "<form method=\"post\" action=\"add_f.php?act=add\">\n";
echo "Название:<br />\n<input name=\"name\" class=\"form\" type=\"text\" /><br />\n";
echo "Позиция:<br />\n<input name=\"num\" class=\"form\" type=\"text\" value=\"1\" /><br />\n";
echo "<input type=\"checkbox\" name=\"tr\" value=\"1\" /> Транслит<br />\n";
echo "<input value=\"Добавить\" class=\"form\" type=\"submit\" />\n";
echo "</form>\n";
echo "<br />\n";
echo "<a href=\"index.php\">Вернуться</a>\n";
echo "<br /><a href=\"../index.php\">На главную</a><br />\n";
foot();
?>