<?php
require_once 'core/system.php';

include 'core/func_online.php';
reg();
head('Мой персонаж');
include 'rang_next.php';  
?><style> .section._decor {    padding: 10px 18px 15px 18px;}.section._decor {    background:         url('/img/section/decor-tl.png') 0 0 no-repeat,         url('/img/section/decor-tr.png') 100% 0 no-repeat,         url('/img/section/decor-bl.png') 0 100% no-repeat,        url('/img/section/decor-br.png') 100% 100% no-repeat #16161e !important;    color: inherit;} .section._decor {        background-image: url('/img/section/decor_tl_x2.png'),        url('/img/section/decor_tr_x2.png'),        url('/img/section/decor_bl_x2.png'),        url('/img/section/decor_br_x2.png') !important;        background-size: 22px 22px !important;    } </style><?


$num = $user['level'];


$exp_new    = nifa($expLevel[$num]);



$my_exp  = nifa($user['exp']);













$dop=$dbc->query("SELECT * FROM `dop`where `user`= '".$user['id']."' ")->fetch_assoc();
if($user['clan_rang']==1){ $clan_rang='<span class="minor">Новобранец</span>'; }
if($user['clan_rang']==2){ $clan_rang='<span class="info">Солдат</span>'; }

if($user['clan_rang']==3){ $clan_rang='<span class="iSuperior">Ветеран</span>'; }

if($user['clan_rang']==4){ $clan_rang='<span class="iEpic">Генерал</span>'; }


if($user['clan_rang']==5){ $clan_rang='<span class="bluepost">Лидер</span>'; }
$user['oput'] = nifa($user['oput']);
//$row_level['oput'] = nifa($row_level['oput']);

if($user['defense'] < 1600){ $brony=$user['defense'] * 5 / 100;}elseif($user['defense'] >= 1600){ $brony = 80;}



$brony = floor($brony);


$sila = $user['strength'] +$user['dobav'];
$crit = $sila * 50 / 100; $crit = ceil($crit);



$crit = $sila +$crit;


if($user['id']>0){
			$hp = round(100/($expLevel[$user['level']]/($user['exp']+1)))+1; if ($hp>100){	$hp = 100;


}

$hp=ceil($hp);

}
	
	// Профиль

echo '<div class="main"><div class="block_zero">';


$stat = $dbc->query("SELECT * FROM `status` WHERE `user` = '".$user['id']."' LIMIT 1")->fetch_assoc();




if($stat){ $stati= '</br> <span class=c-sil><img src=/img/at/stat.png> '.$stat['status'].'</span>'; }else{ $stati =''; }


if($user['brak']>0){

 $brak  = $dbc->query(" select * from `users` where `id` = '".$user['brak']."'")->fetch_assoc();    

$bj = ' </br>Состоит в браке с :<img src="img/class/'.$brak['storona'].'/'.$brak['pers'].'/pers.png" width="14" height="14" alt="*">'.$brak['login'].' <a href="brak.php?razvod" onclick="return confirm (Уверены?)">(Развод)</a></a>';  }else{ $bj = '';}














// Клан
if($user['clan']>0){
$clan_name = $dbc->query("SELECT * FROM `clan` WHERE `id`='".$user['clan']."' LIMIT 1")->fetch_assoc();
$clan = '<img src="img/clan_m/'.$clan_name['storona'].'.png"><a href="clan.php?clan='.$user['clan'].'">'.$clan_name['name'].'</a> '.$clan_rang.'<br>';



}else{$clan = '';}

// Параметры	
?><div class="b-panel-new dblue-panel bordered mt2"><table cellpadding="0" cellspacing="0" border="0">

<tbody>
<td valign="top">
<a href=/avatar.php><img src="/img/avatar/<?=$user['sex']?>/<?=$user['avatar']?>.png"  class="st<?=$user['storona']?>"></a>
</div>
</td>



<td valign="top" style="padding-left:4px;"><img src="/img/class/<?=$user['storona']?>/<?=$user['pers']?>/pers.png"><?=$user['login']?>, <?=$user['level']?> уровень<br/><?=$clan?><img src="img/icon/rang.png">Ранг: <a href="rang.php"><?=$rang_name?></a><?=$stati?><?


if($user['brak']>0){

 $brak  = $dbc->query(" select * from `users` where `id` = '".$user['brak']."'")->fetch_assoc();    

?></br>Состоит в браке с :<img src="img/class/<?=$brak['storona']?>/<?=$brak['pers']?>/pers.png" width="14" height="14" alt="*"><?=$brak['login']?> <a href="brak.php?razvod" onclick="return confirm ('Уверены?')">(Развод)</a><?}





?></td></tbody></table></div><?









































echo '



<table width="100%"><tr><td width="50%"><a class="btn nav-btn" href="/my_art"><img src="/img/stat/topor.png" alt="*" width="12" height="12"class="link-icon"/>Снаряжение</a></td><td width="50%"><a class="btn nav-btn"href="lk.php"><img src="/img/stat/topor.png" alt="" width="12"height="12" class="link-icon"/>Настройки</a></td></tr></table>



<table width="100%"><tr><td width="50%"><a class="btn nav-btn" href="/mail.php"><img src="/img/stat/topor.png" alt="*" width="12" height="12"class="link-icon"/>Почта </a></td><td width="50%"><a class="btn nav-btn"href="vip_b.php"><img src="/img/stat/topor.png" alt="" width="12"height="12" class="link-icon"/>Колдун</a></td></tr></table>

<table width="100%"><tr><td width="50%"><a class="btn nav-btn" href="/journal.php"><img src="/img/stat/topor.png" alt="*" width="12" height="12"class="link-icon"/>Журнал </a></td><td width="50%"><a class="btn nav-btn"href="my_pet"><img src="/img/stat/topor.png" alt="" width="12"height="12" class="link-icon"/>Питомец</a></td></tr></table>

<table width="100%"><tr><td width="50%"><a class="btn nav-btn" href="/talant.php"><img src="/img/stat/topor.png" alt="*" width="12" height="12"class="link-icon"/>Таланты </a></td><td width="50%"><a class="btn nav-btn"href="sk.php"><img src="/img/stat/topor.png" alt="" width="12"height="12" class="link-icon"/>Навыки</a></td></tr></table>




<div class="lblue-panel"><ul><li class="mt3"><img
src="/img/stat/
hp.png" alt="."
width="12" height="12" class="link-icon"/
>Живучесть:
<span>'.$user['max_health'].'</span> <span
class="minor">
(<span>'.$user['health'].'</span>
здоровья)</span></li>
<li class="mt3"><img
src="/img/stat/
AKulak.png" alt="."
width="12" height="12"
class="link-icon"/>Сила:
<span>'.$user['strength'].'</span> <span
class="minor">(удар
~<span>'.$sila.'</span>)</

span></li>
<li class="mt3">
<img src="/img/stat/
mp.png" alt="." width="12"
height="12" class="link-
icon"/>Крит:
<span>'.$user['crit'].' %</span>
(удар ~<span>'.$crit.'</
span>)
</li><li class="mt3"><img
src="/images/icons/
armor.png" alt="."
width="12" height="12"
class="link-icon"/>Защита:
<span>'.$user['defense'].'</span> <span
class="minor">
(<span>'.$brony.'</span>%)</

span></li>
<li class="mt3"><img src="/images/icons/regen.png" alt="." width="12" height="12" class="link-icon"/>Регенерация: <span>'.$user['regen'].' </span></li>
<li class="mt3"><img src="/images/icons/sok.png" alt="." width="12" height="12" class="link-icon"/>Сокрушение: <span>'.$user['sokru'].' %</span></li>
<li class="mt3"><img src="/images/icons/vampir.png" alt="." width="12" height="12" class="link-icon"/>Вампиризм: <span>'.$user['vampir'].' %</span></li>


</li><li class="mt3"><img src="/images/icons/exp.png" alt="." width="12" height="12" class="link-icon"/>Опыт:
<span>'.$my_exp.'</span> <span

class="minor">/<span>'.$exp_new.'</span></span><span class="info">('.$hp.'%)</span></li>




<div class="lblue-panel">';

include 'bonus_info.php';


?></br><a href="trof.php?us=<?=$user['id']?>"><b><span class="iEpic">Трофеи</span></b></a></br><?

if($user['god']==1 and $user['pers']==1){?><img src="img/stat/day.png"><span class="info">Рыцарь Дня</span><?}

if($user['god']==1 and $user['pers']==2){?><img src="img/stat/day.png"><span class="info">Чародей Дня</span><?}

echo'<div class="center font14"><h2>Способности</h2></div><div class="panel-inner-2"><div class="center"><a class="i-amu" href="/amulet_upp.php


"><img height="32"
width="32" src="/images/am/plazm.png"><div class="mt2">Сияние Плазмы</div><span class="amu-lvl">'.$user['amulet2'].'</span></a><a class="i-amu" href="/amulet_up.php"><img height="32" width="32" src="/images/am/ten.png"><div class="mt2">Душа Тени</div><span class="amu-lvl">'.$user['amulet1'].'</span></a></div></div></div>

';








echo '

</div>
</div>

</div></div>';

foot();
?>
