File size: 814B
<?php
include '../inc/db.php';
include '../inc/1.php';
if ($user['admin']<1){
header("Location: /index.php");
exit;
}
if (!$_POST['regmess']){
$user=mysql_fetch_assoc(mysql_query("SELECT `reg_bot` FROM `user` WHERE `id` = '1'"));
$reg_bot=htmlspecialchars($user['reg_bot']);
echo "<div class='t2'>Бот регистрации</div>";
echo "<div class='p0'><form action='?' method='POST'>Сообщение:<br><textarea name='regmess'>$reg_bot</textarea><br><input type='submit' value='Сохранить'></form>*{id} - ID пользователя<br>**{nick} - Ник пользователя</div>";
}
else
{
mysql_query("UPDATE `user` SET `reg_bot` = '".mysql_real_escape_string($_POST['regmess'])."' WHERE `id` = '1'");
header("Location: /admin/index.php");
}
include '../inc/foot.php';
?>