patch-dressedcheck #57
@ -4,11 +4,11 @@
|
||||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||
* 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 .= '<b>[id] = ' .$r->id. ', ' .$r->login. '</b><br>';
|
||||
}
|
||||
|
||||
|
||||
Template::header('ᐰdminка');
|
||||
?>
|
||||
@ -107,4 +101,4 @@ Template::header('ᐰdminка');
|
||||
</form>
|
||||
|
||||
<span class="legend">Невидимки</span><br>
|
||||
<div class="abils" style="width: fit-content;"><?= $invisList ?></div>
|
||||
<div class="abils" style="width: fit-content; font-weight: bold;"><?= AUser::getInvisiblesList() ?></div>
|
20
classes/Battles/Admin/User.php
Normal file
20
classes/Battles/Admin/User.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Battles\Admin;
|
||||
|
||||
use Battles\Database\Db;
|
||||
|
||||
class User
|
||||
{
|
||||
private const INVISIBILITY_EFFECT = 1022;
|
||||
|
||||
public static function getInvisiblesList(): string
|
||||
{
|
||||
$list = '';
|
||||
$row = Db::getInstance()->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 . '<br>';
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user