Рефакторинг, очистка, работа над ошибками, связанными с базой, отказ от глобальной переменной $user во многих файлах.
Singleton в некоторых местах вместо решения #42. Новые шаги для решения #16 и #52. Closes #42. Closes #32. Closes #31.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user