<?
if(isset($_GET['clean_ponds']) && isset($_GET['ok']))
{
if($ku['time_fp']>$time)
{
$cena=$ku['count_fp']*10;
if($ku['rubies']<$cena)
{
$_SESSION['no_rubies']=$cena-$ku['rubies'];
header("Location:?ozero");
exit;
}
}
mysql_querll("UPDATE `kolhoz_pond` SET `id_plant` = '0', `cultivator` = '0', `time` = '$time' WHERE `id_user` = '$ku[id]'");
mysql_querll("UPDATE `kolhoz_user` SET `last_fish` = '0', `last_korm` = '0', `count_fp` = '".($ku['count_fp']+1)."', `time_fp` = '".($time+(3600*24))."'".($ku['time_fp']>$time?", `rubies` = '".($ku['rubies']-$cena)."'":null)." WHERE `id` = '$ku[id]'");
$_SESSION['fp']=1;
header("Location:?ozero");
exit;
}
elseif(isset($_GET['clean_ponds']))
{
echo '<div class="event"><h1>1Подтверждение</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="?ozero&clean_ponds&ok"><span>
Да, подтверждаю</span></a></li><li><img alt="" width="16" height="16" src="img/icons/cross.png"> <a href="?ozero"><span>
Нет, отказываюсь</span></a></li></ul>';
include_once 'inc/foot.php';
}
?>