2018-01-28 16:40:49 +00:00
|
|
|
|
<?
|
|
|
|
|
if ($_SESSION['uid'] == null) header("Location: index.php");
|
|
|
|
|
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
|
|
|
|
if ($user['battle']==0) {
|
|
|
|
|
echo'Нельзя использовать вне боя';
|
|
|
|
|
}
|
|
|
|
|
$_POST['target']=htmlspecialchars($_POST['target'], NULL, "");
|
|
|
|
|
if(preg_match("/__/",$_POST['target']) || preg_match("/--/",$_POST['target']))
|
|
|
|
|
{
|
|
|
|
|
echo"В тексте не должно присутствовать подряд более 1 символа '_' или '-'.";
|
|
|
|
|
}else{
|
|
|
|
|
$mess = $_POST['target'];
|
|
|
|
|
if ($user['sex'] == 1) {$action="выкрикнул";} else {$action="выкрикнула";}
|
2018-11-05 20:15:13 +00:00
|
|
|
|
addlog($user['battle'],'<span class=sysdate>'.date("H:i").'</span> '.nick::id($user['id'])->short().' '.$action.': '.$mess.'<BR>');
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
|
|
|
|
?>
|