<?php
error_reporting(0);
include 'conf/dbc.php';
include 'conf/session_start.php';
$page_title = 'Мутант';
include 'conf/head.php';
include 'conf/top.php';

$usid=abs(intval($_SESSION['id']));
$usst=$dbc->query("SELECT * FROM `users` WHERE`id`='$usid' LIMIT 1")->fetch_assoc();
if($usst['admin']<>'1'){header('location: /');}

$monster_id = "SELECT * FROM monsters WHERE id_monster = ".abs(intval($_GET['id']))." LIMIT 1";
$rn_id = mysqli_query($dbc, $monster_id) or die('');
$row_id = mysqli_fetch_array($rn_id);
$name=$row_id['name'];
$screen=$row_id['screen'];
$max_hp=$row_id['max_hp'];
$yron=$row_id['yron'];
$bronya=$row_id['bronya'];

if (isset($_GET['id']) && is_numeric($_GET['id']) && $_GET['id']!=NULL){
echo '<p class="name2"><a style="text-decoration:none" href="monster_all.php"><img src="img/ico/28.png" width="17" height="17"/>
<span class="lal2">Мутанты</a></span> / '.$name;
echo '</p><div class="stats"><div style="display:inline-block;white-space:nowrap;text-align:left;">
<img src="img/monsters/'.$screen.'" style="margin-right:10px;float:left;" width="70" height="80">
<img src="img/ico/2hit.png" width="12" height="12"/> <span class="lal3">'.$name.'</span><p>
<img src="img/ico/hit.png" width="12" height="12"/> <span class="white">'.$yron.'</span><p>
<img src="img/ico/m_life.png" width="12" height="12"/> <span class="white">'.$max_hp.' (100%)</span><p>
<img src="img/ico/shield.png" width="12" height="12"/> <span class="white">'.$bronya.'</span><p>
</div>';
$idnew = abs(intval($_GET['id']));
$query_newsq = "Select * from monsters order by id_monster desc limit 1";
$result_newsq = mysqli_query($dbc, $query_newsq) or die ('Ошибка передачи запроса к БД');
$row_news = mysqli_fetch_array($result_news);



}
include 'conf/navig.php';
include 'conf/foot.php';
 


?>