<?
require_once '../core/system.php';
echo admin();
$header = 'Редактирование босса';
require_once H.'core/head.php';
if($user[prava] >= 7 ){
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='/adminka/'><img src='/images/icon/arrow.png'>Админка</a></li>";
echo "</div>";
}
require_once H.'core/foot.php';
?>