34 lines
890 B
PHP
34 lines
890 B
PHP
<?php
|
||
if (!defined('GAME')) {
|
||
die();
|
||
}
|
||
|
||
if ($p['unbanned'] != 1) {
|
||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||
return;
|
||
}
|
||
|
||
$uu = \Core\Db::getRow('select id, login, banned, mail from users where login = ? order by id limit 1', [$_POST['logingo']]);
|
||
|
||
if (!isset($uu['id'])) {
|
||
$uer = 'Персонаж не найден.';
|
||
return;
|
||
}
|
||
|
||
if (empty($uu['banned'])) {
|
||
$uer = 'Персонаж не заблокирован';
|
||
return;
|
||
}
|
||
|
||
(new \Moderation\Moderation($uu['id']))->unban();
|
||
\Core\Db::sql('delete from ban_email where email = ?', [$uu['mail']]);
|
||
|
||
$uer = "Персонаж {$uu['login']} разблокирован.";
|
||
|
||
$cmsg = new ChatMessage();
|
||
$cmsg->setRoom($u->info['room']);
|
||
$cmsg->setText("[img[items/pal_button7.gif]] $uer");
|
||
$cmsg->setType(6);
|
||
$cmsg->setTypeTime(1);
|
||
(new Chat())->sendMsg($cmsg);
|