Куча мелких фиксов, уборка мусора.

This commit is contained in:
lopar
2020-09-30 01:39:06 +03:00
parent 640e85cf18
commit 5ac30becb7
149 changed files with 4221 additions and 11012 deletions
+9 -5
View File
@@ -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 = "Предметы в инвентаре";