battles/magic/note.php

16 lines
795 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?
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="выкрикнула";}
addlog($user['battle'],'<span class=sysdate>'.date("H:i").'</span> '.nick::id($user['id'])->short().' '.$action.': '.$mess.'<BR>');
}
?>