* Project name: Battles-Game */ require_once '../functions.php'; use Battles\Bank; use Battles\Database\Db; use Battles\GameConfigs; use Battles\Moderation; use Battles\Nick; use Battles\Template; use Battles\User; if (!User::getInstance()->getAdmin()) { header("HTTP/1.0 404 Not Found"); exit; } if (isset($_GET['sleep'])) { Moderation::muteChat(User::getInstance()->getId(), strtotime('15min')); } if (isset($_POST['ldnick']) && isset($_POST['ldtext'])) { Moderation::addToUserLog(User::getInstance($_POST['ldnick'])->getId(), $_POST['ldtext'], User::getInstance()->getId()); } if (isset($_POST['syschatmsg'])) { Moderation::addChatSysMsg($_POST['syschatmsg']); } //clans to reg $unregisteredClans = new class { public function getList() { $row = Db::getInstance()->ofetchAll('SELECT * FROM clans WHERE status = 0'); $i = 0; while ($i < count($row)) { $id = $row[$i]->owner_id; $login = User::getInstance($row[$i]->owner_id)->getLogin(); $fullName = $row[$i]->full_name; $shortName = $row[$i]->short_name; $info = nl2br($row[$i]->info); $i++; echo <<
$fullName [$shortName] Глава клана: $login
Описание:
$info

UNREGCLANLIST; } unset($i); } public function allowRegister($id) { Db::getInstance()->execute('UPDATE clans SET status = 1 WHERE status = 0 AND owner_id = ?', $id); } public function disallowRegister($id) { $bank = new Bank($id); Db::getInstance()->execute('DELETE FROM clans WHERE status = 0 AND owner_id = ?', $id); $bank::setBankMoney($bank->getMoney() + GameConfigs::CLAN['clan_register_cost'], $id); } }; $unregisteredClans->getList(); if (isset($_GET['regclan'])) { $unregisteredClans->allowRegister($_GET['regclan']); header('Location:/admin/admin.php'); exit; } if (isset($_GET['remclan'])) { $unregisteredClans->disallowRegister($_GET['remclan']); header('Location:/admin/admin.php'); exit; } # Телеграф. if (!empty($_POST['receiver']) && !empty($_POST['tgmsg'])) { $receiver = Db::getInstance()->ofetch('SELECT id FROM users WHERE login= ?', $_POST['receiver']); telegraph($receiver->id, $_POST['tgmsg']); 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ка'); ?> Абилки. Работают только на себя. Надо дописать цель.



Добавить в «дело» игрока заметку о нарушении правил, прокрутке и пр.
Отправить системное сообщение в чат
Телеграф
Поменять статус
Невидимки