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