<?php
include_once 'start.php';
$doc = new document();
$doc->title('Мои профиль');
if (is_file(H."/dark_war/files/players_here/{$player->id}.jpg")) {
echo "<center><img src='/dark_war/files/players_here/{$player->id}.jpg' alt='!' /></center>";
} else {
echo "<center><img src='/dark_war/files/players_here/0.jpg' alt='!' /></center>";
}
$dispatch[] = array ('one' => 'Жизни:', 'two' => "<img src='percent.php?id={$player->hp}&max={$player->hp_max}&color=red' title='{$player->hp}' alt='!' />");
$dispatch[] = array ('one' => 'Мана:', 'two' => "<img src='percent.php?id={$player->mp}&max={$player->mp_max}&color=blue' title='{$player->mp}' alt='!' />");
$dispatch[] = array ('one' => 'Энергия:', 'two' => "<img src='percent.php?id={$player->energy}&max=100&color=golden' title='{$player->energy}' alt='!' />");
$getclanus = mysql_fetch_array(mysql_query("SELECT * FROM `dark_war_clans_us` WHERE id_player='{$player->id}' LIMIT 1"));
if($getclanus['id_player'] != $player->id){
$dispatch[] = array ('one' => 'Клан:', 'two' => 'Нет');
}
else{
$q = mysql_fetch_array(mysql_query("SELECT name FROM `dark_war_clans` WHERE id='$getclanus[id_clan]'"));
$dispatch[] = array ('one' => 'Клан:', 'two' =>"<a href='/dark_war/clans/clan.php?id=$getclanus[id_clan]'/>$q[name]</a>");
}
$dispatch[] = array ('one' => 'Игровой id:', 'two' => $player->id);
$dispatch[] = array ('one' => 'Звание:', 'two' => $player->groups);
$dispatch[] = array ('one' => 'Атака:', 'two' => $player->dmg);
$dispatch[] = array ('one' => 'Броня:', 'two' => $player->armor);
$dispatch[] = array ('one' => 'Проникновение:', 'two' => $player->armorp);
$dispatch[] = array ('one' => 'Магическая броня:', 'two' => $player->magicr);
$dispatch[] = array ('one' => 'М. проникновение:', 'two' => $player->magicp);
$dispatch[] = array ('one' => 'Уровень:', 'two' => $player->level);
$dispatch[] = array ('one' => 'Следующий уровень:', 'two' => $player->present_level . "/" . $player->next_level);
$doc->assign('post', $dispatch);
$doc->display('view_two_table.tpl');
$dispatch= array();
$dispatch[] = array ('title' => 'Инвентарь', 'link' => 'weapon_shop/my_artifacts.php');
$dispatch[] = array ('title' => 'Навыки', 'link' => 'masteries/my_masteries.php');
$dispatch[] = array ('title' => 'Элексиры', 'link' => 'magic_shop/my_magic.php');
$dispatch[] = array ('title' => 'Животные', 'link' => 'pets.php');
$dispatch[] = array ('title' => 'Почта', 'link' => 'mail.php');
$dispatch[] = array ('title' => 'Журнал', 'link' => 'journal.php');
$dispatch[] = array ('title' => 'Клан', 'link' => './clans/');
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
?>