меньше кода на те же проверки.

This commit is contained in:
Igor Barkov (iwork) 2019-09-16 17:15:30 +03:00
parent 77e8b7de2a
commit 0dd85be028

View File

@ -2282,54 +2282,12 @@ if (input::get('edit')) {
//==========================================================================================================
//проверяем соответствие комнаты и скрипта
if ($user['room'] == 20) {
header('Location: city.php');
die();
}
if ($user['room'] == 21) {
header('Location: city.php');
die();
}
if ($user['room'] == 26) {
header('Location: city.php');
die();
}
if ($user['room'] == 48) {
header('Location: city.php');
die();
}
if ($user['room'] == 51) {
header('Location: city.php');
die();
}
if ($user['room'] == 52) {
header('Location: city.php');
die();
}
if ($user['room'] == 651) {
header('Location: city.php');
die();
}
if ($user['room'] == 2655) {
header('Location: city.php');
die();
}
if ($user['room'] == 2601) {
header('Location: city.php');
die();
}
if ($user['room'] == 2701) {
header('Location: city.php');
die();
}
if ($user['room'] == 2702) {
header('Location: city.php');
die();
}
if ($user['room'] == 2111) {
if (in_array($user['room'], [20,21,26,48,51,52,651,2655,2601,2701,2702,2111], 1)) {
header('Location: city.php');
die();
}
if ($user['room'] == 22) {
header('Location: shop.php');
die();