<?
require_once '../core/system.php';
echo only_reg();
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `boss` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
$boss = mysql_fetch_assoc(mysql_query("SELECT * FROM `boss` WHERE `id`  = '".intval($_GET['id'])."'"));
}else{
$_SESSION['err'] = "Босс не найден";
header('Location: index.php');
exit();
}
$pets_param1 = $user[silapets] + $user[vinoslpets] + $user[healthpets];
$boss_param = $boss[sila] + $boss[health] + $boss[lovk] + $boss[zashit];
$user_param = $user[sila] + $user[max_health] + $user[lovk] + $user[zashit] + $pets_param1;
$header = 'Босс '.$boss['name'];
require_once H.'core/head.php';
echo "<div class='player'><div class='float-left'>";
echo "<img src='/style/boss/b/$boss[id].png' style='margin-right:10px;margin-top:3px;'></div>";
if ($boss['lvl'] == '1') {?><img src="/boss/img/grade/1.png"  height="11" alt="a"/> <?php }
	    if ($boss['lvl'] == '5') {?><img src="/boss/img/grade/2.png"  height="11" alt="d"/> <?php }
            if ($boss['lvl'] == '10' or $boss['lvl'] == '15') {?><img src="/boss/img/grade/3.png"  height="11" alt="d"/> <?php }
            if ($boss['lvl'] == '20' or $boss['lvl'] == '25') {?><img src="/boss/img/grade/4.png"  height="11" alt="a"/> <?php }
            if ($boss['lvl'] == '30' or $boss['lvl'] == '35') {?><img src="/boss/img/grade/5.png"  height="11" alt="d"/> <?php }
            if ($boss['lvl'] == '40') {?><img src="/boss/img/grade/6.png"  height="11" alt="a"/> <?php }
echo " <span class='yellow'>$boss[name]</span><br><img src='/images/icon/str.png'> Сила: $boss[sila]<br><img src='/images/icon/vit.png'> Здоровье: $boss[health]<br><img src='/images/icon/agi.png'> Ловкость: $boss[lovk]<br><img src='/images/icon/def.png'> Защита: $boss[zashit]<br><img src='/images/icon/2hit.png'> $boss_param VS $user_param (<span class='dgreen'>+$pets_param1</span>)";
echo "<br><br><a class='btn' href='ataka.php?id=$boss[id]'><span class='end'><span class='label'>Атаковать</span></span></a><br>";
echo "<div style='clear:both;'></div></div>";
echo "<div class='mini-line'></div>";
echo "<div class='menuList'><li><a href='/boss/'><img src='/images/icon/hellworld.png' alt=''/>Монстры</a></li></div>";
require_once H.'core/foot.php';
?>