Файл: inc/cellar/clean_polka.php
Строк: 33
<?
$title='Очистка полок';
include_once '../system/config.php';
if(isset($_GET['clean_polka']) && isset($_GET['ok']))
{
if($ku['time_cp2']>$time)
{
$cena=0;
if($ku['rubies']<$cena)
{
$_SESSION['no_rubies']=$cena-$ku['rubies'];
header("Location:/cellar");
exit;
}
}
mysql_query("UPDATE `kolhoz_polka` SET `id_recipes` = '0', `clean` = '0', `time` = '$time' WHERE `id_user` = '$ku[id]'");
mysql_query("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:/cellar");
exit;
}
elseif(isset($_GET['clean_polka']))
{
echo"<div class='rzd2'></div><div class='menuin2'>";
echo '<div class="title">Подтверждение</h2></div><div class="content"><ul class="div"><li><span >Вы уверены?</span></li><li class="pt"><img alt="" src="/img/icons/tick.png"> <a href="/cellar/ClearShelf/ok/"><span>
Да, подтверждаю</span></a></li><li><img alt="" src="/img/icons/cross.png"> <a href="/cellar"><span>Нет, отказываюсь</span></a></li></ul>';
echo"</div></div><div class='rzd2'></div>";
include_once '../system/foot.php';
}
?>