Рефакторинг, очистка, работа над ошибками, связанными с базой, отказ от глобальной переменной $user во многих файлах.

Singleton в некоторых местах вместо решения #42.
Новые шаги для решения #16 и #52.
Closes #42.
Closes #32.
Closes #31.
This commit is contained in:
Igor Barkov (iwork)
2022-01-27 01:15:33 +02:00
parent b1ba212c8c
commit 3502904656
82 changed files with 1575 additions and 2015 deletions
+3 -2
View File
@@ -1,14 +1,15 @@
<?php
use Battles\Template;
use Battles\User;
require_once "functions.php";
if ($user->getLevel() < 4 && $user->getLevel() > 10) {
if (User::getInstance()->getLevel() < 4 && User::getInstance()->getLevel() > 10) {
header('location: main.php?act=none');
exit;
}
if ($user->getRoom() == 403) {
if (User::getInstance()->getRoom() == 403) {
header('Location: canalizaciya.php');
exit;
}