В общем что бы не изобретать так сказать велосипед скачал boomchat но у него нету русского, так вот в инфе о профиле русский норм записывается, но в чат идут знаки вопроса.
Что подскажите смотреть?
require_once("config_min.php");
$user_ip = $mysqli->real_escape_string($_SERVER['REMOTE_ADDR']);
if (isset($_POST['content']) && isset($_POST['bold'])
&& isset($_POST['italic']) && isset($_POST['underline'])
&& isset($_POST['color']) && isset($_POST['high']) && $user['user_access'] > 3){
if ($_POST['content'] != null){
$bold = $mysqli->real_escape_string(trim($_POST['bold']));
$italic = $mysqli->real_escape_string(trim($_POST['italic']));
$underline = $mysqli->real_escape_string(trim($_POST['underline']));
$chigh = $mysqli->real_escape_string(trim($_POST['high']));
$ccolor = $mysqli->real_escape_string(trim($_POST['color']));
$content = $mysqli->real_escape_string(trim($_POST['content']));
$content = htmlspecialchars($content);
$content = "$content ";
// clear bad word from content
$words = $mysqli->query("SELECT * FROM `filter`");
if ($words->num_rows > 0){
while($filter = $words->fetch_assoc()){
$content = str_replace($filter['word'], '****',$content);
}
}
$name = $user['user_name'];
$room = $user['user_roomid'];
$user_id = $user["user_id"];
$post_time = date("H:i", $time);
$command = explode(' ',trim($content));
$count = count($command);
$color = $user["user_color"];
$avatar = $user['user_tumb'];
// check for the /away command that will set the user away till he/her type in chat
if(substr($command[0], 0, 1) === '/')
{
if ($command[0] == $cmdaway){
$mysqli->query("UPDATE `users` SET `user_action` = '2', `user_status` = '2' WHERE `user_id` = '$user_id'");
echo 15;
die();
}
// Here the check for a command of kick before pasting a message to the chat
elseif($command[0] == $cmdkick && $user['user_rank'] > 2){
if($count != 1){
$findtarget = $mysqli->query("SELECT `user_rank`, `user_access` FROM `users` WHERE `user_name` = '{$command[1]}'");
if ($findtarget->num_rows > 0){
$target = $findtarget->fetch_array(MYSQLI_BOTH);
$target_rank = $target['user_rank'];
if ($user['user_rank'] > $target_rank){
$kickmessage = explode($command[1],trim($content));
$displaykick = $msgkickreason;
if($count > 2){
$displaykick = $kickmessage[1];
}
if($target['user_access'] == 4){
$kickreason = $displaykick;
$kicknotice = $command[1] . " $msgkick " . $name . " ( $kickreason )";
$mysqli->query("UPDATE `users` SET `user_access` = 2, `user_kick` = '$displaykick', `user_status` = '3' WHERE `user_name` = '{$command[1]}'");
$mysqli->query("INSERT INTO `chat` (post_date, post_time, user_id, post_user, post_message, post_roomid, post_color, type, avatar) VALUES ('$time', '$post_time', '$user_id', '$lang_system', '$kicknotice', $room, 'csystem', 'system', 'default_system_tumb.png')");
}
else {
echo 12;
}
}
else{
echo 3;
}
}
else {
echo 2;
}
}
else{
echo 1;
}
}
post_message это и есть сообщение в чат