Запустился чат.

This commit is contained in:
2023-02-13 19:24:48 +02:00
parent 656e3549eb
commit d9bf4b0bdc
3 changed files with 655 additions and 651 deletions
+42 -43
View File
@@ -40,8 +40,9 @@ if (isset($_GET['showcode'])) {
if ($u->info['joinIP'] == 1 && $u->info['ip'] != IP) {
er('#Пожалуйста авторизируйтесь с главной страницы');
} elseif (isset($_GET['exit'])) {
setcookie('login', '', time() - 60 * 60 * 24 * 30, '', Config::get('host'));
setcookie('login', '', time() - 60 * 60 * 24 * 30);
setcookie('login', '', 0, '', Config::get('host'));
setcookie('login', '', 0);
setcookie('auth', '', 0);
Db::sql('update users set online = unix_timestamp() - 420 where id = ?', [$u->info['id']]);
die(Config::get('exit'));
} elseif (!isset($u->info['id'])) {
@@ -63,13 +64,13 @@ $u->stats = $u->getStats($u->info['id'], 0);
<meta name="description" content="<?= Config::get('desc') ?>"/>
<meta name="keywords" content="<?= Config::get('keys') ?>"/>
<meta name="msapplication-config" content="browserconfig.xml"/>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="i/main.css">
<link rel="stylesheet" href="css/clu0b.css"/>
<link rel="stylesheet" href="css/windows.css"/>
<link rel="stylesheet" href="css/hack.css"/>
<script>
let des = 1;
let c = {
const des = 1;
const c = {
noEr: 0,
noErTmr: 0,
url: '<?= Config::get('host') ?>',
@@ -93,14 +94,14 @@ $u->stats = $u->getStats($u->info['id'], 0);
enterUse = 0;
function ctest(city) {
if (city !== c['city']) {
if (city != c['city']) {
top.location = '/bk';
}
}
function testKey(event) {
if (event.keyCode === 10 || event.keyCode === 13) {
if (top.enterUse === 0) {
if (event.keyCode == 10 || event.keyCode == 13) {
if (top.enterUse == 0) {
chat.subSend();
top.enterUse = 1;
setTimeout('top.enterUse = 0', 1000);
@@ -153,9 +154,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
$deviceType = $_COOKIE['d1c'];
}
if ($deviceType == 'tablet' || $deviceType == 'phone') {
echo '<script type="text/javascript" src="js/jquery.nicescroll.js"></script>';
?>
if ($deviceType == 'tablet' || $deviceType == 'phone'): ?>
<style>
#touchmain {
padding: 0;
@@ -164,17 +163,15 @@ $u->stats = $u->getStats($u->info['id'], 0);
margin: 0;
}
</style>
<script type="text/javascript" src="js/jquery.nicescroll.js"></script>
<script>
$(document).ready(function () {
$("#touchmain").niceScroll("#main", {autohidemode: false, boxzoom: false});
});
</script>
<?php
}
?>
<?php endif; ?>
<link href="./js/trainingModals/registration/trainingModalStyles.css" rel="stylesheet" type="text/css"/>
<link href="./js/trainingModals/registration/trainingModalStyles.css" rel="stylesheet" >
<style>
/* Additional classes examples */
@@ -556,19 +553,18 @@ $u->stats = $u->getStats($u->info['id'], 0);
right: 18px;
}
</style>
<script>
function chatHello() {
chat.sendMsg(["new", "<?=time()?>", "1", "", "<?=$u->info['login']?>", "global:<b style='background-color:#ffcccc'>&nbsp; Приветствуем в игре, не забываем поздороваться и прочесть новости проекта! <a href='https://new-combats.com/n' target='_blank'>читать новости</a> &nbsp;</b>", "red", "1", "1", "0"]);
}
</script>
</head>
<body onLoad="bodyLoaded();chatHello();">
<body>
<div style="display:none" class="qel0" id="qel0"></div>
<noscript>В вашем браузере отсутствует поддержка <strong>javascript<strong></noscript>
<script>
if (window.top !== window.self) {
window.onLoad(){
bodyLoaded();
chat.sendMsg(["new", "<?=time()?>", "1", "", "<?=$u->info['login']?>", "global:<b style='background-color:#ffcccc'>&nbsp; Приветствуем в игре, не забываем поздороваться и прочесть новости проекта! <a href='https://new-combats.com/n' target='_blank'>читать новости</a> &nbsp;</b>", "red", "1", "1", "0"]);
}
if (window.top != window.self) {
document.write = "";
window.top.location = window.self.location;
setTimeout(function () {
@@ -595,7 +591,6 @@ $u->stats = $u->getStats($u->info['id'], 0);
?>
<script>
function startRegistration() {
//if( goodread >= 9 ) {
$.post('reg.php', {
'ajax_reg': true,
'reg_login': $('#reg_login').val(),
@@ -615,7 +610,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
cc('#regblock');
</script>
<?php
} elseif ($u->info['active'] != '' && $u->info['mail'] == 'No E-mail') {
} elseif (!empty($u->info['active']) && $u->info['mail'] == 'No E-mail') {
if (!empty($error)) {
echo '<script>alert("' . $error . '");</script>';
}
@@ -625,7 +620,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
}
?>
<script>
let lasts = [-1, -1];
var lasts = [-1, -1];
function myexpLineTop27(e1, e2) {
$('#exp23mkrtkm').attr('title', "Опыт персонажа" + "\n" + e1 + " / " + e2);
@@ -636,7 +631,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
if (lasts[1] < e2) {
$('#myexplin233').css('width', '1%');
}
if (lasts[0] !== e1 || lasts[1] !== e2) {
if (lasts[0] != e1 || lasts[1] != e2) {
$('#myexplin233').animate({'width': Math.ceil(e1 / e2 * 100) + '%'}, 3000);
}
}
@@ -647,7 +642,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
let smlk1 = 0;
function smiles1load() {
if (smlk1 === 0) {
if (smlk1 == 0) {
$('#btnsmlrz').html('<small>&nbsp; Общие смайлики &nbsp;</small>');
smlk1 = 1;
$('#smilesDiv').hide();
@@ -771,17 +766,17 @@ $u->stats = $u->getStats($u->info['id'], 0);
<td style="font-size:10px; text-align: center; vertical-align: top; background-image: url('https://img.new-combats.com/i/lite/top_lite_low_15.gif')">
<span style="display:none; text-align:center;" id="menu1">
<a href="/main.php?referals" target="main" class="menutop" style="color:green">Реферал</a> |
<a href="https://new-combats.com/forum/" target="_blank" class="menutop">Форум</a> |
<a href="https://new-combats.com/encicl/law.html" target="_blank" class="menutop" style="color: red">Законы</a> |
<a href="https://new-combats.com/rating_pers" target="_blank" class="menutop">Рейтинг</a> |
<a href="https://new-combats.com/rating_clans" target="_blank" class="menutop">Кланы</a> |
<a href="main.php?security" target="main" class="menutop" style="color:green">Безопасность</a> |
<a href="https://new-combats.com/news_script/lib/pisheri.html" target="_blank" class="menutop" style="color: darkgreen">Всё о пещерах</a>
<a href="/forum/" target="_blank" class="menutop">Форум</a> |
<a href="/encicl/law.html" target="_blank" class="menutop" style="color: red">Законы</a> |
<a href="/rating_pers" target="_blank" class="menutop">Рейтинг</a> |
<a href="/rating_clans" target="_blank" class="menutop">Кланы</a> |
<a href="/main.php?security" target="main" class="menutop" style="color:green">Безопасность</a> |
<a href="/news_script/lib/pisheri.html" target="_blank" class="menutop" style="color: darkgreen">Всё о пещерах</a>
</span>
<span style="display:; text-align:center;" id="menu2">
<a href="/main.php?inv=1&rn=<?= $code ?>" target="main" class="menutop">Инвентарь</a> |
<span style="display:; text-align:center;" id="menu2">
<a href="main.php?titul" target="main" class="menutop" style="color:green"> Достижения</a> |
<a href="/main.php?titul" target="main" class="menutop" style="color:green"> Достижения</a> |
<a href="/main.php?skills=1&side=5" target="main" class="menutop">Умения</a> |
<a href="/main.php?zayvka=1" target="main" class="menutop">Поединки</a> |
<a href="/forum/?read=10957&rnd=1" target="_blank" class="menutop" style="color:red">Всем игрокам</a> |
@@ -855,7 +850,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
<div id="smilesDiv">Загрузка смайликов</div>
<div id="smilesDiv2" style="display:none">
<?php
echo '<center><small>Новые смайлики возможно купить в <a href="/ekr.php" target="_blank">Коммерческом Отделе</a><br>Обновите страницу, если купленный смайлик не отобразился</small></center><hr>';
echo '<small>Новые смайлики возможно купить в <a href="/ekr.php" target="_blank">Коммерческом Отделе</a><br>Обновите страницу, если купленный смайлик не отобразился</small><hr>';
//
if (empty($u->info['add_smiles'])) { ?>
<div style="text-align: center; color: grey;">У вас нет личных смайликов</div>
@@ -891,6 +886,7 @@ $u->stats = $u->getStats($u->info['id'], 0);
</div>
</td>
<td style="border-left:2px solid #CCCCCC;border-top:1px solid #808080; background-color: #faf2f2; vertical-align: top; width: 350px;" id="online">
<div id="online_list" style="cursor:default;">
<div style="margin-top:5px; text-align: center;">
<button class="btn" id="robtn" onClick="chat.reflesh()">Обновить</button>
@@ -900,16 +896,20 @@ $u->stats = $u->getStats($u->info['id'], 0);
<img src="https://img.new-combats.com/i/fighttype0.gif" width="20" height="20" alt="fight type">
</button>
</div>
<span class="db" style="padding:0 0 8px 0;font-size: 10pt; color:#8f0000;">
<b id="roomName"></b></span>
<span class="db" style="padding:0 0 8px 0;font-size: 10pt; color:#8f0000;"><b id="roomName"></b></span>
<div id="onlist"></div>
<div style="padding:5px;margin-top:5px;">
<div><label><input type="checkbox" value="1" checked id="autoRefOnline">Обновлять
автомат.</label></div>
<div><label><input name="chcf10" type="checkbox" id="chcf10" checked value="0">Показать
всех игроков</label></div>
<div>
<input type="checkbox" value="1" checked id="autoRefOnline">
<label for="autoRefOnline">Обновлять автомат.</label>
</div>
<div>
<input name="chcf10" type="checkbox" id="chcf10" checked value="0">
<label for="chcf10">Показать всех игроков</label>
</div>
</div>
</div>
</td>
</tr>
</table>
@@ -1238,4 +1238,3 @@ $u->stats = $u->getStats($u->info['id'], 0);
</body>
</html>
<?php