<?
    
    include './system/common.php';
    
 include './system/functions.php';
        
      include './system/user.php';
    
if(!$user) {

  header('location: /');
    
exit;

}
    
    $title = 'Сражения';


include './system/h.php';  

?>
<div><div class='main' style='word-wrap:break-word;'><span style='text-shadow:none;'></span>
<div class='block_zero center blue'>Великие сражения титанов!<br/></div>
<div class='mini-line'></div>

<div class='center'><div class='block_zero'>
<img src='/images/town/fights.png' alt=''/></div>
<div class='dot-line'></div></div><div class='menuList'>

<li><a href='/undying/'><img src='/images/icon/bar.png' alt=''/>Долина бессмертных<span class='green'> (+)</span><br/>
<span class='white small'>Битва через: 44:32</span></a></li>

<li><a href='/king/'><img src='/images/icon/king.png' alt=''/>Король бессмертных<br/>
<span class='white small'>Битва через: 01:14:32</span></a></li>

<li><a href='/clanwar/'><img src='/images/icon/clanwar.png' alt=''/>Клановый турнир<br/>
<span class='white small'>Битва через: 13:44:32</span></a></li>

<li><a href='/altars/'><img src='/images/icon/cw.png' alt=''/>Древние алтари<br/>
<span class='white small'>Битва через: 16:44:32</span></a></li>

<li><a href='/tournament/'><img src='/images/icon/tournament.png' alt=''/>Дуэльный турнир<span class='green'> (+)</span><br/>
<span class='white small'>Битва через: 22:14:32</span></a></li>

<li><a href='/league/'><img src='/images/icon/league.png' alt=''/>Лига опытных<br/>
<span class='white small'>Место в лиге: <span class='bold'>1000</span></span></li></div>

<div class='mini-line'></div>
<div class='menuList'>

<li><a href='/fights/timetable/'><img src='/images/icon/journal.png' alt=''/>Расписания сражений</a></li>





<? if($user['level'] < 10) {?>

  <li><a href='/coliseum.php'><img src='/images/icon/coliseum.png' alt='*'/> Колизей</a><br/>
  <small><font color='#999'>Доступно с <img src='/images/icon/level.png' alt='*'/> 10 уровня</font></small>
  </li>
  
<?

  }
  
  $undying_member = mysql_query('SELECT * FROM `undying_member` WHERE `user` = "'.$user['id'].'" ORDER BY `id` DESC LIMIT 1');
  $undying_member = mysql_fetch_array($undying_member);

  $undying = mysql_query('SELECT * FROM `undying` WHERE `start` = "0" LIMIT 1');
  $undying = mysql_fetch_array($undying);  


?>

  <li><a href='/undying.php'><img src='/images/icon/bar.png' alt='*'/> Долина бессмертных <?=($undying_member['battle'] != $undying['id'] ? '<font color=\'#3c3\'>(+)</font>':'')?></a><br/>

<?

  if($user['level'] < 4) {

?>

<small><font color='#999'>Доступно с <img src='/images/icon/level.png' alt='*'/> 4 уровня</font></small>

<?
  
  }
  else
  {

?>

<small>Битва через: <?=_time($undying['time'] - time())?></small>

<?

  }

?>

  </li>

<li class='no_b'></li>
</div>

<?

include './system/f.php';

?>