2022-06-06 21:30:34 +00:00
|
|
|
<?php
|
2022-08-25 11:23:36 +00:00
|
|
|
# Admin Only Area
|
2022-06-06 21:30:34 +00:00
|
|
|
/*
|
|
|
|
|
2023-01-10 16:29:32 +00:00
|
|
|
Ядро для обработки данных.
|
|
|
|
Обработка поединков, обработка заявок, обработка ботов, обработка пещер, обработка турниров, обработка временных генераций
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
const GAME = true;
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
|
|
include('_incl_data/__config.php');
|
|
|
|
include('_incl_data/class/__db_connect.php');
|
2022-08-25 11:23:36 +00:00
|
|
|
$u = User::start();
|
2022-06-06 21:30:34 +00:00
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
if (!$u->info['admin']) {
|
2023-03-31 18:30:14 +00:00
|
|
|
header('location: /');
|
2022-08-25 11:23:36 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
$itm = mysql_fetch_array(
|
|
|
|
mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = ' . (int)$_GET['edit_item_data'])
|
|
|
|
);
|
|
|
|
if (isset($itm['id'])) {
|
|
|
|
if (isset($_POST['newdata'])) {
|
|
|
|
mysql_query(
|
|
|
|
'UPDATE `items_main_data` SET `data` = "' . mysql_real_escape_string(
|
|
|
|
$_POST['newdata']
|
|
|
|
) . '" WHERE `id` = "' . mysql_real_escape_string($itm['id']) . '" LIMIT 1'
|
|
|
|
);
|
|
|
|
die('<script>window.close();</script>');
|
|
|
|
}
|
2023-01-10 16:29:32 +00:00
|
|
|
echo '<form method="post" action="item_edit_data.php?edit_item_data=' . $itm['items_id'] . '"><b>Номер предмета: ' . $itm['items_id'] . '</b><br><textarea name="newdata" rows="20" cols="100">' . $itm['data'] . '</textarea><br><input type="submit" value="Сохранить"></form>';
|
2022-06-06 21:30:34 +00:00
|
|
|
}
|