2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-06-06 21:30:34 +00:00
|
|
|
|
if(!defined('GAME'))
|
|
|
|
|
{
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
if($p['sm2']==1 || $p['citysm2']==1 || $p['citysm1']==1 || $p['sm1']==1)
|
|
|
|
|
{
|
|
|
|
|
$tm = (int)$_POST['time'];
|
|
|
|
|
if($tm!=1 && $tm!=2 && $tm!=3)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$uer = 'Неверно указаны данные';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}else{
|
|
|
|
|
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
|
|
|
|
if(isset($uu['id']))
|
|
|
|
|
{
|
|
|
|
|
$x = 0;
|
|
|
|
|
if($tm==1)
|
|
|
|
|
{
|
|
|
|
|
$tm = '`molch1` = "'.(time()-1).'"'; $x = 1;
|
|
|
|
|
}elseif($tm==2)
|
|
|
|
|
{
|
|
|
|
|
$tm = '`molch2` = "'.(time()-1).'"'; $x = 2;
|
|
|
|
|
}elseif($tm==3)
|
|
|
|
|
{
|
|
|
|
|
$tm = '`molch1` = "'.(time()-1).'",`molch2` = "'.(time()-1).'"'; $x = 3;
|
|
|
|
|
}
|
|
|
|
|
$upd = mysql_query('UPDATE `users` SET '.$tm.' WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
|
|
|
|
if($upd)
|
|
|
|
|
{
|
|
|
|
|
$sx = '';
|
|
|
|
|
if($u->info['sex']==1)
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$sx = 'а';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
if($x!=2 && $uu['molch1']>=time())
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$rtxt = '[img[items/pal_button3.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие молчания с "'.$uu['login'].'"';
|
2023-01-28 02:24:37 +00:00
|
|
|
|
|
|
|
|
|
$cmsg = new ChatMessage();
|
|
|
|
|
$cmsg->setCity($u->info['city']);
|
|
|
|
|
$cmsg->setRoom($u->info['room']);
|
|
|
|
|
$cmsg->setText($rtxt);
|
|
|
|
|
$cmsg->setType(6);
|
|
|
|
|
$cmsg->setTypeTime(1);
|
|
|
|
|
(new Chat())->sendMsg($cmsg);
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "<b>молчания</b>".';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
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)");
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$uer = 'Вы успешно сняли заклятие молчания с персонажа "'.$uu['login'].'".<br>';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
if($x!=1 && $uu['molch2']>=time())
|
|
|
|
|
{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$rtxt = '[img[items/fsleep_off.gif]] '.$rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие форумного молчания с "'.$uu['login'].'"';
|
2023-01-28 02:24:37 +00:00
|
|
|
|
|
|
|
|
|
$cmsg = new ChatMessage();
|
|
|
|
|
$cmsg->setCity($u->info['city']);
|
|
|
|
|
$cmsg->setRoom($u->info['room']);
|
|
|
|
|
$cmsg->setText($rtxt);
|
|
|
|
|
$cmsg->setType(6);
|
|
|
|
|
$cmsg->setTypeTime(1);
|
|
|
|
|
(new Chat())->sendMsg($cmsg);
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "<b>форумного молчания</b>".';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
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)");
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$uer .= 'Вы успешно сняли заклятие форумного молчания с персонажа "'.$uu['login'].'".';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
}else{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$uer = 'Не удалось использовать данное заклятие';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
}else{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$uer = 'Персонаж не найден в этом городе';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
2023-01-10 16:29:32 +00:00
|
|
|
|
$uer = 'У Вас нет прав на использование данного заклятия';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
?>
|