From 4bd6a08e8aa377468137ae3cc2fea9fbd5e609af Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 11 Jun 2022 02:17:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=BA=D0=B0:=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B5=D0=B2=D0=B8=D0=B4=D0=B8=D0=BC=D0=BE=D0=BA?= =?UTF-8?q?=20=D1=83=D0=B5=D1=85=D0=B0=D0=BB=D0=BE=20=D0=B2=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D0=B9=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81.=20=D0=9E?= =?UTF-8?q?=D1=82=D0=B2=D1=8F=D0=B7=D0=BA=D0=B0=20=D0=BE=D1=82=20functions?= =?UTF-8?q?.php.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/admin.php | 12 +++--------- classes/Battles/Admin/User.php | 20 ++++++++++++++++++++ functions.php | 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 classes/Battles/Admin/User.php diff --git a/admin/admin.php b/admin/admin.php index 4e4a270..52a277f 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -4,11 +4,11 @@ * Author: Igor Barkov * Project name: Battles-Game */ -require_once '../functions.php'; +require_once '../config.php'; use Battles\Admin\Clan; +use Battles\Admin\User as AUser; use Battles\Chat; -use Battles\Database\Db; use Battles\Moderation; use Battles\Template; use Battles\User; @@ -49,12 +49,6 @@ if (!empty($_POST['receiver']) && !empty($_POST['tgmsg'])) { Chat::sendTelegraf($_POST['tgmsg'], $receiver->id); echo "Успешно."; } -# Показывает невидимок. -$row = Db::getInstance()->ofetchAll('SELECT id,login FROM users LEFT JOIN users_effects ue on users.id = ue.owner_id WHERE type = 1022 ORDER BY `id` DESC'); -foreach ($row as $r) { - $invisList .= '[id] = ' .$r->id. ', ' .$r->login. '
'; -} - Template::header('ᐰdminка'); ?> @@ -107,4 +101,4 @@ Template::header('ᐰdminка'); Невидимки
-
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/Battles/Admin/User.php b/classes/Battles/Admin/User.php new file mode 100644 index 0000000..71138ab --- /dev/null +++ b/classes/Battles/Admin/User.php @@ -0,0 +1,20 @@ +ofetchAll('select id, login from users left join users_effects ue on users.id = ue.owner_id where type = ' . self::INVISIBILITY_EFFECT); + foreach ($row as $item) { + $list .= '[id] = ' . $item->id . ', ' . $item->login . '
'; + } + return $list; + } +} \ No newline at end of file diff --git a/functions.php b/functions.php index 60ca77b..33d7ba6 100644 --- a/functions.php +++ b/functions.php @@ -473,7 +473,7 @@ function SolveExp($at_id, $def_id, $damage): float 'btl_1' => 1, 'btl_2' => 0.5, 'btl_3' => 0.05, - ]; + ]; $baseexp = [ "0" => "2", "1" => "5",