<? include('checkcookie.php'); ?>
<?
if (isset($_POST["catmouse"]))
{
	$catmouse=$_POST["catmouse"];
        $catmilk=$_POST["catmilk"];
	$catbrod=$_POST["catbrod"];


	mysql_query("update tb_config set price='$catmouse' where item='catmouse'");
        mysql_query("update tb_config set price='$catmilk' where item='catmilk'");
	mysql_query("update tb_config set price='$catbrod' where item='catbrod'");

	echo "<font color=\"green\"><b>Настройки сохранены</b></font><br><br>";
}
?>

<form method="post" action="adminmain.php?p=gamecfg">

<?
$sql="select price from tb_config where item='catmouse'";
$res=mysql_query($sql);
$catmouse=mysql_result($res,0,0);

$sql="select price from tb_config where item='catmilk'";
$res=mysql_query($sql);
$catmilk=mysql_result($res,0,0);

$sql="select price from tb_config where item='catbrod'";
$res=mysql_query($sql);
$catbrod=mysql_result($res,0,0);

?>

<h3>Настройка игры {Накорми кота}</h3><br>
<table>
<tr>
<th width="200">Оплата Батона</th><td><input type="text" name="catbrod" value="<?=$catbrod ?>" size="30" maxlength="30"></td></tr>
<tr>
<th width="200">Оплата Молока</th><td><input type="text" name="catmilk" value="<?=$catmilk ?>" size="30" maxlength="30"></td></tr>
<tr>
<th width="200">Оплата Мышки=)</th><td><input type="text" name="catmouse" value="<?=$catmouse ?>" size="30" maxlength="30"></td></tr>
<tr>

</table>

<button type="submit">Сохранить</button>
</form>

