Вход Регистрация
Файл: adm_bot.php
Строк: 47
<?
require_once ('system/func.php');
auth(); // Закроем от гостей
access(2);
$title 'Создание ботов';
require_once (
'system/header.php');
if(isset(
$_REQUEST['post'])){
$login text($_POST['login']);
$level num($_POST['level']);
$param_ot num($_POST['param_ot']);
$param_do num($_POST['param_do']);
$krit_udar num($_POST['krit_udar']);
$pass rand(11111,99999);
if(!isset(
$err)){
mysql_query('INSERT INTO `users` SET `login` = "'.$login.'", `level` = "'.$level.'", `str` = "'.rand($param_ot,$param_do).'", `def` = "'.rand($param_ot,$param_do).'", `max_health` = "'.rand($param_ot,$param_do).'", `krit` = "'.$krit_udar.'", `bot` = "1"');
$id mysql_insert_id(); 
for(
$items 1$items 9$items++){
if(
$items == 1)$tip 'golova';
if(
$items == 2)$tip 'plechi';
if(
$items == 3)$tip 'tors';
if(
$items == 4)$tip 'perchatki';
if(
$items == 5)$tip 'lev';
if(
$items == 6)$tip 'prav';
if(
$items == 7)$tip 'nogi';
if(
$items == 8)$tip 'obuv';
$item mysql_fetch_array(mysql_query("SELECT * FROM `item` WHERE `id_komplekt` = ".rand(1,8)." AND `tip` = '$tip'"));
mysql_query("INSERT INTO `inv` SET 
`id_user` = '
$id', 
`name` = '
$item[name]', 
`str` = '
$item[str]', 
`def` = '
$item[def]', 
`health` = '
$item[health]', 
`tip` = '
$item[tip]', 
`skill` = '
$item[skill]', 
`odeta` = 'da' , 
`item` = '
$item[item]'");
}
$_SESSION['msg'] = "Бот успешно создан";
header('Location: ?');
exit();
}else{
$_SESSION['msg'] = $err;
header('Location: ?');
exit();
}
}
echo 
"<div class='block'>";
echo 
"<form method='post' action=''>";
echo 
"Логин:<br><input type='text' name='login' value=''><br>";
echo 
"Уровень:<br><input type='text' name='level' value='10'><br>";
echo 
"Параметры:<br>От <input type='text' name='param_ot' value='100' style='width:80%;'><br>";
echo 
"До <input type='text' name='param_do' value='150' style='width:80%;'><br>";
echo 
"Крит-удар:<br><input type='text' name='krit_udar' value='1.00'><br>";
echo 
"<input type='submit' class='btn' value='Создать' name='post'>";
echo 
"</form>";
echo 
"</div>";
$set['p_str'] = 10;
$k_post mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `bot` = '1'"),0);
$k_page k_page($k_post,$set['p_str']);
$page page($k_page);
$start $set['p_str']*$page-$set['p_str'];
$q mysql_query("SELECT * FROM `users` WHERE `bot` = '1' ORDER BY `id` DESC LIMIT $start$set[p_str]");
echo 
"<div class='block'>";
if(
$k_post == 0)echo "Ботов не обнаружено...";
while(
$post mysql_fetch_assoc($q)) {
$image icons_user($post[id]);
echo 
$image." <a href='/profile/$post[id]'>$post[login]</a>, ".ico('icons','level.png').$post[level]ур.<br>";
}
str('?',$k_page,$page); // Вывод страниц
echo "</div>";
echo 
"<a href='/settGame' class='link'>".ico('icons','arrow.png')." Вернуться назад</a>";
require_once (
'system/footer.php');
?>
Онлайн: 1
Реклама