2023-01-28 02:24:37 +00:00
|
|
|
|
<?php
|
|
|
|
|
if (!defined('GAME')) {
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-01 23:47:21 +00:00
|
|
|
|
if ($p['deletInfo'] != 1) {
|
2023-01-28 02:24:37 +00:00
|
|
|
|
$uer = 'У Вас нет прав на использование данного заклятия';
|
2023-12-01 23:47:21 +00:00
|
|
|
|
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;
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
2023-12-01 23:47:21 +00:00
|
|
|
|
|
|
|
|
|
$time = new DateTime();
|
|
|
|
|
$time->modify("+ {$_POST['time']} day");
|
|
|
|
|
(new \Moderation\Moderation($uu['id']))->depersonalize($time);
|
|
|
|
|
|
2023-12-01 23:50:52 +00:00
|
|
|
|
$uer = "Персонаж {$uu['login']} под подозрением до {$time->format('d M Y H:i')}.";
|
2023-12-01 23:47:21 +00:00
|
|
|
|
unset($time);
|
|
|
|
|
|
|
|
|
|
$cmsg = new ChatMessage();
|
|
|
|
|
$cmsg->setRoom($u->info['room']);
|
2023-12-01 23:50:52 +00:00
|
|
|
|
$cmsg->setText("[img[items/cui.gif]] $uer");
|
2023-12-01 23:47:21 +00:00
|
|
|
|
$cmsg->setType(6);
|
|
|
|
|
$cmsg->setTypeTime(1);
|
|
|
|
|
(new Chat())->sendMsg($cmsg);
|