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 `login` = "'.mysql_real_escape_string($_POST['logingo2']).'" LIMIT 1'));
|
|
if(isset($uu['id']) && isset($uu2['id']))
|
|
{
|
|
|
|
if($uu['sex'] == $uu2['sex']) {
|
|
$uer = 'Íåâîçìîæíî çàêëþ÷èòü îäíîïîëûé áðàê, òîëüêî ÷åðåç Àäìèíèñòðàöèþ è òîëüêî çà äåíüãè ;)';
|
|
}elseif($uu['marry']>0)
|
|
{
|
|
$uer = 'Ïåðñîíàæ óæå íàõîäèòñÿ â áðàêå<br>';
|
|
}elseif($uu['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` = "'.$uu2['id'].'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
|
$upd = mysql_query('UPDATE `users` SET `marry` = "'.$uu['id'].'" WHERE `id` = "'.$uu2['id'].'" LIMIT 1');
|
|
if($upd)
|
|
{
|
|
$sx = '';
|
|
if($u->info['sex']==1)
|
|
{
|
|
$sx = 'à';
|
|
}
|
|
$rtxt = '[img[items/marry.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');
|
|
|
|
$uer = 'Âû óñïåøíî çàôèêñèðîâàëè áðàê "'.$uu['login'].'" è "'.$uu2['login'].'".';
|
|
}else{
|
|
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
|
|
}
|
|
}
|
|
}else{
|
|
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
|
|
}
|
|
}else{
|
|
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
|
|
}
|
|
?>
|