Remove cp1251. Я сильно недооценивал трудолюбие неизвестного кодера.
This commit is contained in:
+7
-13
@@ -2,7 +2,7 @@
|
||||
|
||||
use Core\Db;
|
||||
|
||||
//header('Content-Type: text/html; charset=windows-1251');
|
||||
//
|
||||
const GAME = true;
|
||||
require_once '_incl_data/__config.php';
|
||||
require_once '_incl_data/class/__db_connect.php';
|
||||
@@ -81,7 +81,6 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
$msg = [];
|
||||
$_POST['msg'] = str_replace('\x3C', '<', $_POST['msg']);
|
||||
$_POST['msg'] = str_replace('\x3', '>', $_POST['msg']);
|
||||
$_POST['msg'] = iconv('UTF-8', 'windows-1251', $_POST['msg']);
|
||||
|
||||
function tolink($buf)
|
||||
{
|
||||
@@ -221,7 +220,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
$_POST['msg'] = str_replace(" ", '[s3;]TAB[s4;]', $_POST['msg']);
|
||||
$_POST['msg'] = str_replace("", '[s3;]TAB[s4;]', $_POST['msg']);
|
||||
|
||||
$_POST['msg'] = htmlspecialchars($_POST['msg'], null, 'cp1251');
|
||||
$_POST['msg'] = htmlspecialchars($_POST['msg'], null);
|
||||
$_POST['msg'] = str_replace('%usersmile%', '', $_POST['msg']);
|
||||
$_POST['msg'] = tolink($_POST['msg']);
|
||||
|
||||
@@ -1126,8 +1125,8 @@ if ($r['key'] == $_GET['key']) {
|
||||
//Спи�ок онлайн о�тает�� неизменным
|
||||
unset($r['rn'], $r['list'], $r['key'], $r['xu']);
|
||||
} elseif ($_GET['r1'] != 0) {
|
||||
$r['rn'] = iconv('cp1251', 'utf-8', $u->room['name']);
|
||||
$r['list'] = iconv('cp1251', 'utf-8', $r['list']);
|
||||
$r['rn'] = $u->room['name'];
|
||||
$r['list'] = $r['list'];
|
||||
}
|
||||
|
||||
$posts = mysql_fetch_array(
|
||||
@@ -1172,16 +1171,11 @@ if (isset($trf['id'])) {
|
||||
}
|
||||
}
|
||||
|
||||
//Перекодируем �троки
|
||||
if ($r['js'] != null) {
|
||||
$r['js'] = iconv('cp1251', 'utf-8', $r['js']);
|
||||
} else {
|
||||
if ($r['js'] == null) {
|
||||
unset($r['js']);
|
||||
}
|
||||
if ($r['msg'] != null) {
|
||||
$r['msg'] = iconv('cp1251', 'utf-8', $r['msg']);
|
||||
} else {
|
||||
if ($r['msg'] == null) {
|
||||
unset($r['msg']);
|
||||
}
|
||||
unset($c, $u, $db);
|
||||
unset($c, $u, $db, $r['js'], $r['msg']);
|
||||
echo json_encode($r);
|
||||
Reference in New Issue
Block a user