game/adminion/dn_editor_bots_itms.php

76 lines
3.0 KiB
PHP
Raw Permalink Normal View History

2022-12-19 18:26:14 +00:00
<?php
# Admin Only Area
use User\UserIp;
2022-12-19 18:26:14 +00:00
const GAME = true;
2022-06-06 21:30:34 +00:00
include_once('_incl_data/__config.php');
include_once('_incl_data/class/__db_connect.php');
2022-12-19 18:26:14 +00:00
define('IP', UserIp::get());
$u = User::start();
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
if (!$u->info['admin']) {
die('<meta http-equiv="refresh" content="0; URL=/">');
2022-06-06 21:30:34 +00:00
}
?>
2022-12-19 18:26:14 +00:00
<form method="post" action="?gotonew">
2023-01-10 16:29:32 +00:00
id бота: <input name="id_bot" value="<?= $_POST['id_bot'] ?>"><br>
<input type="submit" value="Перейти">
2022-12-19 18:26:14 +00:00
</form>
2023-01-10 16:29:32 +00:00
--------------- Бот -------------<br>
2022-12-19 18:26:14 +00:00
<?php
$pl = mysql_fetch_array(
mysql_query('SELECT * FROM `test_bot` WHERE `id` = "' . mysql_real_escape_string($_POST['id_bot']) . '" LIMIT 1')
);
if (isset($pl['id'])) {
if (isset($_GET['save'])) {
mysql_query(
'UPDATE `test_bot` SET
`login` = "' . mysql_real_escape_string($_POST['login']) . '",
`obraz` = "' . mysql_real_escape_string($_POST['obraz']) . '",
`level` = "' . mysql_real_escape_string($_POST['level']) . '",
`sex` = "' . mysql_real_escape_string($_POST['sex']) . '",
`name` = "' . mysql_real_escape_string($_POST['name']) . '",
`agressor` = "' . mysql_real_escape_string($_POST['agressor']) . '",
`expB` = "' . mysql_real_escape_string($_POST['expB']) . '",
`stats` = "' . mysql_real_escape_string($_POST['stats']) . '",
`itemsUse` = "' . mysql_real_escape_string($_POST['itemsUse']) . '",
`p_items` = "' . mysql_real_escape_string($_POST['p_items']) . '" WHERE `id` = "' . $pl['id'] . '"
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
LIMIT 1'
);
$pl = mysql_fetch_array(
mysql_query(
'SELECT * FROM `test_bot` WHERE `id` = "' . mysql_real_escape_string($_POST['id_bot']) . '" LIMIT 1'
)
);
}
?>
<form method="post" action="?gotonew&save"><input type="hidden" name="id_bot" value="<?= $_POST['id_bot'] ?>">
2023-01-10 16:29:32 +00:00
Логин: <input name="login" value="<?= $pl['login'] ?>"><br/>
Образ: <input name="obraz" value="<?= $pl['obraz'] ?>"><br/>
Уровень: <input name="level" value="<?= $pl['level'] ?>"><br/>
Пол: <input name="sex" value="<?= $pl['sex'] ?>"> (0 - муж. , 1 - жен.)<br/>
Имя: <input name="name" value="<?= $pl['name'] ?>"><br/>
Агрессия: <input name="agressor" value="<?= $pl['agressor'] ?>"> (0-100%)<br/>
Опыт (%): <input name="expB" value="<?= $pl['expB'] ?>"><br/>
Статы:<br/>
2022-12-19 18:26:14 +00:00
<textarea rows="5" cols="75" name="stats"><?= $pl['stats'] ?></textarea>
<br/>
2023-01-10 16:29:32 +00:00
Предметы (на боте, 2605 - использует приемы. Перечислять чреез запятую id предмета):<br/>
2022-12-19 18:26:14 +00:00
<textarea rows="5" cols="75" name="itemsUse"><?= $pl['itemsUse'] ?></textarea>
<br/>
2023-01-10 16:29:32 +00:00
Предметы которые падают с бота:<br/>
2022-12-19 18:26:14 +00:00
<textarea rows="5" cols="75" name="p_items"><?= $pl['p_items'] ?></textarea>
2023-01-10 16:29:32 +00:00
<br><input type="submit" value="Сохранить"></form>
2022-12-19 18:26:14 +00:00
<?php
} elseif (isset($_POST['id_bot'])) {
2023-01-10 16:29:32 +00:00
echo 'Бот не найден';
2022-06-06 21:30:34 +00:00
}