Файл: inc/new_treeground.php
Строк: 28
<?
if(isset($_GET['new_petground']) && mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_treeground` WHERE `id_user` = '$ku[id]'"),0)<200)
{
if(isset($_GET['ok']))
{
$cena=150;
if($ku['euro']>=$cena)
{
mysql_querll("INSERT INTO `kolhoz_treeground` SET `id_user` = '$ku[id]'");
mysql_querll("UPDATE `kolhoz_user` SET `euro` = '".($ku['euro']-$cena)."' WHERE `id` = '$ku[id]'");
}
else
{
echo'Не хватает евро';
}
header("Location:?mytreefarm&".passgen());
exit;
}
else
{
echo '<div class="event"><h1>Подтверждение</h1></div><div class="content"><ul class="block"><li><span class="title">Вы уверены?</span></li><li class="pt"><img alt="" width="16" height="16" src="images/icons/tick.png"> <a href="?mytreefarm&new_petground&ok"><span>Да, подтверждаю</span></a></li><li><img alt="" width="16" height="16" src="images/icons/cross.png"> <a href="?mytreefarm"><span>
Нет, отказываюсь</span></a></li></ul>';
include_once 'inc/foot.php';
}
}
?>