game/modules_data/moder/useban.php
2022-06-07 00:30:34 +03:00

84 lines
3.5 KiB
PHP
Raw Blame History

<?
if(!defined('GAME'))
{
die();
}
if($p['banned']==1 || $p['ban0']==1)
{
$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['align']>1 && $uu['align']<2 && $u->info['admin']==0)
{
$uer = 'Âû íå ìîæåòå èñïîëüçîâàòü äàííîå çàêëÿòèå íà Ïàëàäèíîâ.<br>';
}elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0)
{
$uer = 'Âû íå ìîæåòå èñïîëüçîâàòü äàííîå çàêëÿòèå íà Òàðìàíîâ.<br>';
}elseif($uu['banned']>0)
{
$uer = 'Ïåðñîíàæ áûë çàáëîêèðîâàí ðàíåå';
}elseif($p['banned']==0 && $uu['level']>0)
{
$uer = 'Âû íå ìîæåòå íàêëàäûâàòü çàêëÿòèå ñìåðòè íà ïåðñîíàæåé ñòàðøå 0-ãî óðîâíÿ';
}elseif($uu['admin']>0 && $u->info['admin']==0)
{$uer = 'Âû íå ìîæåòå íàêëàäûâàòü çàêëÿòèå ñìåðòè íà Àíãåëîâ';
//}elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){
// $uer = 'Ïåðñîíàæ íàõîäèòñÿ â äðóãîì ãîðîäå';
}elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0)
{
$uer = 'Âû íå ìîæåòå íàêëàäûâàòü çàêëÿòèå ñìåðòè íà ñòàðøèõ ïî çâàíèþ';
}elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){
$uer = 'Âû íå ìîæåòå íàêëàäûâàòü çàêëÿòèå ñìåðòè íà ñàìîãî ñåáÿ';
}else{
$upd = mysql_query('UPDATE `users` SET `banned` = "'.time().'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
if($upd)
{
$sx = '';
if($u->info['sex']==1)
{
$sx = 'à';
}
$rtxt = '[img[items/pal_button6.gif]] '.$rang.' &quot;'.$u->info['cast_login'].'&quot; íàëîæèë'.$sx.' çàêëÿòèå ñìåðòè íà &quot;'.$uu['login'].'&quot;';
mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
$rtxt = $rang.' &quot;'.$u->info['login'].'&quot; íàëîæèë'.$sx.' çàêëÿòèå &quot;<b>ñìåðòè</b>&quot;.';
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'].'".';
mysql_query("INSERT INTO `ban_email`(`email`, `uid`, `nick_name`) VALUES ('".$uu['mail']."','".$uu['id']."','".$uu['login']."')");
//‚ûòàñêèâàåì èç áîß åñëè â áîþ
if($uu['battle']!=0)
{
$uu['battle'] = 0;
$upd = mysql_query('UPDATE `users` SET `battle` = "'.$uu['battle'].'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
if($upd)
{
mysql_query('UPDATE `stats` SET
`regHP` = "'.time().'"
,`team` = 0
,`battle_yron` = 0
,`battle_exp` = 0
WHERE `id` = "'.$uu['id'].'" LIMIT 1');
}
}
//==========================
//“äàëßåì çàâêè â <20>îé
//
mysql_query("DELETE FROM `zayvki` WHERE `creator` = '".$uu['id']."'");
//==========================
//“äàëßåì çàâêè <20>åùåðû
//
mysql_query("UPDATE `dungeon_zv` SET `delete` = '".time()."' WHERE `uid` = '".$uu['id']."'");
//==========================
}else{
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
}
}
}else{
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
}
}else{
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
}
?>