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