Куча мелочей, в том числе по #42.

This commit is contained in:
lopar
2021-08-25 04:44:36 +03:00
parent cbbbb8a3c6
commit 1f38e6bd61
21 changed files with 223 additions and 378 deletions
+6 -6
View File
@@ -5,17 +5,17 @@ use Battles\GameConfigs;
use Battles\Nick;
use Battles\Rooms;
use Battles\Template;
use Battles\User;
session_start();
require_once 'functions.php';
if (!$user->getClan()) {
if (!User::$current->getClan()) {
exit('Ошибка! Вы не состоите в клане!');
}
Clan::$current = new Clan($user, $db);
if ($user->getClan() != Clan::$current->getClanShortName()) {
exit('Ошибка! Клана ' . $user->getClan() . ' не существует!');
Clan::$current = new Clan();
if (User::$current->getClan() != Clan::$current->getClanShortName()) {
exit('Ошибка! Клана ' . User::$current->getClan() . ' не существует!');
}
Template::header('clan');
@@ -65,7 +65,7 @@ Template::header('clan');
<h3><img src="./i/clan/<?= Clan::$current->getClanShortName() ?>.png"
alt="<?= Clan::$current->getClanShortName() ?>"><?= Clan::$current->getClanName() ?></h3>
<?php if (Clan::$current->getClanOwnerId() === $user->getId()): ?>
<?php if (Clan::$current->getClanOwnerId() === User::$current->getId()): ?>
<div>
<span id="add_member">
<input type="submit" onclick="use('add_member')" value="Принять в клан">