<?
if(isset($_GET['end'])){
mysql_query("UPDATE `kolhoz_user` SET `safe` = '".($ku['safe']=20)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");
}
if(isset($_GET['plc'])){
if ($ku['safe'] == 20){
if($ku['rubies']>=20000){
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-20000)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `safe` = '".($ku['safe']+20)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");}else{$_SESSION['rubies']=20000-$ku['rubies'];
header("Location:?safe&r_end");}
}
if ($ku['safe'] == 40){
if($ku['rubies']>=40000){
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-40000)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `safe` = '".($ku['safe']+20)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");}else{$_SESSION['rubies']=40000-$ku['rubies'];
header("Location:?safe&r_end");}
}
if ($ku['safe'] == 60){
if($ku['rubies']>=60000){
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-60000)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `safe` = '".($ku['safe']+20)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");}else{$_SESSION['rubies']=60000-$ku['rubies'];
header("Location:?safe&r_end");}
}
if ($ku['safe'] == 80){
if($ku['rubies']>=80000){
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-80000)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `safe` = '".($ku['safe']+20)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");}else{$_SESSION['rubies']=80000-$ku['rubies'];
header("Location:?safe&r_end");}
}
}
if(isset($_GET['plus'])){
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><div class='block'><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&ur_vzlom&plus&plc'><span> Да, подтверждаю</span></a></li><li><img alt='' width='16' height='16' src='img/icons/cross.png'> <a href='?safe'><span> Нет, отказываюсь</span></a></li></ul></div>";
include_once 'inc/foot.php';
}
if(isset($_GET['cl'])){
echo "<div class='event'><h1>Подтверждение</h1></div><div class='content'><div class='block'><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&ur_vzlom&cl&end'><span> Да, подтверждаю</span></a></li><li><img alt='' width='16' height='16' src='img/icons/cross.png'> <a href='?safe'><span> Нет, отказываюсь</span></a></li></ul></div>";
include_once 'inc/foot.php';
}
?>