2023-01-28 02:24:37 +00:00
|
|
|
|
<?php
|
|
|
|
|
if (!defined('GAME')) {
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
if ($p['deletInfo'] == 1) {
|
|
|
|
|
$tm = (int)$_POST['time'];
|
|
|
|
|
if ($tm != 1 && $tm != 7 && $tm != 14 && $tm != 30 && $tm != 60) {
|
|
|
|
|
$uer = 'Неверно указаны данные';
|
|
|
|
|
} else {
|
|
|
|
|
$uu = mysql_fetch_array(
|
|
|
|
|
mysql_query(
|
|
|
|
|
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
if (isset($uu['id'])) {
|
|
|
|
|
if ($uu['info_delete'] != 1 && $uu['info_delete'] < time()) {
|
|
|
|
|
$srok = [
|
|
|
|
|
1 => 'бессрочно',
|
|
|
|
|
7 => 'неделя',
|
|
|
|
|
14 => 'две недели',
|
|
|
|
|
30 => 'месяц',
|
|
|
|
|
60 => 'два месяца',
|
|
|
|
|
];
|
|
|
|
|
$srok = $srok[$tm];
|
|
|
|
|
if ($tm == 1) {
|
|
|
|
|
$tm = '`info_delete` = "1"';
|
|
|
|
|
} elseif ($tm == 7) {
|
|
|
|
|
$tm = '`info_delete` = "' . (time() + 7 * 86400) . '"';
|
|
|
|
|
} elseif ($tm == 14) {
|
|
|
|
|
$tm = '`info_delete` = "' . (time() + 14 * 86400) . '"';
|
|
|
|
|
} elseif ($tm == 30) {
|
|
|
|
|
$tm = '`info_delete` = "' . (time() + 30 * 86400) . '"';
|
|
|
|
|
} elseif ($tm == 60) {
|
|
|
|
|
$tm = '`info_delete` = "' . (time() + 60 * 86400) . '"';
|
|
|
|
|
}
|
|
|
|
|
$upd = mysql_query('UPDATE `users` SET ' . $tm . ' WHERE `id` = "' . $uu['id'] . '" LIMIT 1');
|
|
|
|
|
if ($upd) {
|
|
|
|
|
$sx = '';
|
|
|
|
|
if ($u->info['sex'] == 1) {
|
|
|
|
|
$sx = 'а';
|
|
|
|
|
}
|
|
|
|
|
$rtxt = '[img[items/cui.gif]] ' . $rang . ' "' . $u->info['cast_login'] . '" использовал' . $sx . ' заклятие обезличивание на "' . $uu['login'] . '" сроком ' . $srok;
|
|
|
|
|
|
|
|
|
|
$cmsg = new ChatMessage();
|
|
|
|
|
$cmsg->setCity($u->info['city']);
|
|
|
|
|
$cmsg->setRoom($u->info['room']);
|
|
|
|
|
$cmsg->setText($rtxt);
|
|
|
|
|
$cmsg->setType(6);
|
|
|
|
|
$cmsg->setTypeTime(1);
|
|
|
|
|
(new Chat())->sendMsg($cmsg);
|
|
|
|
|
|
|
|
|
|
$rtxt = $rang . ' "' . $u->info['login'] . '" использовал' . $sx . ' заклятие "<b>обезличивание</b>", сроком ' . $srok . '.';
|
|
|
|
|
mysql_query(
|
|
|
|
|
"INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time(
|
|
|
|
|
) . "','" . $rtxt . "','" . $u->info['login'] . "',0)"
|
|
|
|
|
);
|
|
|
|
|
$uer = 'Вы успешно использовали заклятие обезличивания на персонажа "' . $uu['login'] . '".<br>';
|
|
|
|
|
} else {
|
|
|
|
|
$uer = 'Не удалось использовать данное заклятие';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$uer = 'Персонаж уже обезличен';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$uer = 'Персонаж не найден в этом городе';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$uer = 'У Вас нет прав на использование данного заклятия';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|