Зачем-то инкапсулирем.

This commit is contained in:
lopar
2021-02-01 21:20:23 +02:00
parent 7dd6368b84
commit 0ccc2d1af5
64 changed files with 393 additions and 392 deletions
+3 -3
View File
@@ -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="Вернуться">