69 lines
3.3 KiB
PHP
69 lines
3.3 KiB
PHP
<?
|
|
if(!defined('GAME'))
|
|
{
|
|
die();
|
|
}
|
|
if($p['marry']==1)
|
|
{
|
|
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
|
$uu2 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.mysql_real_escape_string($uu['marry']).'" LIMIT 1'));
|
|
if(isset($uu['id']) && isset($uu2['id']))
|
|
{
|
|
|
|
if($uu['marry'] == 0)
|
|
{
|
|
$uer = 'Ïåðñîíàæ íå íàõîäèòñÿ â áðàêå<br>';
|
|
}elseif($uu2['marry'] == 0)
|
|
{
|
|
$uer = 'Ïåðñîíàæ íå íàõîäèòñÿ â áðàêå<br>';
|
|
}elseif($uu['admin']>0 && $u->info['admin']==0)
|
|
{
|
|
$uer = 'Âû íå ìîæåòå íàêëàäûâàòü çàêëÿòèå íà Àíãåëîâ';
|
|
}elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){
|
|
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â äðóãîì ãîðîäå';
|
|
}elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){
|
|
$uer = 'Âû íå ìîæåòå èñïîëüçîâàòü íà ñàìîãî ñåáÿ';
|
|
}elseif($uu2['admin']>0 && $u->info['admin']==0)
|
|
{
|
|
$uer = 'Âû íå ìîæåòå íàêëàäûâàòü çàêëÿòèå íà Àíãåëîâ';
|
|
}elseif($uu2['city']!=$u->info['city'] && $p['citym1']==0){
|
|
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â äðóãîì ãîðîäå';
|
|
}elseif($uu2['id']==$u->info['id'] && $u->info['admin']==0){
|
|
$uer = 'Âû íå ìîæåòå èñïîëüçîâàòü íà ñàìîãî ñåáÿ';
|
|
}else{
|
|
$uu['palpro'] = time()+60*60*24*7;
|
|
$upd = mysql_query('UPDATE `users` SET `marry` = "0" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
|
$upd = mysql_query('UPDATE `users` SET `marry` = "0" WHERE `id` = "'.$uu2['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$sx = '';
|
|
if($u->info['sex']==1)
|
|
{
|
|
$sx = 'à';
|
|
}
|
|
$rtxt = '[img[items/unmarry.gif]] '.$rang.' "'.$u->info['cast_login'].'" ðàñòîðãíóë'.$sx.' çàêîííîñòü áðàêà ìåæäó "'.$uu['login'].'" è "'.$uu2['login'].'".';
|
|
|
|
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.' "'.$u->info['login'].'" ðàñòîðãíóë'.$sx.' çàêîííîñòü áðàêà ñ '.$uu2['id'].'.';
|
|
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)");
|
|
$rtxt = $rang.' "'.$u->info['login'].'" ðàñòîðãíóë'.$sx.' çàêîííîñòü áðàêà ñ '.$uu['id'].'.';
|
|
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu2['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
|
|
|
$u->addItem(76,$uu['id'],'sudba='.$uu['login'].'|noremont=1|notransfer=1');
|
|
$u->addItem(76,$uu2['id'],'sudba='.$uu2['login'].'|noremont=1|notransfer=1');
|
|
|
|
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `item_id` = 76 AND (`uid` = "'.$uu['id'].'" OR `uid` = "'.$uu2['id'].'")');
|
|
|
|
$uer = 'Âû óñïåøíî ðàñòîðãëè áðàê "'.$uu['login'].'" è "'.$uu2['login'].'".';
|
|
}else{
|
|
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
|
|
}
|
|
}
|
|
}else{
|
|
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
|
|
}
|
|
}else{
|
|
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
|
|
}
|
|
?>
|