From c937f7a0ba322becb539dd3e975bc6082370f2ba Mon Sep 17 00:00:00 2001 From: lopar Date: Tue, 27 Oct 2020 01:43:54 +0200 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=BE=D0=BB=D1=8C=D1=88=D0=B5=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=B7=D1=8F=20=D1=82=D0=B5=D0=BB=D0=B5=D0=BF?= =?UTF-8?q?=D0=BE=D1=80=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C?= =?UTF-8?q?=D1=81=D1=8F=20=D0=B2=20=D0=BF=D0=BE=D0=B5=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.php | 273 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 137 insertions(+), 136 deletions(-) diff --git a/main.php b/main.php index b6b4937..0d495ab 100644 --- a/main.php +++ b/main.php @@ -50,7 +50,7 @@ while ($row = $data->fetch_assoc()) { } //Обработчики нажатий на кнопки. -if ($_POST['battlefield'] ?? 0) { +if ($_POST['battlefield'] ?? 0 && $user->room == 1) { header('Location: zayavka.php'); exit(); } @@ -62,7 +62,7 @@ if ($_POST['move_inside'] ?? 0 && $user->room == 20) { header('Location: main.php?goto=arena'); exit(); } -if ($_POST['move_outside'] ?? 0 && $user->room != 20) { +if ($_POST['move_outside'] ?? 0 && $user->room == 1) { header('Location: main.php?goto=plo'); exit(); } @@ -71,137 +71,138 @@ if ($_POST['main_page'] ?? 0) { exit(); } -/* === проверяем соответствие комнаты и скрипта === */ -if (in_array($user->room, [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111], 1)) { - header('Location: city.php'); - exit(); -} -if ($user->room == 22) { - header('Location: shop.php'); - exit(); -} -if ($user->room == 23) { - header('Location: repair.php'); - exit(); -} -if ($user->room == 25) { - header('Location: comission.php'); - exit(); -} -if ($user->room == 27) { - header('Location: post.php'); - exit(); -} -if ($user->room == 29) { - header('Location: bank.php'); - exit(); -} -if ($user->room == 31) { - header('Location: tower.php'); - exit(); -} -if ($user->room == 30) { - header('Location: clan_create.php'); - exit(); -} -if ($user->room == 34) { - header('Location: fshop.php'); - exit(); -} -if ($user->room == 45) { - header('Location: clan_castle.php'); - exit(); -} -if ($user->room == 50) { - header('Location: ashop.php'); - exit(); -} -if ($user->room == 53) { - header('Location: library.php'); - exit(); -} -if ($user->room == 61) { - header('Location: akadem.php'); - exit(); -} -if ($user->room == 650) { - header('Location: ul_clans.php'); - exit(); -} +if ($edit === null) { + /* === проверяем соответствие комнаты и скрипта === */ + if (in_array($user->room, [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111])) { + header('Location: city.php'); + exit(); + } + if ($user->room == 22) { + header('Location: shop.php'); + exit(); + } + if ($user->room == 23) { + header('Location: repair.php'); + exit(); + } + if ($user->room == 25) { + header('Location: comission.php'); + exit(); + } + if ($user->room == 27) { + header('Location: post.php'); + exit(); + } + if ($user->room == 29) { + header('Location: bank.php'); + exit(); + } + if ($user->room == 31) { + header('Location: tower.php'); + exit(); + } + if ($user->room == 30) { + header('Location: clan_create.php'); + exit(); + } + if ($user->room == 34) { + header('Location: fshop.php'); + exit(); + } + if ($user->room == 45) { + header('Location: clan_castle.php'); + exit(); + } + if ($user->room == 50) { + header('Location: ashop.php'); + exit(); + } + if ($user->room == 53) { + header('Location: library.php'); + exit(); + } + if ($user->room == 61) { + header('Location: akadem.php'); + exit(); + } + if ($user->room == 650) { + header('Location: ul_clans.php'); + exit(); + } //ЦХ -if ($user->room == 600) { - header('Location: c_haos.php'); - exit(); + if ($user->room == 600) { + header('Location: c_haos.php'); + exit(); + } + if ($user->room == 601) { + header('Location: c_haos_in.php'); + exit(); + } + if ($user->room == 602) { + header('Location: c_park.php'); + exit(); + } + if ($user->room == 603) { + header('Location: aren_of_angels.php'); + exit(); + } + if ($user->room == 620) { + header('Location: enter_cave.php'); + exit(); + } + if ($user->room == 621) { + header('Location: cave.php'); + exit(); + } + if ($user->room == 660) { + header('Location: hostel.php'); + exit(); + } + if ($user->room == 661) { + header('Location: hostel_room.php'); + exit(); + } + if ($user->room == 662) { + header('Location: quest_room.php'); + exit(); + } + if ($user->room == 760) { + header('Location: c_forest.php'); + exit(); + } + if ($user->room == 1000) { + header('Location: solib/enterbezdna.php'); + exit(); + } + if ($user->room == 1001) { + header('Location: solib/dungeon.php'); + exit(); + } + if ($user->room == 1051) { + header('Location: lab_enter.php'); + exit(); + } + if ($user->room == 1052) { + header('Location: labirint.php'); + exit(); + } + if ($user->room == 402) { + header('Location: vxod.php'); + exit(); + } + if ($user->room == 403) { + header('Location: canalizaciya.php'); + exit(); + } + if ($user->room == 1055) { + header('Location: group_arena.php'); + exit(); + } + if ($user->room == 666) { + header('Location: jail.php'); + exit(); + } } -if ($user->room == 601) { - header('Location: c_haos_in.php'); - exit(); -} -if ($user->room == 602) { - header('Location: c_park.php'); - exit(); -} -if ($user->room == 603) { - header('Location: aren_of_angels.php'); - exit(); -} -if ($user->room == 620) { - header('Location: enter_cave.php'); - exit(); -} -if ($user->room == 621) { - header('Location: cave.php'); - exit(); -} -if ($user->room == 660) { - header('Location: hostel.php'); - exit(); -} -if ($user->room == 661) { - header('Location: hostel_room.php'); - exit(); -} -if ($user->room == 662) { - header('Location: quest_room.php'); - exit(); -} -if ($user->room == 760) { - header('Location: c_forest.php'); - exit(); -} -if ($user->room == 1000) { - header('Location: solib/enterbezdna.php'); - exit(); -} -if ($user->room == 1001) { - header('Location: solib/dungeon.php'); - exit(); -} -if ($user->room == 1051) { - header('Location: lab_enter.php'); - exit(); -} -if ($user->room == 1052) { - header('Location: labirint.php'); - exit(); -} -if ($user->room == 402) { - header('Location: vxod.php'); - exit(); -} -if ($user->room == 403) { - header('Location: canalizaciya.php'); - exit(); -} -if ($user->room == 1055) { - header('Location: group_arena.php'); - exit(); -} -if ($user->room == 666) { - header('Location: jail.php'); - exit(); -} - function del_efs($id, $type) { if ($id && !in_array($type, [2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20])) { @@ -308,14 +309,14 @@ if ($goto) { err('У вас тяжелая травма, вы не можете передвигатся...'); $imove = false; } - if ($goto == 'plo' && !$user->zayavka && $imove == true && $user->room != 20) { + if ($goto == 'plo' && !$user->zayavka && $imove && $user->room != 20) { db::c()->query('UPDATE users, online SET users.room = 20, online.room = 20 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']); header('Location: city.php'); exit("Топ-топ-топ..."); } else { err('Подали заявку на бой и убегаете из клуба? Нехорошо...'); } - if ($goto == 'arena' && $user->room == 20 && $imove == true) { + if ($goto == 'arena' && $user->room == 20 && $imove) { db::c()->query('UPDATE users, online SET users.room = 1, online.room = 1 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']); header('Location: main.php'); exit("Топ-топ-топ..."); @@ -559,13 +560,13 @@ Template::header('Игра'); title="Образы">
- - room == 20): ?> - + room == 1): ?> + +