<?php





if($ku['level']<30)
{
echo "<div class='event'><h1>Хранилище</h1></div>";
echo "<div class='content'>";echo "<div class='block'>";



echo "<div class='block'><center><img src='safe/img/safe_off.png' alt='*'> <img src='safe/img/safe_off.png' alt='*'> <img src='safe/img/safe_off.png' alt='*'></div>";
//echo "<div class='xr'></div><div class='block'><span class='small minor'>Осталось отмычек:</span> <img src='safe/img/kl.png' alt='o'><font color='#33FFCC'>".$ku['kluch_bank']."</font></div><div class='xr'></div><div class='block'><span class='small minor'>Вероятность, что отмычка подойдет: "; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='*'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='*'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='*'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='*'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='*'>";} echo "<font color='violet'>".$ku['safe']."</font>/<font color='#33FFCC'>100</font>%</span></div><a href='?safe&kluch'>Купить <img src='safe/img/kl.png' alt='o'><b>10</b> отмычек за <img width='16' height='16' src='img/icons/zkl.png' alt='o'><b>1</b></a></center></div><div class='xr'></div>";
//echo "<div class='block'>"; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='o'>";} echo " Уровень успеха: "; if ($ku['safe'] == 20){echo "<img width='14' height='14' src='safe/img/1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img width='14' height='14' src='safe/img/2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img width='14' height='14' src='safe/img/3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img width='14' height='14' src='safe/img/4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img width='14' height='14' src='safe/img/5.png' alt='o'>";} echo " из <img width='14' height='14' src='safe/img/5x5.png' alt='o'>"; if($ku['safe']<99){echo "<br/><img src='safe/img/up.png' alt='o'> <a href='?safe&ur_vzlom&plus'>Повысить</a> <span class='small minor'>до: <b><font color='violet'>"; if ($ku['safe'] == 20){echo "40";}if ($ku['safe'] == 40){echo "60";}if ($ku['safe'] == 60){echo "80";}if ($ku['safe'] == 80){echo "100";} echo "</font></b>% (<font color='#ADFF2F'>"; if ($ku['safe'] == 20){echo "200";}if ($ku['safe'] == 40){echo "400";}if ($ku['safe'] == 60){echo "600";}if ($ku['safe'] == 80){echo "800";} echo "</font><img width='16' height='16' src='img/icons/ruby.png' alt='o'>)</span>";} echo "<br/><img width='16' height='16' src='safe/img/del.png' alt='o'> <a href='?safe&ur_vzlom&cl'>Сбросить все очки</a> <span class='small minor'>(до: <b>20</b>%)</span></div>";






echo'<img src="img/icons/owibochka.gif" alt="*"> Хранилище доступно со 30-го уровня!</center>';
include_once 'inc/foot.php';
echo "</div></div>";
exit;
}


