* Project name: Battles-Game */ session_start(); require_once '../functions.php'; use Battles\Bank; use Battles\Database\DBPDO; use Battles\GameConfigs; use Battles\Moderation; use Battles\Nick; use Battles\Template; use Battles\User; if (!User::$current->getAdmin()) { header("HTTP/1.0 404 Not Found"); exit; } if (isset($_GET['sleep'])) { Moderation::muteChat(User::$current->getId(), strtotime('15min')); } if (isset($_POST['ldnick']) && isset($_POST['ldtext'])) { $u = new User($_POST['ldnick']); Moderation::addToUserLog($u->getId(), $_POST['ldtext'], User::$current->getId()); unset($u); } if (isset($_POST['syschatmsg'])) { Moderation::addChatSysMsg($_POST['syschatmsg']); } //clans to reg $unregisteredClans = new class { public DBPDO $db; public function getList() { $row = $this->db->ofetchAll('SELECT * FROM clans WHERE status = 0'); $i = 0; while ($i < count($row)) { $id = $row[$i]->owner_id; $login = Nick::id($row[$i]->owner_id)->short(1); $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) { $this->db->execute('UPDATE clans SET status = 1 WHERE status = 0 AND owner_id = ?', $id); } public function disallowRegister($id) { $bank = new Bank($id); $this->db->execute('DELETE FROM clans WHERE status = 0 AND owner_id = ?', $id); $bank::setBankMoney($bank->getMoney() + GameConfigs::CLAN['clan_register_cost'], $id); } }; $unregisteredClans->db = DBPDO::$db; $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 = DBPDO::$db->ofetch('SELECT id FROM users WHERE login= ?', $_POST['receiver']); telegraph($receiver->id, $_POST['tgmsg']); echo "Успешно."; } # Показывает невидимок. $row = DBPDO::$db->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ка'); ?> Абилки. Работают только на себя. Надо дописать цель.



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