<?php
include 'core/sys.php';
head('Инфо о монстре');
reg();
$id_m = int($_GET['m']);
$monstr = mysql_fetch_assoc(mysql_query("SELECT * FROM `monster` WHERE `id`='".$id_m."'"));
if(!$id_m or empty($_GET['m']) or !$monstr){
echo '<div id="error">Ошибка</div>';
foot();
exit;
}
$m_name = mysql_fetch_assoc(mysql_query("SELECT `name`,`drop` FROM `monster_name` WHERE `id`='".$monstr['monster_id']."' LIMIT 1"));
 $drop = mysql_fetch_assoc(mysql_query("SELECT `img`,`id` FROM `inventory` WHERE `id`='".$m_name['drop']."'"));
echo '<div class="name">Инофрмация о монстре</div><div class="row">
<img src="img/monster/'.$monstr['monster_id'].'.png" alt=""> <b>'.$m_name['name'].'</b><br></div>
<div class="row">
Здоровье: <font color="orange"> '.$monstr['health'].'</font>/<font color="orange">'.$monstr['max_health'].'</font><br>
Уровень: '.$monstr['level'].'<br>
Сила: '.$monstr['strength'].'<br>
Опыт: <img src="img/stat/oput.png" alt=""> '.$monstr['oput'].'<br>
Золото: <img src="img/money/money.png" alt=""> '.$monstr['money'].'<br>
Предмет (5%): <img src="'.$drop['img'].'" alt=""><br>

';
echo '</div>';
$room = mysql_fetch_assoc(mysql_query("SELECT * FROM `room` WHERE `id`='".$monstr['room_id']."' LIMIT 1"));
echo '<div class="text"><a href="war.php?id='.$room['id'].'">Назад '.$room['name'].'</a></div>';

foot();
?>