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

64 lines
2.6 KiB
PHP

<?
if(!defined('GAME'))
{
die();
}
if($p['zatoch']==1 || $p['citym1']==1)
{
$tm = (int)$_POST['time'];
if($tm!=1 && $tm!=3 && $tm!=7 && $tm!=14 && $tm!=30 && $tm!=60 && $tm!=365 && $tm!=24 && $tm!=6)
{
$uer = 'Íåâåðíî óêàçàíî âðåìÿ íàêàçàíèÿ';
}else{
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
if(isset($uu['id']))
{
$uuss = mysql_fetch_array(mysql_query('SELECT * FROM `stats` WHERE `id` = "'.mysql_real_escape_string($uu['id']).'" LIMIT 1'));
if($tm==6){
//÷àñèê - ýêñêóðñèÿ
$time=time()+60*60;
}elseif($tm==24){
$time=time()+(60*60*24*30*90);
}else{
$time=time()+(60*60*24*$tm);
}
if($uu['admin']>0 && $u->info['admin']==0)
{
$uer = 'Âû íå ìîæåòå ïîñàäèòü Àíãåëà.';
}
if($uu['city']!=$u->info['city'] && $p['citym1']==0){
$uer = 'Ïåðñîíàæ íàõîäèòñÿ â äðóãîì ãîðîäå';
}elseif($uuss['dnow'] > 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 `jail` = "'.mysql_real_escape_string($time).'", `room`="274", `city`="capitalcity" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
if($upd)
{
$sx = '';
if($u->info['sex']==1)
{
$sx = 'à';
}
mysql_query('UPDATE `items_users` SET `delete` = "1357908642" WHERE `uid` = '.$uu['id'].' AND `delete` = 0');
$rtxt = '[img[items/jail.gif]] '.$rang.' &quot;'.$u->info['cast_login'].'&quot; îòïðàâèë'.$sx.' â çàòî÷åíèå &quot;'.$uu['login'].'&quot;, ñðîêîì '.$srokt[$tm].'';
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; ñðîêîì '.$srokt[$tm].'.';
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']."',6)");
$uer = 'Âû óñïåøíî ïîñàäèëè â òþðüìó ïåðñîíàæà "'.$uu['login'].'", ñðîêîì '.$srok[$tm].'.';
}else{
$uer = 'Íå óäàëîñü èñïîëüçîâàòü äàííîå çàêëÿòèå';
}
}
}else{
$uer = 'Ïåðñîíàæ íå íàéäåí â ýòîì ãîðîäå';
}
}
}else{
$uer = 'Ó Âàñ íåò ïðàâ íà èñïîëüçîâàíèå äàííîãî çàêëÿòèÿ';
}
?>