<?
require_once '../core/system.php';
echo admin();
$header = 'Редактирование Босса!';
require_once H.'core/head.php';

if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `boss` WHERE `id` = '".intval($_GET['id'])."'"),0) == true){
mysql_query("DELETE FROM `boss` WHERE `id` = '".intval($_GET['id'])."'");
$_SESSION['message'] = "Босс улален!";
header('Location: ?');
exit();
}
$q = mysql_query("SELECT * FROM `boss` ORDER BY `lvl` ASC");
echo "<div class='player'>";
while($boss = mysql_fetch_assoc($q)) {
echo "<img src='/images/icon/user.png'> <a href='set_boss2.php?id=$boss[id]'>$boss[name]</a> | <a href='set_boss.php?id=$boss[id]'><img src='/images/icon/error.png'></a><br>";
}
echo "</div>";
echo "<div class='mini-line'></div>";
echo "<div class='player menuList'>";
echo "<li><a href='/Adm_panel/'><img src='/images/icon/arrow.png'>Админ-Панель</a></li>";
echo "</div>";
require_once H.'core/foot.php';
?>