File size: 15.71Kb
<?
require_once'../core/system.php';
echo only_reg();
echo ban();
echo blok();
$header = 'Поход';
require_once'../core/head.php';
mysql_query("DELETE FROM `hik_otk` WHERE `time`<='".$time."''");
mysql_query("DELETE FROM `hiking` WHERE `time`<='".$time."' and `status`='1'");
mysql_query("UPDATE `user` set `mesto` = 'Поход', `battle` = '0' where `id` = '".$user['id']."'");
if($user['level'] < 10){
header('location: /');
$_SESSION['err'] = 'Доступно только с 10 уровня';
}
/* if($user['prava']<4 && ($user['nick']!='Као' && $user['nick']!='Infidel')){
header('location: /');
$_SESSION['err'] = 'Откроется в ближайшее время!';
} */
echo' <table class="head center" width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-top: 0; color: #424242;">
<tbody>
<tr>';
$req = mysql_query("SELECT * FROM `hik_otk` where `usr`='".$user['id']."' and `hiking`='1'");
$hiki = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($user['level'] > 9 && $avto == 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<a href="/hiking/gates-of-Fornost/">
<span class="fight"> Врата Форноста </span>
<div class="empty"></div>
<img src="/images/gates-of-Fornost.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/stat/sila.png"> В поход</span>
</a>
</td>';
} elseif($user['level'] > 9 && $avto > 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">';
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."')");
$avto = mysql_num_rows($req);
if($avto > 0){
echo' <a href="/hiking/gates-of-Fornost/">';
}
echo'<span class="fight"> Врата Форноста </span>
<div class="empty"></div>
<img src="/images/gates-of-Fornost-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/fight.png"> ';
$recharge = $hiki['time'] - $_SERVER['REQUEST_TIME'];
$hours = floor($recharge / 3600);
if($hours > 0 && $hours < 10)
{$h='0'.$hours.'';}
if($hours >= 10){$h=''.$hours.'';}
if($hours == 0){$h='00';}
$minutes = floor($recharge / 60) % 60;
if($minutes > 0 && $minutes < 10)
{$m='0'.$minutes.'';}
if($minutes >= 10){$m=''.$minutes.'';}
if($minutes == 0){$m='00';}
$seconds = $recharge - $minutes*60 - $hours*3600;
if($seconds > 0 && $seconds < 10)
{$s='0'.$seconds.'';}
if($seconds >= 10){$s=''.$seconds.'';}
if($seconds == 0){$s='00';}
if($h==0){$de = ''.$m.':'.$s.'';}
if($h>0){$de = ''.$h.':'.$m.':'.$s.'';}
echo' '.$de.' </span>';
if($avto > 0){
echo'</a>';
}
echo'</td>';
} else {
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<span class="fight"> Врата Форноста </span>
<div class="empty"></div>
<img src="/images/gates-of-Fornost-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> Доступно с 10 ур. </span>
</td>';
}
$req = mysql_query("SELECT * FROM `hik_otk` where `usr`='".$user['id']."' and `hiking`='2'");
$hiki = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($user['level'] > 23 && $avto == 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<a href="/hiking/land-of-death/">
<span class="fight"> Долина Смерти </span>
<div class="empty"></div>
<img src="/images/land-of-death.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/stat/sila.png"> В поход</span>
</a>
</td>';
} elseif($user['level'] > 23 && $avto > 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">';
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."')");
$avto = mysql_num_rows($req);
if($avto > 0){
echo'<a href="/hiking/land-of-death/">';
}
echo'<span class="fight"> Долина смерти </span>
<div class="empty"></div>
<img src="/images/land-of-death-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/fight.png"> ';
$recharge = $hiki['time']-$_SERVER['REQUEST_TIME'];
$hours = floor($recharge / 3600);
if($hours > 0 && $hours < 10)
{$h='0'.$hours.'';}
if($hours >= 10){$h=''.$hours.'';}
if($hours == 0){$h='00';}
$minutes = floor($recharge / 60) % 60;
if($minutes > 0 && $minutes < 10)
{$m='0'.$minutes.'';}
if($minutes >= 10){$m=''.$minutes.'';}
if($minutes == 0){$m='00';}
$seconds = $recharge - $minutes*60 - $hours*3600;
if($seconds > 0 && $seconds < 10)
{$s='0'.$seconds.'';}
if($seconds >= 10){$s=''.$seconds.'';}
if($seconds == 0){$s='00';}
if($h==0){$de = ''.$m.':'.$s.'';}
if($h>0){$de = ''.$h.':'.$m.':'.$s.'';}
echo' '.$de.' </span>';
if($avto>0){
echo'</a>';
}
echo' </td>';
} else {
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<span class="fight"> Долина Смерти </span>
<div class="empty"></div>
<img src="/images/land-of-death-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> Доступно с 24 ур. </span>
</td>';
}
echo'</td>
</tbody>
</table>';
echo'<table class="head center" width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-top: 0; color: #424242;">
<tbody>
<tr>';
$req = mysql_query("SELECT * FROM `hik_otk` where `usr`='".$user['id']."' and `hiking`='3'");
$hiki = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($user['level'] > 36 && $avto==0){
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<a href="/hiking/lair-of-the-Werewolf/">
<span class="fight"> Логово Оборотней </span>
<div class="empty"></div>
<img src="/images/lair-of-the-Werewolf.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/stat/sila.png"> В поход </span>
</a>
</td>';
} elseif($user['level'] > 36 && $avto > 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">';
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."')");
$avto = mysql_num_rows($req);
if($avto > 0){
echo' <a href="/hiking/lair-of-the-Werewolf/">';
}
echo'<span class="fight"> Логово Оборотней </span>
<div class="empty"></div>
<img src="/images/lair-of-the-Werewolf-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/fight.png"> ';
$recharge = $hiki['time']-$_SERVER['REQUEST_TIME'];
$hours = floor($recharge / 3600);
if($hours > 0 && $hours < 10)
{$h='0'.$hours.'';}
if($hours >= 10){$h=''.$hours.'';}
if($hours == 0){$h='00';}
$minutes = floor($recharge / 60) % 60;
if($minutes > 0 && $minutes < 10)
{$m='0'.$minutes.'';}
if($minutes >= 10){$m=''.$minutes.'';}
if($minutes == 0){$m='00';}
$seconds = $recharge - $minutes*60 - $hours*3600;
if($seconds > 0 && $seconds < 10)
{$s='0'.$seconds.'';}
if($seconds >= 10){$s=''.$seconds.'';}
if($seconds == 0){$s='00';}
if($h==0){$de = ''.$m.':'.$s.'';}
if($h>0){$de = ''.$h.':'.$m.':'.$s.'';}
echo' '.$de.' </span>';
if($avto > 0){
echo'</a>';
}
echo'</td>';
} else {
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<span class="fight"> Логово Оборотней </span>
<div class="empty"></div>
<img src="/images/lair-of-the-Werewolf-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> Доступно с 37 ур. </span>
</td>';
}
$req = mysql_query("SELECT * FROM `hik_otk` where `usr`='".$user['id']."' and `hiking`='4'");
$hiki = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($user['level'] > 49 && $avto == 0){
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<a href="/hiking/ghost-trail/">
<span class="fight"> Тропа Призраков </span>
<div class="empty"></div>
<img src="/images/ghost-trail.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/stat/sila.png"> В поход </span>
</a>
</td>';
} elseif($user['level'] > 49 && $avto > 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">';
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."')");
$avto = mysql_num_rows($req);
if($avto > 0){
echo' <a href="/hiking/ghost-trail/">';
}
echo'<span class="fight"> Тропа Призраков </span>
<div class="empty"></div>
<img src="/images/ghost-trail-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/fight.png"> ';
$recharge = $hiki['time']-$_SERVER['REQUEST_TIME'];
$hours = floor($recharge / 3600);
if($hours > 0 && $hours < 10)
{$h='0'.$hours.'';}
if($hours >= 10){$h=''.$hours.'';}
if($hours == 0){$h='00';}
$minutes = floor($recharge / 60) % 60;
if($minutes > 0 && $minutes < 10)
{$m='0'.$minutes.'';}
if($minutes >= 10){$m=''.$minutes.'';}
if($minutes == 0){$m='00';}
$seconds = $recharge - $minutes*60 - $hours*3600;
if($seconds > 0 && $seconds < 10)
{$s='0'.$seconds.'';}
if($seconds >= 10){$s=''.$seconds.'';}
if($seconds == 0){$s='00';}
if($h==0){$de = ''.$m.':'.$s.'';}
if($h>0){$de = ''.$h.':'.$m.':'.$s.'';}
echo' '.$de.' </span>';
if($avto > 0){
echo'</a>';
}
echo' </td>';
} else {
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<span class="fight"> Тропа Призраков </span>
<div class="empty"></div>
<img src="/images/ghost-trail-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> Доступно с 50 ур. </span>
</td>';
}
echo'</td>
</tbody>
</table>';
echo'<table class="head center" width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-top: 0; color: #424242;">
<tbody>
<tr>';
$req = mysql_query("SELECT * FROM `hik_otk` where `usr`='".$user['id']."' and `hiking`='5'");
$hiki = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($user['level'] > 60 && $avto==0){
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<a href="/hiking/snake-marsh/">
<span class="fight"> Змеиное Болото </span>
<div class="empty"></div>
<img src="/images/snake-marsh.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/stat/sila.png"> В поход </span>
</a>
</td>';
} elseif($user['level'] > 60 && $avto > 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">';
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."')");
$avto = mysql_num_rows($req);
if($avto > 0){
echo' <a href="/hiking/snake-marsh/">';
}
echo'<span class="fight"> Змеиное Болото </span>
<div class="empty"></div>
<img src="/images/snake-marsh-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/fight.png"> ';
$recharge = $hiki['time']-$_SERVER['REQUEST_TIME'];
$hours = floor($recharge / 3600);
if($hours > 0 && $hours < 10)
{$h='0'.$hours.'';}
if($hours >= 10){$h=''.$hours.'';}
if($hours == 0){$h='00';}
$minutes = floor($recharge / 60) % 60;
if($minutes > 0 && $minutes < 10)
{$m='0'.$minutes.'';}
if($minutes >= 10){$m=''.$minutes.'';}
if($minutes == 0){$m='00';}
$seconds = $recharge - $minutes*60 - $hours*3600;
if($seconds > 0 && $seconds < 10)
{$s='0'.$seconds.'';}
if($seconds >= 10){$s=''.$seconds.'';}
if($seconds == 0){$s='00';}
if($h==0){$de = ''.$m.':'.$s.'';}
if($h>0){$de = ''.$h.':'.$m.':'.$s.'';}
echo' '.$de.' </span>';
if($avto > 0){
echo'</a>';
}
echo'</td>';
} else {
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<span class="fight"> Змеиное Болото </span>
<div class="empty"></div>
<img src="/images/snake-marsh-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> Доступно с 60 ур. </span>
</td>';
}
$req = mysql_query("SELECT * FROM `hik_otk` where `usr`='".$user['id']."' and `hiking`='6'");
$hiki = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
if($user['level'] > 79 && $avto == 0){
echo'<td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<a href="/hiking/abode-dragons/">
<span class="fight"> Обитель Драконов </span>
<div class="empty"></div>
<img src="/images/abode-dragons.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/stat/sila.png"> В поход <font color="CDCDCD">(beta)</font></span>
</a>
</td>';
} elseif($user['level'] > 79 && $avto > 0){
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">';
$req = mysql_query("SELECT * FROM `hiking` where (`lider`='".$user['id']."' || `usr1`='".$user['id']."' || `usr2`='".$user['id']."' || `usr3`='".$user['id']."')");
$avto = mysql_num_rows($req);
if($avto > 0){
echo' <a href="/hiking/abode-dragons/">';
}
echo'<span class="fight"> Обитель Драконов </span>
<div class="empty"></div>
<img src="/images/abode-dragons-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> <img src="/images/icon/fight.png"> ';
$recharge = $hiki['time']-$_SERVER['REQUEST_TIME'];
$hours = floor($recharge / 3600);
if($hours > 0 && $hours < 10)
{$h='0'.$hours.'';}
if($hours >= 10){$h=''.$hours.'';}
if($hours == 0){$h='00';}
$minutes = floor($recharge / 60) % 60;
if($minutes > 0 && $minutes < 10)
{$m='0'.$minutes.'';}
if($minutes >= 10){$m=''.$minutes.'';}
if($minutes == 0){$m='00';}
$seconds = $recharge - $minutes*60 - $hours*3600;
if($seconds > 0 && $seconds < 10)
{$s='0'.$seconds.'';}
if($seconds >= 10){$s=''.$seconds.'';}
if($seconds == 0){$s='00';}
if($h==0){$de = ''.$m.':'.$s.'';}
if($h>0){$de = ''.$h.':'.$m.':'.$s.'';}
echo' '.$de.' </span>';
if($avto > 0){
echo'</a>';
}
echo' </td>';
} else {
echo' <td width="50%" class="head" style="border-right: 1px solid #1D1C1A; border-bottom: 1px solid #1D1C1A;">
<span class="fight"> Обитель Драконов </span>
<div class="empty"></div>
<img src="/images/abode-dragons-grey.jpg" style="border:1px solid #1C1C1C;" width="100%">
<div class="empty"></div>
<span class="fight grey"> Доступно с 80 ур. </span>
</td>';
}
echo'</td>
</tbody>
</table>';
require_once'../core/foot.php';
?>