Зачем-то инкапсулирем.
This commit is contained in:
+3
-3
@@ -12,13 +12,13 @@ use Battles\User;
|
||||
session_start();
|
||||
require_once 'functions.php';
|
||||
$user = $user ?? new User($_SESSION['uid']);
|
||||
if (!empty($_GET['teleport']) && $user->admin == 1) {
|
||||
if (!empty($_GET['teleport']) && $user->getAdmin() == 1) {
|
||||
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
||||
}
|
||||
|
||||
# ORDEN PHP
|
||||
|
||||
if ($user->admin) {
|
||||
if ($user->getAdmin()) {
|
||||
$abil = db::c()->query('SELECT abil FROM users WHERE id = ?i', $user->getId())->fetch_assoc();
|
||||
$abil = unserialize($abil['abil']);
|
||||
switch ($_POST['use']) {
|
||||
@@ -449,7 +449,7 @@ $bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id` = ?i ', $_SESSION['u
|
||||
Template::header('user_abilities');
|
||||
?>
|
||||
<div style="float: right;">
|
||||
<?php if ($user->admin == 1): ?>
|
||||
<?php if ($user->getAdmin() == 1): ?>
|
||||
<button onclick="location.href='?teleport=1'">Телепорт на ЦП</button>
|
||||
<?php endif; ?>
|
||||
<input type="button" onClick="location.href='main.php';" value="Вернуться">
|
||||
|
||||
Reference in New Issue
Block a user