//====
include_once 'safe/ur_vzlom.php';
include_once 'safe/saper.php';
include_once 'safe/faq.php';
include_once 'safe/atom.php';
if(isset($_SESSION['sap'])){echo "<div class='block'>Сапёр нанят на: <font color='green'><b>".time_left($ku['safe_time']-$time)."</b></font></div>";unset($_SESSION['sap']);}
if(isset($_GET['kluch']))
{
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&kluch&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></div>";
if(isset($_GET['ok'])){
if($ku['zkl']>=1){
mysql_query("UPDATE `kolhoz_user` SET `zkl` = '".($ku['zkl']-1)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `kluch_bank` = '".($ku['kluch_bank']+10)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");
}else{$_SESSION['zkl']=1-$ku['zkl'];
header("Location:?safe&r_end");}
}
include_once 'inc/foot.php';
} else {
if($ku['kluch_bank']<=0)
{
echo "<div class='event'><h1>Хранилище</h1></div><div class='block'><font color='darkorange'>У вас закончились отмычки</font></div>";
if(isset($_GET['r_end'])){if($ku['zkl']<1){if($ku['zkl']>0){echo "<div class='block'><font color='tomato'>У вас нет ключей</font><br/><img width='16' height='16' src='img/icons/zkl.png' alt='o'> <a href='?payment'>Купить ключей</a></div>";}} if($ku['zkl']<1)echo "<div class='block'><font color='orangered'>У вас нет ключей</font><br/><img width='16' height='16' src='img/icons/zkl.png' alt='o'> <a href='?payment'>Купить ключей</a></div>";}
echo "<div class='block'><center><img src='safe/img/safe_off.png' alt='*'> <img src='safe/img/safe_off.png' alt='*'> <img src='safe/img/safe_off.png' alt='*'></center></div>";
echo "<div class='block'><center><img src='safe/img/kl.png' alt='o'> <a href='?safe&vzlom'>Подобрать отмычку</a> ";
if ($ku['safe'] == 20){echo "(<b>1</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 40){echo "(<b>2</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 60){echo "(<b>3</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 80){echo "(<b>4</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 100){echo "(<b>5</b><img src='safe/img/kl.png' alt='o'>)";}
echo "<div class='xr'></div><div class='block'><span class='small minor'>Осталось отмычек:</span> <img src='safe/img/kl.png' alt='o'><font color='#33FFCC'>".$ku['kluch_bank']."</font></div><div class='xr'></div><div class='block'><span class='small minor'>Вероятность, что отмычка подойдет: "; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='*'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='*'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='*'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='*'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='*'>";} echo "<font color='violet'>".$ku['safe']."</font>/<font color='#33FFCC'>100</font>%</span></div><a href='?safe&kluch'>Купить <img src='safe/img/kl.png' alt='o'><b>10</b> отмычек за <img width='16' height='16' src='img/icons/zkl.png' alt='o'><b>1</b></a></center></div><div class='xr'></div>";
echo "<div class='block'>"; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='o'>";} echo " Уровень успеха: "; if ($ku['safe'] == 20){echo "<img width='14' height='14' src='safe/img/1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img width='14' height='14' src='safe/img/2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img width='14' height='14' src='safe/img/3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img width='14' height='14' src='safe/img/4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img width='14' height='14' src='safe/img/5.png' alt='o'>";} echo " из <img width='14' height='14' src='safe/img/5x5.png' alt='o'>"; if($ku['safe']<99){echo "<br/><img src='safe/img/up.png' alt='o'> <a href='?safe&ur_vzlom&plus'>Повысить</a> <span class='small minor'>до: <b><font color='violet'>"; if ($ku['safe'] == 20){echo "40";}if ($ku['safe'] == 40){echo "60";}if ($ku['safe'] == 60){echo "80";}if ($ku['safe'] == 80){echo "100";} echo "</font></b>% (<font color='#ADFF2F'>"; if ($ku['safe'] == 20){echo "200";}if ($ku['safe'] == 40){echo "400";}if ($ku['safe'] == 60){echo "600";}if ($ku['safe'] == 80){echo "800";} echo "</font><img width='16' height='16' src='img/icons/ruby.png' alt='o'>)</span>";} echo "<br/><img width='16' height='16' src='safe/img/del.png' alt='o'> <a href='?safe&ur_vzlom&cl'>Сбросить все очки</a> <span class='small minor'>(до: <b>20</b>%)</span></div>";
include_once 'inc/foot.php';
} else {
echo "<div class='event'><h1>Хранилище</h1></div>";
if(isset($_GET['r_end'])){if($ku['zkl']<1){if($ku['zkl']>0){echo "<div class='block'><font color='tomato'>У вас нет ключей</font><br/><img width='16' height='16' src='img/icons/zkl.png' alt='o'> <a href='?payment'>Купить ключей</a></div>";}} if($ku['zkl']<1)echo "<div class='block'><font color='orangered'>У вас нет ключей</font><br/><img width='16' height='16' src='img/icons/zkl.png' alt='o'> <a href='?payment'>Купить ключей</a></div>";}
if(isset($_GET['e_end'])){if($ku['energy']<5){if($ku['energy']>0){echo "<div class='block'><font color='tomato'>У вас мало энергии</font><br/><img width='16' height='16' src='safe/img/energy.png' alt='o'> <a href='?safe&atom'>Пополнить на <font color='violet'>100%</font></a></div>";}} if($ku['energy']<1)echo "<div class='block'><font color='orangered'>У вас нет энергии</font><br/><img width='16' height='16' src='safe/img/energy.png' alt='o'> <a href='?safe&atom'>Пополнить</a></div>";}

if ($ku['safe_police'] == 1){
if(isset($_GET['ups'])){
echo "<div class='block'><font color='darkorange'><b>Холмс</b> не взял взятку!</font><br/>Предложите еще раз.</div>";
}
if(isset($_GET['otkup'])){
if(isset($_GET['ok'])){
if($ku['rubies']>=1500){
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-1500)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `safe_police` = '".($ku['safe_police']=0)."' WHERE `id` = '$ku[id]'");
header("Location:?safe&ucpex");}else{$_SESSION['rubies']=1500-$ku['rubies'];
header("Location:?safe&r_end");}
}
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&otkup&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></div>";
include_once 'inc/foot.php';
}
echo "<div class='block'><center><img src='safe/img/police.jpg' alt='o'></center>";
echo "<div class='block'><div style='text-align:left;'><img width='40' height='40' src='safe/img/rabota.gif' alt='o'> Полицейский <font color='tomato'><b>Холмс</b></font></div><span class='small minor'>При попытке взломать сейф вас задержала полиция!<br/>Вас обвиняют в:<br/><u>Кражe с проникновением</u><br/>(ст. 158 УК РФ) тайное хищение чужого имущества.";
echo "</div></div><div class='xr'></div><div class='block'>";
$polic=rand(1,3);{
if($polic == 1){echo "<img src='safe/img/vz.png' alt='o'> <a href='?safe&ups'>Дать взятку</a> <img width='16' height='16' src='img/icons/ruby.png' alt='o'><b>1500</b>";}if($polic == 2){echo "<img src='safe/img/vz.png' alt='o'> <a href='?safe&otkup'>Дать взятку</a> <img width='16' height='16' src='img/icons/ruby.png' alt='o'><b>1500</b>";}if($polic == 3){echo "<img src='safe/img/vz.png' alt='o'> <a href='?safe&ups'>Дать взятку</a> <img width='16' height='16' src='img/icons/ruby.png' alt='o'><b>1500</b>";}
}
include_once 'inc/foot.php';
}
if ($ku['safe_bolnica'] == 1){
if(isset($_GET['sily'])){
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&sily&zd'><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>";
if(isset($_GET['zd'])){
if($ku['rubies']>=500){
mysql_query("UPDATE `kolhoz_user` SET `rubies` = '".($ku['rubies']-500)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `energy` = '".($ku['energy']=100)."' WHERE `id` = '$ku[id]'");
mysql_query("UPDATE `kolhoz_user` SET `safe_bolnica` = '".($ku['safe_bolnica']=0)."' WHERE `id` = '$ku[id]'");
header("Location:?safe");
}else{$_SESSION['rubies']=500-$ku['rubies'];
header("Location:?safe&r_end");}
}
include_once 'inc/foot.php';
}
echo "<div class='block'><center><img src='safe/img/interny.jpg' alt='o'></center><span class='small minor'>Открываемый вами сейф был заминирован!<br/>В результате взрыва вы оказались в больнице.. Вам необходимо набраться сил!</span><br/>";
echo "<img src='safe/img/energy.png' alt='o'> <a href='?safe&sily'>Поправить здоровье</a> за <img width='16' height='16' src='img/icons/ruby.png' alt='o'><b><font color='#33FFCC'>500</font></b>";
include_once 'inc/foot.php';
}
if ($ku['safe_police'] == 0 || $ku['safe_bolnica'] == 0){
if(isset($_GET['ucpex'])){
echo "<div class='block'><font color='violet'>Вы успешно отмазались!</font></div>";
}
$go=rand(1,50);
{
if ($ku['safe'] == 20){
$energy=rand(1,10);
$e=$energy;
$dolar=rand(100,300);
$baks=$dolar;
$kl=1;
}
if ($ku['safe'] == 40){
$energy=rand(1,20);
$e=$energy;
$dolar=rand(500,1000);
$baks=$dolar;
$kl=2;
$kl_plus=rand(1,2);
$klp=$kl_plus;
}
if ($ku['safe'] == 60){
$energy=rand(1,30);
$e=$energy;
$dolar=rand(1000,3000);
$baks=$dolar;
$kl=3;
$kl_plus=rand(1,3);
$klp=$kl_plus;
$ep=100;
}
if ($ku['safe'] == 80){
$energy=rand(1,40);
$e=$energy;
$dolar=rand(5000,7000);
$baks=$dolar;
$kl=4;
$kl_plus=rand(1,4);
$klp=$kl_plus;
$ep=150;
$bubl_plus=rand(100,500);
$bp=$bubl_plus;
}
if ($ku['safe'] == 100){
$energy=rand(1,50);
$e=$energy;
$dolar=rand(7000,10000);
$baks=$dolar;
$kl=5;
$kl_plus=rand(1,5);
$klp=$kl_plus;
$ep=200;
$kl2_plus=rand(1,5);
$kl2p=$kl2_plus;
}

if(isset($_GET['kl_end'])){echo "<div class='block'><font color='tomato'>У вас не хватает отмычек!</font><br/><span class='small minor'>У вас (<font color='snow'>".$ku['kluch_bank']."</font><img src='safe/img/kl.png' alt='o'>) а нужно: (<font color='snow'>".$kl."</font><img src='safe/img/kl.png' alt='o'>)</span></div>";

}

if(isset($_GET['vzlom'])){


if ($ku['safe'] == 20){
if($go == 1 || $go == 2 || $go == 3 || $go == 4 || $go == 5 || $go == 6 || $go == 7 || $go == 8 || $go == 9 || $go == 10 || $go == 11 || $go == 12 || $go == 13 || $go == 14 || $go == 15 || $go == 16 || $go == 17 || $go == 18 || $go == 19 || $go == 20 || $go == 21 || $go == 22 || $go == 23 || $go == 24 || $go == 25 || $go == 26 || $go == 27 || $go ==28 || $go == 29 || $go == 30 || $go == 31 || $go == 32 || $go == 33 || $go == 34 || $go == 35 || $go == 36 || $go == 37 || $go == 38 || $go == 39 || $go == 40 || $go == 41 || $go == 42 || $go == 43 || $go == 44 || $go == 45 || $go == 46 || $go == 47 || $go == 48 || $go == 49 || $go == 50){
include_once 'safe/'.$ku['safe'].'.php';
}
}

//ВЗЛОМ -40%

if ($ku['safe'] == 40){
if($go == 1 || $go == 2 || $go == 3 || $go == 4 || $go == 5 || $go == 6 || $go == 7 || $go == 8 || $go == 9 || $go == 10 || $go == 11 || $go == 12 || $go == 13 || $go == 14 || $go == 15 || $go == 16 || $go == 17 || $go == 18 || $go == 19 || $go == 20 || $go == 21 || $go == 22 || $go == 23 || $go == 24 || $go == 25 || $go == 26 || $go == 27 || $go ==28 || $go == 29 || $go == 30 || $go == 31 || $go == 32 || $go == 33 || $go == 34 || $go == 35 || $go == 36 || $go == 37 || $go == 38 || $go == 39 || $go == 40 || $go == 41 || $go == 42 || $go == 43 || $go == 44 || $go == 45 || $go == 46 || $go == 47 || $go == 48 || $go == 49 || $go == 50){
include_once 'safe/'.$ku['safe'].'.php';
}}


//ВЗЛОМ - 60%
if ($ku['safe'] == 60){
if($go == 1 || $go == 2 || $go == 3 || $go == 4 || $go == 5 || $go == 6 || $go == 7 || $go == 8 || $go == 9 || $go == 10 || $go == 11 || $go == 12 || $go == 13 || $go == 14 || $go == 15 || $go == 16 || $go == 17 || $go == 18 || $go == 19 || $go == 20 || $go == 21 || $go == 22 || $go == 23 || $go == 24 || $go == 25 || $go == 26 || $go == 27 || $go ==28 || $go == 29 || $go == 30 || $go == 31 || $go == 32 || $go == 33 || $go == 34 || $go == 35 || $go == 36 || $go == 37 || $go == 38 || $go == 39 || $go == 40 || $go == 41 || $go == 42 || $go == 43 || $go == 44 || $go == 45 || $go == 46 || $go == 47 || $go == 48 || $go == 49 || $go == 50){
include_once 'safe/'.$ku['safe'].'.php';
}}


//ВЗЛОМ 80%

if ($ku['safe'] == 80){
if($go == 1 || $go == 2 || $go == 3 || $go == 4 || $go == 5 || $go == 6 || $go == 7 || $go == 8 || $go == 9 || $go == 10 || $go == 11 || $go == 12 || $go == 13 || $go == 14 || $go == 15 || $go == 16 || $go == 17 || $go == 18 || $go == 19 || $go == 20 || $go == 21 || $go == 22 || $go == 23 || $go == 24 || $go == 25 || $go == 26 || $go == 27 || $go ==28 || $go == 29 || $go == 30 || $go == 31 || $go == 32 || $go == 33 || $go == 34 || $go == 35 || $go == 36 || $go == 37 || $go == 38 || $go == 39 || $go == 40 || $go == 41 || $go == 42 || $go == 43 || $go == 44 || $go == 45 || $go == 46 || $go == 47 || $go == 48 || $go == 49 || $go == 50){
include_once 'safe/'.$ku['safe'].'.php';
}}

//ВЗЛОМ 100%

if ($ku['safe'] == 100){
if($go == 1 || $go == 2 || $go == 3 || $go == 4 || $go == 5 || $go == 6 || $go == 7 || $go == 8 || $go == 9 || $go == 10 || $go == 11 || $go == 12 || $go == 13 || $go == 14 || $go == 15 || $go == 16 || $go == 17 || $go == 18 || $go == 19 || $go == 20 || $go == 21 || $go == 22 || $go == 23 || $go == 24 || $go == 25 || $go == 26 || $go == 27 || $go ==28 || $go == 29 || $go == 30 || $go == 31 || $go == 32 || $go == 33 || $go == 34 || $go == 35 || $go == 36 || $go == 37 || $go == 38 || $go == 39 || $go == 40 || $go == 41 || $go == 42 || $go == 43 || $go == 44 || $go == 45 || $go == 46 || $go == 47 || $go == 48 || $go == 49 || $go == 50){
include_once 'safe/'.$ku['safe'].'.php';
}}





echo "<div class='block'><center><img src='safe/img/kl.png' alt='o'> <a href='?safe&vzlom'>Подобрать отмычку</a> ";
if ($ku['safe'] == 20){echo "(<b>1</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 40){echo "(<b>2</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 60){echo "(<b>3</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 80){echo "(<b>4</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 100){echo "(<b>5</b><img src='safe/img/kl.png' alt='o'>)";}

echo "<div class='xr'></div><div class='block'><span class='small minor'>Осталось отмычек:</span> <img src='safe/img/kl.png' alt='o'><font color='#33FFCC'>".$ku['kluch_bank']."</font></div><div class='xr'></div><div class='block'><span class='small minor'>Вероятность, что отмычка подойдет: "; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='*'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='*'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='*'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='*'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='*'>";} echo "<font color='violet'>".$ku['safe']."</font>/<font color='#33FFCC'>100</font>%</span></div><a href='?safe&kluch'>Купить <img src='safe/img/kl.png' alt='o'><b>10</b> отмычек за <img width='16' height='16' src='img/icons/zkl.png' alt='o'><b>1</b></a></center></div><div class='xr'></div>";
echo "<div class='block'>"; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='o'>";} echo " Уровень успеха: "; if ($ku['safe'] == 20){echo "<img width='14' height='14' src='safe/img/1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img width='14' height='14' src='safe/img/2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img width='14' height='14' src='safe/img/3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img width='14' height='14' src='safe/img/4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img width='14' height='14' src='safe/img/5.png' alt='o'>";} echo " из <img width='14' height='14' src='safe/img/5x5.png' alt='o'>"; if($ku['safe']<99){echo "<br/><img src='safe/img/up.png' alt='o'> <a href='?safe&ur_vzlom&plus'>Повысить</a> <span class='small minor'>до: <b><font color='violet'>"; if ($ku['safe'] == 20){echo "40";}if ($ku['safe'] == 40){echo "60";}if ($ku['safe'] == 60){echo "80";}if ($ku['safe'] == 80){echo "100";} echo "</font></b>% (<font color='#ADFF2F'>"; if ($ku['safe'] == 20){echo "20000";}if ($ku['safe'] == 40){echo "40000";}if ($ku['safe'] == 60){echo "60000";}if ($ku['safe'] == 80){echo "80000";} echo "</font><img width='16' height='16' src='img/icons/ruby.png' alt='o'>)</span>";} echo "<br/><img width='16' height='16' src='safe/img/del.png' alt='o'> <a href='?safe&ur_vzlom&cl'>Сбросить все очки</a> <span class='small minor'>(до: <b>20</b>%)</span></div>";
echo "</div>";
include_once 'inc/foot.php';
}
}
}
}
}
echo "<div class='block'><center><img src='safe/img/safe_off.png' alt='o'> <img src='safe/img/safe_off.png' alt='o'> <img src='safe/img/safe_off.png' alt='o'></center></div>";
echo "<div class='block'><center><img src='safe/img/kl.png' alt='o'> <a href='?safe&vzlom'>Подобрать отмычку</a> ";
if ($ku['safe'] == 20){echo "(<b>1</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 40){echo "(<b>2</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 60){echo "(<b>3</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 80){echo "(<b>4</b><img src='safe/img/kl.png' alt='o'>)";}if ($ku['safe'] == 100){echo "(<b>5</b><img src='safe/img/kl.png' alt='o'>)";}

echo "<div class='xr'></div><div class='block'><span class='small minor'>Осталось отмычек:</span> <img src='safe/img/kl.png' alt='o'><font color='#33FFCC'>".$ku['kluch_bank']."</font></div><div class='xr'></div><div class='block'><span class='small minor'>Вероятность, что отмычка подойдет: "; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='*'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='*'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='*'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='*'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='*'>";} echo "<font color='violet'>".$ku['safe']."</font>/<font color='#33FFCC'>100</font>%</span></div><a href='?safe&kluch'>Купить <img src='safe/img/kl.png' alt='o'><b>10</b> отмычек за <img width='16' height='16' src='img/icons/zkl.png' alt='o'><b>1</b></a></center></div><div class='xr'></div>";
echo "<div class='block'><img src='safe/img/saper.png' alt='o'> Сапёр: "; if ($ku['safe_saper'] == 0){echo "<font color='tomato'>Уволен</font> ";}else{echo "<font color='green'>Работает</font> ";}
echo "".($ku['safe_time']>$time?"(<span class='small minor'>".time_left($ku['safe_time']-$time)."</span>)":"(<a href='?safe&saper'>Нанять</a> <img width='16' height='16' src='img/icons/ruby.png' alt='o'><font color='#33FFCC'>300</font>)")."</div>";
if ($ku['safe_time']<$time){mysql_query("UPDATE `kolhoz_user` SET `safe_saper` = '".($ku['safe_saper']=0)."' WHERE `id` = '$ku[id]'");}





echo "<div class='block'>"; if ($ku['safe'] == 20){echo "<img src='safe/img/safe_ur-1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img src='safe/img/safe_ur-2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img src='safe/img/safe_ur-3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img src='safe/img/safe_ur-4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img src='safe/img/safe_ur-5.png' alt='o'>";} echo " Уровень успеха: "; if ($ku['safe'] == 20){echo "<img width='14' height='14' src='safe/img/1.png' alt='o'>";}if ($ku['safe'] == 40){echo "<img width='14' height='14' src='safe/img/2.png' alt='o'>";}if ($ku['safe'] == 60){echo "<img width='14' height='14' src='safe/img/3.png' alt='o'>";}if ($ku['safe'] == 80){echo "<img width='14' height='14' src='safe/img/4.png' alt='o'>";}if ($ku['safe'] == 100){echo "<img width='14' height='14' src='safe/img/5.png' alt='o'>";} echo " из <img width='14' height='14' src='safe/img/5x5.png' alt='o'>"; if($ku['safe']<99){echo "<br/><img src='safe/img/up.png' alt='o'> <a href='?safe&ur_vzlom&plus'>Повысить</a> <span class='small minor'>до: <b><font color='violet'>"; if ($ku['safe'] == 20){echo "40";}if ($ku['safe'] == 40){echo "60";}if ($ku['safe'] == 60){echo "80";}if ($ku['safe'] == 80){echo "100";} echo "</font></b>% (<font color='#ADFF2F'>"; if ($ku['safe'] == 20){echo "20000";}if ($ku['safe'] == 40){echo "40000";}if ($ku['safe'] == 60){echo "60000";}if ($ku['safe'] == 80){echo "80000";} echo "</font><img width='16' height='16' src='img/icons/ruby.png' alt='o'>)</span>";} echo "<br/><img width='16' height='16' src='safe/img/del.png' alt='o'> <a href='?safe&ur_vzlom&cl'>Сбросить все очки</a> <span class='small minor'>(до: <b>20</b>%)</span></div>";
echo "<a href='?safe&faq'><div class='block'><center><img width='16' height='16' src='safe/img/znak.png' alt='o'> Справка</center></a></div>";
echo "<a href='?forum=2017'><div class='block'><center><img width='16' height='16' src='img/icons/forum.png' alt='o'> Обсудить на форуме</center></a></div>";

include_once 'inc/foot.php';
?>