<?php
require_once 'core/system.php';
head('Путешествие');
reg();
$limit = 6;
?><style> .wayy {
margin-top: -1px;
margin-left: 38px;
margin-right: 5px;
margin-bottom: -7px;
} </style><?
$dop=$dbc->query("SELECT * FROM `dop`where `user`= '".$user['id']."' ")->fetch_assoc();
$saga=$dbc->query("SELECT * FROM `wayes`where `saga`= '".$dop['etap_way']."' ")->fetch_assoc();
if($dop['st_way']==1){ header('location:way_bat.php');exit;}
$_SESSION['my']=null; $_SESSION['vrag']=null;
if(isset($_GET['box'])){
?><div class="b-panel-new dblue-panel bordered mt2">
<div class="panel-inner-2"><table>
<tr>
<td style="width: 45px;"><img src="img/ivent/1.png" width="50px"></td>
<td>
Выдается после прохождения 3 этапа,</br><span class="iLegendary"> Шанс найти свиток охотника 50%, <img src="img/stat/sera.png"> 500 ~ 1000</span>
</td>
</tr>
</table></div></div><?
?><div class="b-panel-new dblue-panel bordered mt2">
<div class="panel-inner-2"><table>
<tr>
<td style="width: 45px;"><img src="img/ivent/2.png" width="50px"></td>
<td>
Выдается после прохождения 6 этапа,</br><span class="iLegendary"> Шанс найти 2 свитка охотника 75%, <img src="img/stat/sera.png"> 1500 ~ 3000</span>
</td>
</tr>
</table></div></div><?
?><div class="b-panel-new dblue-panel bordered mt2">
<div class="panel-inner-2"><table>
<tr>
<td style="width: 45px;"><img src="img/ivent/3.png" width="50px"></td>
<td>
Выдается после прохождения 10 этапа,</br><span class="iLegendary"> Шанс найти 2 свитка охотника 100%, <img src="img/stat/sera.png"> 3000 ~ 5000</br> <img src="img/money/money.png"> 5~10 </span> 1 магический камень
</td>
</tr>
</table></div></div><?
?><div class="b-panel-new dblue-panel bordered mt2">
<div class="panel-inner-2"><table>
<tr>
<td style="width: 45px;"><img src="img/ivent/4.png" width="50px"></td>
<td>
Можно получить в локации <span class="info">Обитель Теней</span></br><span class="iLegendary"> Шанс найти такие предметы : 1 талант,до 10000 серебра, 5 магических камней,до 50 Эликсиров... вы можете получить только одну награду </span>
</td>
</tr>
</table></div></div><?
foot();
exit;
}
/*
if(isset($_GET['open'])){
if($dop['sun_way']==0){ header('location:way.php');exit; }
if($dop['sun_way']==1){ $oh = mt_rand(1,2); $sem = mt_rand(500,1000);
if($oh==2){ $dbc->query("update `dop` set `boi`=`boi`+1 where `user`='".$user['id']."'"); $vit = '<span class=iLegendary>Получен Свиток Охотника</span>'; }else{ $vit='';}
$dbc->query("update `users` set `serebro`=`serebro`+'".$sem."' where `id`='".$user['id']."'");
$dbc->query("update `dop` set `sun_way`=0 where `user`='".$user['id']."'");
$_SESSION['info']=' Вы открыли серебряный сундук <img src="img/stat/sera.png">'.$sem.' '.$vit.''; header('location:way.php');exit; }
if($dop['sun_way']==2){ $oh = mt_rand(1,2); $sem = mt_rand(1500,2000);
if($oh==2){ $dbc->query("update `dop` set `boi`=`boi`+2 where `user`='".$user['id']."'"); $vit = '<span class=iLegendary>Получено 2 Свитка Охотника</span>'; }else{ $vit='';}
$dbc->query("update `users` set `serebro`=`serebro`+'".$sem."' where `id`='".$user['id']."'");
$dbc->query("update `dop` set `sun_way`=0 where `user`='".$user['id']."'");
$_SESSION['info']=' Вы открыли золотой сундук <img src="img/stat/sera.png">'.$sem.' '.$vit.''; header('location:way.php');exit; }
if($dop['sun_way']==3){ $oh = mt_rand(2,2); $cc = mt_rand(5,10); $sem = mt_rand(2000,4000);
if($oh==2){ $dbc->query("update `dop` set `boi`=`boi`+2 where `user`='".$user['id']."'"); $vit = '<span class=iLegendary>Получено 2 Свитка Охотника</span>'; }else{ $vit='';}
$dbc->query("update `users` set `serebro`=`serebro`+'".$sem."',`gold`=`gold`+'".$cc."' where `id`='".$user['id']."'");
$dbc->query("update `dop` set `sun_way`=0 , `kam`=`kam`+1 where `user`='".$user['id']."'");
$_SESSION['info']=' Вы открыли магический сундук <img src="img/stat/sera.png">'.$sem.' <img src="img/money/money.png">'.$cc.' '.$vit.''; header('location:way.php');exit; }
if($dop['sun_way']==4){ $oh = mt_rand(1,4); $el = mt_rand(10,50);
$sem = mt_rand(1000,10000);
if($oh==1){
$dbc->query("update `users` set `serebro`=`serebro`+'".$sem."' where `id`='".$user['id']."'"); $_SESSION['info']= '<span class=iLegendary>Вы нашли <img src=img/stat/sera.png>'.$sem.'</span>'; }
if($oh==2){
$dbc->query("update `users` set `apteka`=`apteka`+'".$el."' where `id`='".$user['id']."'"); $_SESSION['info']= '<span class=iLegendary>Вы нашли <img src=img/log/5.png>'.$el.'</span>'; }
if($oh==3){
$dbc->query("update `users` set `train`=`train`+1 where `id`='".$user['id']."'"); $_SESSION['info']= '<span class=iLegendary>Вы получили 1 талант</span>'; }
if($oh==4){
$dbc->query("update `dop` set `kam`=`kam`+5 where `user`='".$user['id']."'");
$_SESSION['info']= '<span class=iLegendary>Вы нашли 5 магических камней</span>'; }
$dbc->query("update `dop` set `sun_way`=0 where `user`='".$user['id']."'");
header('location:way.php');exit; }
} */
$nesi = $dop['time_way'] - time();
if(isset($_GET['start'])){
$nes = $dop['time_way'] - time();
if(Sec2Time($nes)>0){ $_SESSION['info']='<center>Вы Отдыхаете после прошлой битвы</center>'; header('location: way.php');exit;}
$dbc->query("update `dop` set `st_way`=1 where `user`='".$user['id']."' "); $dbc->query("INSERT INTO `way` (user,img,name,hp,strong,prot,sera,exp,us_hp,max,us_max) values('".$user['id']."','".$saga['img']."','".$saga['name']."','".$saga['hp']."','".$saga['strong']."','".$saga['prot']."','".$saga['sera']."','".$saga['exp']."','".$user['max_health']."', '".$saga['hp']."', '".$user['max_health']."')");
header('location:way_bat.php');exit;
}
if (isset($_SESSION['info'])){?><div style="clear:both;"></div><div class="b-notice trsmgr"><div class="notify-inner"><?=$_SESSION[info]?></div></div><? $_SESSION['info']=NULL; }
?><center><div class="example3"
style="text-align:center"><img src="img/sob/way1.png" width="100%"><div class="example_text"> Этап: <?=$dop['etap_way']?>/10</div></div><center><?
?><a class="gr-btn center" href="way.php?start"><span class="i12 i12-cross"></span>Начать Бой</a><?
if(Sec2Time($nesi)>0){ ?><div class="lblue-panel"><div class="panel-inner-2"><div class="font-small text-italic c-verygray">Вы отдыхаете после битвы <?=Sec2Time($nesi)?></div></div></div><?}else{
?><div class="lblue-panel"><div class="panel-inner-2"><div class="font-small text-italic c-verygray">После поражения вас перенесет на начальный этап...</div></div></div><?
}
/*
if($dop['sun_way']>0){
?><div class="b-panel-new dblue-panel bordered mt2">
<div class="panel-inner-2"> <span class="info"> Доступен К открытию</span><table>
<tr>
<td style="width: 45px;"><img src="img/ivent/<?=$dop['sun_way']?>.png" width="50px"></td>
<td>
<a href="/way.php?open">Открыть</a>
</td>
</tr>
</table></div></div><?}
?><a class="btn" href="way.php?box">Информация о сундуках</a><?
*/
foot();