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",