Куча мелочей, в том числе по #42.
This commit is contained in:
@@ -8,23 +8,24 @@ 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->getAdmin()) {
|
||||
if (!User::$current->getAdmin()) {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
exit;
|
||||
}
|
||||
if (isset($_GET['sleep'])) {
|
||||
Moderation::muteChat($user->getId(), strtotime('15min'));
|
||||
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->getId());
|
||||
Moderation::addToUserLog($u->getId(), $_POST['ldtext'], User::$current->getId());
|
||||
unset($u);
|
||||
}
|
||||
|
||||
@@ -34,7 +35,7 @@ if (isset($_POST['syschatmsg'])) {
|
||||
|
||||
//clans to reg
|
||||
$unregisteredClans = new class {
|
||||
public $db;
|
||||
public DBPDO $db;
|
||||
|
||||
public function getList()
|
||||
{
|
||||
@@ -75,7 +76,7 @@ UNREGCLANLIST;
|
||||
$bank::setBankMoney($bank->getMoney() + GameConfigs::CLAN['clan_register_cost'], $id);
|
||||
}
|
||||
};
|
||||
$unregisteredClans->db = $db;
|
||||
$unregisteredClans->db = DBPDO::$db;
|
||||
$unregisteredClans->getList();
|
||||
|
||||
if (isset($_GET['regclan'])) {
|
||||
@@ -91,19 +92,15 @@ if (isset($_GET['remclan'])) {
|
||||
|
||||
# Телеграф.
|
||||
if (!empty($_POST['receiver']) && !empty($_POST['tgmsg'])) {
|
||||
$receiver = $db->ofetch('SELECT id FROM users WHERE login= ?', $_POST['receiver']);
|
||||
$receiver = DBPDO::$db->ofetch('SELECT id FROM users WHERE login= ?', $_POST['receiver']);
|
||||
telegraph($receiver->id, $_POST['tgmsg']);
|
||||
echo "Успешно.";
|
||||
}
|
||||
# Показывает невидимок.
|
||||
$row = $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');
|
||||
$i = 0;
|
||||
$invisList = '';
|
||||
while ($i < count($row)) {
|
||||
$invisList .= '<b>[id] = ' . $row[$i]->id . ', ' . $row[$i]->login . ' </b><br>';
|
||||
$i++;
|
||||
$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 .= '<b>[id] = ' .$r->id. ', ' .$r->login. '</b><br>';
|
||||
}
|
||||
unset($i);
|
||||
|
||||
|
||||
Template::header('ᐰdminка');
|
||||
|
||||
Reference in New Issue
Block a user