Файл: edit_game.php
Строк: 28
<?php
include ("functions.php");
$edit = "edit";
if($_GET['page']==$edit)
{
include ("conf.php");
include ("lock.php");
if ($user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
bann($user);
include ("head.php");
$mypass = $myrow['pass'];
print <<<sss
<div class='nav'>
<form name="form1" action="edit_game.php?page=update&user=$user&pass=$pass" method="post">
Дизайн игры: <br />
<select size="1" name="style">
<option value="smart">Стандартный</option>
</select>
<br /><input type="submit" value="Изменить">
</form>
</div><a href=menu.php?user=$user&pass=$pass>В меню</a>
sss;
include ("foot.php");
}
else
{
echo "Ошибка! Неверный <b>Ник</b> или <b>Пароль</b><br />";
echo <<<sss
<a href="index.php">На главную</a>
sss;
}
}
$update = "update";
if($_GET['page']==$update)
{
include ("head.php");
include ("conf.php");
$id = $myrow['id'];
$style = $_POST['style'];
mysql_query("UPDATE userlist SET style='".mysql_real_escape_string($style)."' WHERE id='$id'",$db);
echo "<div class='nav'>";
echo "Настройки сохранены!<br /></div>";
echo "<a href=menu.php?user=$user&pass=$pass>В меню</a>";
include ("foot.php");
}
?>