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