32 lines
965 B
PHP
32 lines
965 B
PHP
<?php
|
||
if (!defined('GAME')) {
|
||
die();
|
||
}
|
||
|
||
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']]); // Удаляем заявки в пещеры.
|
||
|
||
$rtxt = "Персонаж {$uu['login']} был отправлен в тюрьму до {$time->format('d M Y H:i')}.";
|
||
$cmsg = new ChatMessage();
|
||
$cmsg->setRoom($u->info['room']);
|
||
$cmsg->setText("[img[items/jail.gif]] $rtxt");
|
||
$cmsg->setType(6);
|
||
$cmsg->setTypeTime(1);
|
||
(new Chat())->sendMsg($cmsg);
|
||
|
||
$uer = $rtxt;
|