<?
    
    include './system/common.php';
    
 include './system/functions.php';
        
      include './system/user.php';
        
$title = 'Наследие Хаоса';


include './system/h.php';  

    if($user) {

?>

<?


?>



<?


 ?>
<?


?>


<?



?>


<?

  

?>
  





<link rel="stylesheet" href="http://213.239.195.28/xaos/style.css" type="text/css"/>
<div class="title-top">Наследия Хаоса</div>

</div><div style="text-align:center;padding:3px" class="menu_link2"><div style="border:1px solid #131313;padding:1px;background:#232323;border-radius:3px;display:inline-block"><img src="http://213.239.195.28/xaos/game_logo.jpg" alt="" style="border:1px solid #1b1b1b;border-radius:3px;"/></div></div><div class="separ2"></div>
</div>
<a href="/boss/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/quest.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Пpиключeния <span style="color:green">(+)</span></a>
<a href="/arena/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/arena.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Aрeнa Смeрти <?=($user['mp'] > 5 ? '<font color=\'#30c030\'>(+)</font>':'')?></a>
<?

if($user['level'] > 65) {

?>
<a href="/duel/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/crd.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Призрачный Разлом <?=($user['duel_fights'] > 0 ? '<font color=\'green\'>(+)</font>':'')?></a>
<?

}

if($user['level'] > 65) {

?>
<a href="" class="menu_link"><img src="http://213.239.195.28/xaos/style2/battle.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Пpoтивocтoяниe <span style="color:green">( !! )</span></a>
<?

}

?>
<?

if($user['level'] > 65) {

?> 
<a href="/league.php/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/bl.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Kулачные Бoи<span style="color:#a5a5a5"> (1000 место)</span></a>
<a href="/pvp.php" class="menu_link"><img src="http://213.239.195.28/xaos/style2/btt.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Bыживaниe</a>
<a href=""  class="menu_link"><img src="http://213.239.195.28/xaos/style/1.3.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Бездна Хаоса</a>
<?

}

?> 
<?

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

?>
<a href="/coliseum/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/att4.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Кoлизей</a>
<?

}

?>
<?

if($user['level'] > 65) {

?> 
<a href="" class="menu_link"><img src="http://213.239.195.28/xaos/style2/trv.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Путeшествие <span style="color:green">(+)</span></a>
<a href="" class="menu_link"><img src="http://213.239.195.28/xaos/style2/mine.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Шахты <span style="color:green">(+)</span></a><div class="separ3"></div><div class="menu_link3" style="color:#a5a5a5"><img src="http://213.239.195.28/xaos/style/tp/lock.png" alt="" style="padding:1px"/> Клaнoвые Срaжeния</div><div class="separ3"></div>
<?

}

?>
<a href="/trad.php" class="menu_link"><img src="http://213.239.195.28/xaos/style/money-gold.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Получить золото</a><a href="/shop/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/shop.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Магазин товаров</a>
<a href="/treni.php/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/str.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Тренировочный Лагерь</a>
<?

if($user['level'] > 65) {

?>
<a href="/quest.php" class="menu_link"><img src="http://213.239.195.28/xaos/style2/job.jpg" alt=" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Задания</a>
<?

}

?>
<a href="/clans/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/clan.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Кланы</a>
<a href="/rating/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/stat.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Зал славы</a><div class="separ3"></div>
<a href="/inv/bag/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/bag.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Рюкзак <span style="color:#a5a5a5">(<?=mysql_result(mysql_query('SELECT COUNT(`id`) FROM `inv` WHERE `user` = "'.$user['id'].'" AND `equip` = "0" AND `place` = "0"'),0)?> / 20) <?=(mysql_result(mysql_query('SELECT COUNT(*) FROM `inv` WHERE `user` = "'.$user['id'].'" AND `equip` = "0" AND `place` = "0" AND `new` = "0"'),0) > 0 ? '<font color=\'#30c030\' </font>':'')?></span></a>
<?

if($user['level'] > 65) {

?>
<a href="" class="menu_link"><img src="http://213.239.195.28/xaos/style2/fr.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Моя Армия <span style="color:#a5a5a5">(3 / 3)</span></a>
<?

}

?>
<?

  $equips = 0;

  if($i['w_1']) {
    $equips++;
  }
  if($i['w_2']) {
    $equips++;
  }
  if($i['w_3']) {
    $equips++;
  }
  if($i['w_4']) {
    $equips++;
  }
  if($i['w_5']) {
    $equips++;
  }
  if($i['w_6']) {
    $equips++;
  }
  if($i['w_7']) {
    $equips++;
  }
  if($i['w_8']) {
    $equips++;
  }

?>

<a href="/equip/<?=$i['id']?>/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/att2.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Экипировка <span style="color:#a5a5a5">(<?=$equips?> / 14)</span></a>
<?

if($user['level'] > 15) {

?> 
<a href="/mail/" class="menu_link"><img src="http://213.239.195.28/xaos/style2/mail.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Почтовый ящик </a>
<?

}

?>

<?

if($user['level'] > 65) {

?>
<a href="" class="menu_link"><img src="http://213.239.195.28/xaos/style2/int.jpg" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/>  Мои Друзья  <span style="color:#a5a5a5">(0)</span></a></boby></html>
<?

}

?>










<?

    if(isSet($_GET['exit'])) {
    
        setCookie('id', '');
  setCookie('password', '');
    
    header('location: /');
    
    }
    


    }
    else
    {


$login = _string($_POST['login']);
  $login = strToLower($login);

    $password = _string($_POST['password']);


    if($login && $password) {
    
    $q = mysql_query('SELECT * FROM `users` WHERE `login` = "'.$login.'" AND `password` = "'.$password.'" LIMIT 1');
 
 $user = mysql_fetch_array($q);
      
      if($user) {
    
    setCookie('id', $user['id'], time() + 9999999, '/');
setCookie('password', $password, time() + 9999999, '/');
    
         header('location: /');
 
      
      }
    
    }

$ref = _string(_num($_GET['ref']));

?>


<link rel="stylesheet" href="http://213.239.195.28/xaos/style.css" type="text/css"/>
<div class="box"><div class="title-top">Наследие Хаоса</div><div class="separ2"></div><div style="text-align:center;padding:3px" class="menu_link2"><div style="border:1px solid #131313;padding:1px;background:#232323;border-radius:3px;display:inline-block"><img src="http://213.239.195.28/xaos/game_logo.jpg" alt="" style="border:1px solid #1b1b1b;border-radius:3px;"/></div></div>
<div class="separ2"></div><div style="text-align:center;font-size:small;color:#a5a5a5" class="menu_link3">  ...начало летописи о первых воинах ступивших на землю...</div><div class="separ"></div>
<div style="padding:10px;text-align:center;" class="menu_link2"><a href='/start/<?=$ref?>/' class='mybutt_att' style='padding-left:20px;padding-right:20px;font-size:14px;'>Начать игру</a></div>
<div class="separ"></div><div style="text-align:center;padding:6px;color:#a5a5a5" class="menu_link3"><form action='/' method='post'><div>Имя персонажа:</div>
<input type'text' name='login' class='input_text' />


<div style="color:#a5a5a5">Пароль:</div>
<input type='password' class='input_text' name='password' />


<div style='padding:3px;'></div><div><input type='submit' class='mybutt_att' value='Войти в игру' style='height:24px;padding-left:20px;padding-right:20px'/>
</div></div>

</div></form></div></div>



<?

    }
    
include './system/f.php';

?>