diff --git a/post.php b/post.php index a18415f..e647cf9 100644 --- a/post.php +++ b/post.php @@ -13,14 +13,17 @@ if ($user['battle'] != 0) { die(); } +$changeReceiver = filter_input(INPUT_GET,'change'); +if ($changeReceiver) unset($_SESSION['receiverName']); + $razdelId = filter_input(INPUT_GET, 'razdel'); -$receiverName = filter_input(INPUT_POST, 'receiverName'); +$_SESSION['receiverName'] = filter_input(INPUT_POST, 'receiverName'); $receiverId = null; $queryItems = null; $allowOperations = false; -if ($receiverName) { - $receiver = db::c()->query('SELECT `id`, `level`, `login` FROM `users` WHERE `login` = "?s"', $receiverName)->fetch_assoc(); +if ($_SESSION['receiverName']) { + $receiver = db::c()->query('SELECT `id`, `level`, `login` FROM `users` WHERE `login` = "?s"', $_SESSION['receiverName'])->fetch_assoc(); if (!$receiver['id']) err('Персонажа не существует!'); elseif ($receiver['level'] < 4) err('Персонажей ниже 4-го уровня не обслуживаем!'); else { @@ -79,7 +82,7 @@ if ($receiverName) { ← выйти на Центральную площадь
- Получатель: full() ?> + Получатель: full() ?> Сменить @@ -105,7 +108,7 @@ if ($receiverName) {
";
- передать за 1 кр.