Utf8 convert
This commit is contained in:
+28
-28
@@ -49,9 +49,9 @@ if (isset($_POST['see_msg'])) {
|
||||
)
|
||||
);
|
||||
if (!isset($msg['id'])) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Ñîîáùåíèå íå íàéäåíî.</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Сообщение не найдено.</center>';
|
||||
} elseif ($msg['uid'] == $u->info['id'] && ($msg['delete'] == 2 || $msg['delete'] == 3)) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Ñîîáùåíèå áûëî óäàëåíî.</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Сообщение было удалено.</center>';
|
||||
} else {
|
||||
$to = mysql_fetch_array(
|
||||
mysql_query('SELECT `id`,`login`,`banned` FROM `users` WHERE `id` = "' . $msg['uid'] . '" LIMIT 1')
|
||||
@@ -63,23 +63,23 @@ if (isset($_POST['see_msg'])) {
|
||||
mysql_query('UPDATE `telegram` SET `read` = `read` + 2 WHERE `id` = "' . $msg['id'] . '" LIMIT 1');
|
||||
}
|
||||
$html = '<div style="padding:10px;">';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96"><b>Îò</b>: ' . $from['login'] . '<a style="float:right" onclick="top.tgf_closeMsg()" href="javascript:void(0)">Çàêðûòü</a></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96"><b>Êîìó</b>: ' . $to['login'] . '<span style="float:right">' . date(
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96"><b>От</b>: ' . $from['login'] . '<a style="float:right" onclick="top.tgf_closeMsg()" href="javascript:void(0)">Закрыть</a></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96"><b>Кому</b>: ' . $to['login'] . '<span style="float:right">' . date(
|
||||
'd.m.Y H:i', $msg['time']
|
||||
) . '</span></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96"><b>Òåìà</b>: ' . $msg['tema'] . '</div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;"><b>Ñîîáùåíèå</b>:<br><div style="width:496;margin-left:1px;overflow:auto;height:185px;">' . $msg['text'] . '</div>';
|
||||
$html .= '<button style="float:right" onclick="top.tgf_rz(3,1,' . $msg['id'] . ');">Îòâåòèòü</button>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96"><b>Тема</b>: ' . $msg['tema'] . '</div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;"><b>Сообщение</b>:<br><div style="width:496;margin-left:1px;overflow:auto;height:185px;">' . $msg['text'] . '</div>';
|
||||
$html .= '<button style="float:right" onclick="top.tgf_rz(3,1,' . $msg['id'] . ');">Ответить</button>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
} elseif ($r == 3) {
|
||||
if ($u->info['noreal'] == 1) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Îòïðàâëÿòü ñîîáùåíèÿ ïî òåëåãðàôó âîçìîæíî òîëüêî ñ îñíîâíîãî ïåðñîíàæà</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Отправлять сообщения по телеграфу возможно только с основного персонажа</center>';
|
||||
} elseif ($u->info['level'] < 4) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Îòïðàâëÿòü ñîîáùåíèÿ ïî òåëåãðàôó âîçìîæíî ñ 4-ãî óðîâíÿ.</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Отправлять сообщения по телеграфу возможно с 4-го уровня.</center>';
|
||||
} elseif ($u->info['molch1'] > time()) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Ïåðñîíàæè ñ ìîë÷àíêîé íå ìîãóò ïîëüçîâàòüñÿ òåëåãðàôîì.</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Персонажи с молчанкой не могут пользоваться телеграфом.</center>';
|
||||
} else {
|
||||
if (isset($_POST['to'])) {
|
||||
$_POST['to'] = go_text(iconv('UTF-8', 'windows-1251', $_POST['to']));
|
||||
@@ -87,11 +87,11 @@ if (isset($_POST['see_msg'])) {
|
||||
$_POST['tema'] = go_text(iconv('UTF-8', 'windows-1251', $_POST['tema']));
|
||||
|
||||
if (test_line($_POST['to']) == false) {
|
||||
$error = 'Ïóñòîå ïîëå "Êîìó".';
|
||||
$error = 'Пустое поле "Кому".';
|
||||
} elseif (test_line($_POST['text']) == false) {
|
||||
$error = 'Ïóñòîå ïîëå "Ñîîáùåíèå".';
|
||||
$error = 'Пустое поле "Сообщение".';
|
||||
} elseif (test_line($_POST['tema']) == false) {
|
||||
$error = 'Ïóñòîå ïîëå "Òåìà".';
|
||||
$error = 'Пустое поле "Тема".';
|
||||
} else {
|
||||
$to = mysql_fetch_array(
|
||||
mysql_query(
|
||||
@@ -101,11 +101,11 @@ if (isset($_POST['see_msg'])) {
|
||||
)
|
||||
);
|
||||
if (!isset($to['id'])) {
|
||||
$error = 'Ïîëó÷àòåëü íå íàéäåí â áàçå.';
|
||||
$error = 'Получатель не найден в базе.';
|
||||
} elseif ($to['banned'] > 0) {
|
||||
$error = 'Ïîëó÷àòåëü áûë çàáëîêèðîâàí.';
|
||||
$error = 'Получатель был заблокирован.';
|
||||
} elseif ($to['id'] == $u->info['id']) {
|
||||
$error = 'Íåëüçÿ îòïðàâëÿòü ñàìîìó ñåáå.';
|
||||
$error = 'Нельзя отправлять самому себе.';
|
||||
} else {
|
||||
$_POST['text'] = str_replace("\n", '<br>', $_POST['text']);
|
||||
$_POST['text'] = str_replace("\r", '<br>', $_POST['text']);
|
||||
@@ -116,7 +116,7 @@ if (isset($_POST['see_msg'])) {
|
||||
) . '","' . mysql_real_escape_string($u->info['ip']) . '")'
|
||||
);
|
||||
unset($_POST['to'], $_POST['text'], $_POST['tema']);
|
||||
$error = 'Ñîîáùåíèå äîñòàâëåíî "' . $to['login'] . '".';
|
||||
$error = 'Сообщение доставлено "' . $to['login'] . '".';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,11 +146,11 @@ if (isset($_POST['see_msg'])) {
|
||||
}
|
||||
}
|
||||
$html = '<div style="padding:10px;">';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Îò: <b>' . $u->info['login'] . '</b></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Êîìó: <input value="' . $_POST['to'] . '" id="tgf_to" type="text" style="width:170px"></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Òåìà: <input value="' . $_POST['tema'] . '" id="tgf_tema" type="text" style="width:269px"></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Ñîîáùåíèå:<br><textarea rows="9" style="width:100%;resize:none;outline:none;" id="tgf_text">' . $_POST['text'] . '</textarea></div>';
|
||||
$html .= '<div style="margin-bottom:3px;color:red;float:left;" align="left"><small><b id="trf_snd_error">' . $error . '</b></small></div><div style="margin-bottom:3px;" align="right"><button onClick="top.tgf_send()">Îòïðàâèòü ñîîáùåíèå</button></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">От: <b>' . $u->info['login'] . '</b></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Кому: <input value="' . $_POST['to'] . '" id="tgf_to" type="text" style="width:170px"></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Тема: <input value="' . $_POST['tema'] . '" id="tgf_tema" type="text" style="width:269px"></div>';
|
||||
$html .= '<div style="margin-bottom:3px;padding-bottom:3px;border-bottom:1px solid #b7ae96">Сообщение:<br><textarea rows="9" style="width:100%;resize:none;outline:none;" id="tgf_text">' . $_POST['text'] . '</textarea></div>';
|
||||
$html .= '<div style="margin-bottom:3px;color:red;float:left;" align="left"><small><b id="trf_snd_error">' . $error . '</b></small></div><div style="margin-bottom:3px;" align="right"><button onClick="top.tgf_send()">Отправить сообщение</button></div>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
} elseif ($r == 1 || $r == 2) {
|
||||
@@ -221,8 +221,8 @@ if (isset($_POST['see_msg'])) {
|
||||
$html .= '
|
||||
<div id="tgfm' . $pl['id'] . '" onclick="top.tgf_openMsg(' . $pl['id'] . ')" class="tgf_msg' . $pl['read'] . '">
|
||||
<small class="tgf_msgt" title="' . date('H:i', $pl['time']) . '">' . date('d.m.y', $pl['time']) . '</small>
|
||||
<small>Îò: ' . $from . '</small>
|
||||
<small>Òåìà: <a href="javascript:void(0)">' . $pl['tema'] . '</a></small>
|
||||
<small>От: ' . $from . '</small>
|
||||
<small>Тема: <a href="javascript:void(0)">' . $pl['tema'] . '</a></small>
|
||||
<img src="https://img.new-combats.com/i/clear.gif" height="13" style="float:right;vertical-align:bottom;cursor:pointer;" onclick="top.del_tgf(' . $r . ',' . $pg . ',' . $pl['id'] . ');">
|
||||
</div>';
|
||||
}
|
||||
@@ -230,8 +230,8 @@ if (isset($_POST['see_msg'])) {
|
||||
$html .= '
|
||||
<div id="tgfm' . $pl['id'] . '" onclick="top.tgf_openMsg(' . $pl['id'] . ')" class="tgf_msg' . $pl['read'] . '">
|
||||
<small class="tgf_msgt" title="' . date('H:i', $pl['time']) . '">' . date('d.m.y', $pl['time']) . '</small>
|
||||
<small>Êîìó: ' . $from . '</small>
|
||||
<small>Òåìà: <a href="javascript:void(0)">' . $pl['tema'] . '</a></small>
|
||||
<small>Кому: ' . $from . '</small>
|
||||
<small>Тема: <a href="javascript:void(0)">' . $pl['tema'] . '</a></small>
|
||||
<img src="https://img.new-combats.com/i/clear.gif" height="13" style="float:right;vertical-align:bottom;cursor:pointer;" onclick="top.del_tgf(' . $r . ',' . $pg . ',' . $pl['id'] . ');">
|
||||
</div>';
|
||||
}
|
||||
@@ -281,9 +281,9 @@ if ($js != '') {
|
||||
}
|
||||
if ($html == '') {
|
||||
if ($r == 1) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Ó Âàñ íåò ñîîáùåíèé îò äðóãèõ ïîëüçîâàòåëåé</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>У Вас нет сообщений от других пользователей</center>';
|
||||
} elseif ($r == 2) {
|
||||
$html = '<br><br><br><br><br><br><br><br><center>Ó Âàñ íåò ñîîáùåíèé îòïðàâëåííûõ äðóãèì ïîëüçîâàòåëÿì</center>';
|
||||
$html = '<br><br><br><br><br><br><br><br><center>У Вас нет сообщений отправленных другим пользователям</center>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user