2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
// magic идентификацыя
|
|
|
|
|
//if (rand(1,2)==1) {
|
|
|
|
|
|
2020-09-30 12:01:33 +00:00
|
|
|
|
if ($_SESSION['uid'] == null) {
|
|
|
|
|
header("Location: index.php");
|
|
|
|
|
exit;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
|
|
|
|
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`block` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
|
|
|
|
|
$target=$_POST['target'];
|
|
|
|
|
if ($tar['id']) {
|
|
|
|
|
if ($tar['block'] == 1) {
|
|
|
|
|
$ok=0;
|
|
|
|
|
if ($user['align'] > '2' && $user['align'] < '3') {
|
|
|
|
|
$ok=1;
|
|
|
|
|
}
|
|
|
|
|
elseif (($user['align'] == '1.99' && $user['align'] < '2') && ($tar['align'] > '1' && $tar['align'] < '2') && ($user['align'] > $tar['align'])) {
|
|
|
|
|
$ok=1;
|
|
|
|
|
}
|
|
|
|
|
elseif (($user['align'] == '1.99' && $user['align'] < '2') && !($tar['align'] > '2' && $tar['align'] < '3') && !($tar['align'] > '1' && $tar['align'] < '2')) {
|
|
|
|
|
$ok=1;
|
|
|
|
|
}
|
|
|
|
|
if ($ok == 1) {
|
|
|
|
|
if (mysql_query("UPDATE `users` SET `palcom` = '',`block`='0' WHERE `id` = {$tar['id']} LIMIT 1;")) {
|
|
|
|
|
if ($user['sex'] == 1) {$action="снял";}
|
|
|
|
|
else {$action="сняла";}
|
|
|
|
|
if ($user['align'] > '2' && $user['align'] < '3') {
|
|
|
|
|
$angel="Ангел";
|
|
|
|
|
}
|
|
|
|
|
elseif ($user['align'] > '1' && $user['align'] < '2') {
|
|
|
|
|
$angel="Паладин";
|
|
|
|
|
}
|
|
|
|
|
$mess="$angel "{$user['login']}" $action заклятие смерти с "$target"..";
|
|
|
|
|
mysql_query("INSERT INTO `lichka`(`id`,`pers`,`text`,`date`) VALUES ('','".$tar['id']."','$mess','".time()."');");
|
|
|
|
|
mysql_query("INSERT INTO `paldelo`(`id`,`author`,`text`,`date`) VALUES ('','".$_SESSION['uid']."','$mess','".time()."');");
|
|
|
|
|
addch("<img src=i/magic/death_off.gif> $mess");
|
|
|
|
|
echo "<font color=red><b>Успешно снято заклятие смерти с персонажа \"$target\"</b></font>";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "<font color=red><b>Произошла ошибка!<b></font>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "<font color=red><b>Вы не можете снять заклятие смерти с этого персонажа!<b></font>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "<font color=red><b>На персонаже \"$target\" нет заклятия смерти </b></font>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
echo "<font color=red><b>Персонаж \"$target\" не существует!<b></font>";
|
|
|
|
|
}
|