38 lines
967 B
PHP
38 lines
967 B
PHP
<?php
|
||
if (!defined('GAME')) {
|
||
die();
|
||
}
|
||
|
||
if ($p['deletInfo'] != 1) {
|
||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||
return;
|
||
}
|
||
|
||
$uu = \Core\Db::getRow('select * from users where login = ? order by id limit 1', [$_POST['logingo']]);
|
||
|
||
if (!isset($uu['id'])) {
|
||
$uer = 'Персонаж не найден.';
|
||
return;
|
||
}
|
||
|
||
if ($uu['info_delete'] == 1 || $uu['info_delete'] >= time()) {
|
||
$uer = 'Персонаж уже обезличен';
|
||
return;
|
||
}
|
||
|
||
$time = new DateTime();
|
||
$time->modify("+ {$_POST['time']} day");
|
||
(new \Moderation\Moderation($uu['id']))->depersonalize($time);
|
||
|
||
$rtxt = "Персонаж {$uu['login']} под подозрением до {$time->format('d M Y H:i')}.";
|
||
unset($time);
|
||
|
||
$cmsg = new ChatMessage();
|
||
$cmsg->setRoom($u->info['room']);
|
||
$cmsg->setText("[img[items/cui.gif]] $rtxt");
|
||
$cmsg->setType(6);
|
||
$cmsg->setTypeTime(1);
|
||
(new Chat())->sendMsg($cmsg);
|
||
|
||
$uer = $rtxt;
|