<?php
require_once '../core/system.php';
echo admin();
$header = 'Админ Панель!';
require_once '../core/head.php';
if($user[prava] >= 5 ){
if(isset($_GET['add'])){
$name = check($_POST['runa']);
$lvl = abs(intval($_POST['lvl']));
if(empty($name) or mysql_result(mysql_query("SELECT count(id) from `runas` where `name` = '".$name."'"),0) >= 1){
echo'Ошибка.';
}else{
echo'Комплект добавлен!<br/>';
mysql_query("INSERT INTO `runas` set `name` = '".$name."', `lvl` = '".$lvl."'");
}
}
echo'<form action="?add" method="post">Название комплекта:<br/><input type="text" name="runa"/><br/>
Уровень:<br/><input type="number" name="lvl" value="1"/>
<input type="submit" value="Добавить"/></form>';

echo "<div class='mini-line'></div>";
echo "<div class='player menuList'>";
echo "<li><a href='$admin_tools_link'><img src='/images/icon/arrow.png'>$admin_tools_title_name</a></li>";
echo "</div>";
}
require_once H.'core/foot.php';
?>