Куча мелких фиксов, уборка мусора.
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
<?php
|
||||
ob_start();
|
||||
session_start();
|
||||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||||
if ($_SESSION['uid'] == null) {
|
||||
header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? null;
|
||||
|
||||
if ($user['room'] != 22) {
|
||||
if ($user->room != 22) {
|
||||
header("Location: main.php");
|
||||
die();
|
||||
}
|
||||
if ($user['battle'] != 0) {
|
||||
if ($user->battle) {
|
||||
header('location: fbattle.php');
|
||||
die();
|
||||
}
|
||||
@@ -29,8 +33,8 @@ if ($user['battle'] != 0) {
|
||||
|
||||
|
||||
$saleItems = false;
|
||||
$shopCategoryType = empty($_POST['sale']) ?: $_POST['sale'];
|
||||
$shopCategoryTypeNumber = empty($_GET['otdel']) ?: $_GET['otdel'];
|
||||
$shopCategoryType = $_POST['sale'] ?? '';
|
||||
$shopCategoryTypeNumber = $_GET['otdel'] ?? 0;
|
||||
switch ($shopCategoryTypeNumber) {
|
||||
default:
|
||||
$shopCategoryType = "Предметы в инвентаре";
|
||||
|
||||
Reference in New Issue
Block a user