<?
if(isset($_GET['sh_clean_grounds']) && isset($_GET['ok']))
{
if($ku['time_cp']>$time)
{
$cena=$ku['count_cp']*10;
if($ku['rubies']<$cena)
{
$_SESSION['no_rubies']=$cena-$ku['rubies'];
header("Location:?sh_myfarm");
exit;
}
}
mysql_querll("UPDATE `kolhoz_ground_sh` SET `id_plant` = '0', `cultivator` = '0', `time` = '$time' WHERE `id_user` = '$ku[id]'");
mysql_querll("UPDATE `kolhoz_user` SET `last_plant_sh` = '0', `last_soil_sh` = '0', `count_cp` = '".($ku['count_cp']+1)."', `time_cp` = '".($time+(3600*24))."'".($ku['time_cp']>$time?", `rubies` = '".($ku['rubies']-$cena)."'":null)." WHERE `id` = '$ku[id]'");
$_SESSION['cp']=1;
header("Location:?sh_myfarm");
exit;
}
elseif(isset($_GET['sh_clean_grounds']))
{
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="img/icons/tick.png"> <a href="?sh_myfarm&sh_clean_grounds&ok"><span>
Да, подтверждаю</span></a></li><li><img alt="" width="16" height="16" src="img/icons/cross.png"> <a href="?sh_myfarm"><span>
Нет, отказываюсь</span></a></li></ul>';
include_once 'inc/foot.php';
}
?>