2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2023-12-01 23:13:29 +00:00
|
|
|
|
if (!defined('GAME')) {
|
|
|
|
|
die();
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
2023-01-28 02:24:37 +00:00
|
|
|
|
|
2023-12-01 23:13:29 +00:00
|
|
|
|
if ($p['zatoch'] != 1 && $p['citym1'] != 1) {
|
|
|
|
|
$uer = 'У Вас нет прав на использование данного заклятия';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$uu = \Core\Db::getRow('select id, login from users where login = ? order by id limit 1', [$_POST['logingo']]);
|
|
|
|
|
|
|
|
|
|
if (!isset($uu['id'])) {
|
|
|
|
|
$uer = 'Персонаж не найден.';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$time = new DateTime();
|
|
|
|
|
$time->modify("+ {$_POST['time']} day");
|
|
|
|
|
(new \Moderation\Moderation($uu['id']))->prison($time);
|
|
|
|
|
\Core\Db::sql('delete from dungeon_zv where uid = ?', [$uu['id']]); // Удаляем заявки в пещеры.
|
|
|
|
|
|
2023-12-01 23:50:52 +00:00
|
|
|
|
$uer = "Персонаж {$uu['login']} был отправлен в тюрьму до {$time->format('d M Y H:i')}.";
|
|
|
|
|
unset($time);
|
|
|
|
|
|
2023-01-28 02:24:37 +00:00
|
|
|
|
$cmsg = new ChatMessage();
|
|
|
|
|
$cmsg->setRoom($u->info['room']);
|
2023-12-01 23:50:52 +00:00
|
|
|
|
$cmsg->setText("[img[items/jail.gif]] $uer");
|
2023-01-28 02:24:37 +00:00
|
|
|
|
$cmsg->setType(6);
|
|
|
|
|
$cmsg->setTypeTime(1);
|
|
|
|
|
(new Chat())->sendMsg($cmsg);
|