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

107 lines
2.9 KiB
PHP

<?
if(!defined('GAME'))
{
die();
}
if($p['priemIskl']==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']!=0 && ($uu['align']<=1 || $uu['align']>=2)) || $uu['clan']>0)
{
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â êëàíå èëè ó íåãî óæå åñòü ñêëîííîñòü';
}else{
if( $a == 1 ) {
$nalign = 1.1;
if($_POST['zvanie']==1.4)
{
$nalign = 1.4;
}elseif($_POST['zvanie']==1.5)
{
$nalign = 1.5;
}elseif($_POST['zvanie']==1.6)
{
$nalign = 1.6;
}elseif($_POST['zvanie']==1.7)
{
$nalign = 1.7;
}elseif($_POST['zvanie']==1.75)
{
$nalign = 1.75;
}elseif($_POST['zvanie']==1.9)
{
$nalign = 1.9;
}elseif($_POST['zvanie']==1.91)
{
$nalign = 1.91;
}elseif($_POST['zvanie']==1.92)
{
$nalign = 1.92;
}
}elseif( $a == 3 ) {
$nalign = 3.01;
if($_POST['zvanie']==3.05)
{
$nalign = 3.05;
}elseif($_POST['zvanie']==3.06)
{
$nalign = 3.06;
}elseif($_POST['zvanie']==3.07)
{
$nalign = 3.07;
}elseif($_POST['zvanie']==3.075)
{
$nalign = 3.075;
}elseif($_POST['zvanie']==3.09)
{
$nalign = 3.09;
}elseif($_POST['zvanie']==3.091)
{
$nalign = 3.091;
}
}
if( $nalign > 0 ) {
$upd = mysql_query('UPDATE `users` SET `align` = "'.$nalign.'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
if($upd && $nalign!=$uu['align'])
{
$sx = '';
if($u->info['sex']==1)
{
$sx = 'à';
}
mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"');
if( $a == 1 ) {
$rtxt = $rang.' &quot;'.$u->info['login'].'&quot; ïðèíÿë'.$sx.' ïåðñîíàæà â Îðäåí Ñâåòà (align'.$nalign.').';
}elseif( $a == 3 ) {
$rtxt = $rang.' &quot;'.$u->info['login'].'&quot; ïðèíÿë'.$sx.' ïåðñîíàæà â Àðìàäó (align'.$nalign.').';
}
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)");
if($uu['align']>$nalign)
{
$uer = 'Âû óñïåøíî ïîíèçèëè çâàíèå ïåðñîíàæà "'.$uu['login'].'".<br>';
}elseif($uu['align']<$nalign && $uu['align']>0)
{
$uer = 'Âû óñïåøíî ïîâûñèëè çâàíèå ïåðñîíàæà "'.$uu['login'].'".<br>';
}else{
if( $a == 1 ) {
$uer = 'Âû óñïåøíî ïðèíÿëè ïåðñîíàæà "'.$uu['login'].'" â Îðäåí Ñâåòà.<br>';
}elseif( $a == 3 ) {
$uer = 'Âû óñïåøíî ïðèíÿëè ïåðñîíàæà "'.$uu['login'].'" â Àðìàäó.<br>';
}
}
}else{
$uer = 'Íå óäàëîñü ïðèíÿëè ïåðñîíàæà â ÎÑ';
}
}else{
$uer = 'Ñêëîííîñòü íå ñóùåñòâóåò...';
}
}
}else{
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
}
}else{
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
}
?>