Запустился чат.
This commit is contained in:
parent
656e3549eb
commit
d9bf4b0bdc
85
buttons.php
85
buttons.php
@ -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'> Приветствуем в игре, не забываем поздороваться и прочесть новости проекта! <a href='https://new-combats.com/n' target='_blank'>читать новости</a> </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'> Приветствуем в игре, не забываем поздороваться и прочесть новости проекта! <a href='https://new-combats.com/n' target='_blank'>читать новости</a> </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> Общие смайлики </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
|
||||
|
249
js/interface.js
249
js/interface.js
@ -14,10 +14,10 @@ $(document).ready(function () {
|
||||
function bodyLoaded() {
|
||||
top.recounter();
|
||||
//генерируем смайлики
|
||||
var i = 0,
|
||||
let i = 0,
|
||||
j = '';
|
||||
while (i != -1) {
|
||||
if (top.sml[i] != undefined) {
|
||||
while (i !== -1) {
|
||||
if (top.sml[i] !== undefined) {
|
||||
j += `<img style="cursor:pointer" onclick="chat.addSmile(\'${top.sml[i]}\')" src="https://${c['img']}/i/smile/${top.sml[i]}.gif" width="${top.sml[i + 1]}" height="${top.sml[i + 2]}" title=":${top.sml[i]}:"/> `;
|
||||
} else i = -4;
|
||||
i += 3;
|
||||
@ -29,54 +29,60 @@ function bodyLoaded() {
|
||||
function startEngine() {
|
||||
//стандартные настройки
|
||||
if ($.cookie('chatCfg0') === undefined) {
|
||||
$.cookie('chatCfg0',2,{expires:320});
|
||||
$.cookie('chatCfg1','Black',{expires:320});
|
||||
$.cookie('chatCfg0', 2, {expires: 320});
|
||||
$.cookie('chatCfg1', 'Black', {expires: 320});
|
||||
}
|
||||
$('#reline1').mousedown(function () {
|
||||
start_NRESize({
|
||||
generalArgs: { cssName: 'reline1', whatSee: 'height', whereTo: 'top' },
|
||||
nowArgs: { clientAxis: 'clientY', axisCount: 31 },
|
||||
stopArgs: { jCount: 35, cssNameExt: 'chat' },
|
||||
generalArgs: {cssName: 'reline1', whatSee: 'height', whereTo: 'top'},
|
||||
nowArgs: {clientAxis: 'clientY', axisCount: 31},
|
||||
stopArgs: {jCount: 35, cssNameExt: 'chat'},
|
||||
stopTrue: true
|
||||
})
|
||||
});
|
||||
$('#reline2').mousedown(function () {
|
||||
start_NRESize({
|
||||
generalArgs: { cssName: 'reline2', whatSee: 'width', whereTo: 'left' },
|
||||
nowArgs: { clientAxis: 'clientX', axisCount: 40 },
|
||||
stopArgs: { jCount: 18, cssNameExt: 'online' },
|
||||
generalArgs: {cssName: 'reline2', whatSee: 'width', whereTo: 'left'},
|
||||
nowArgs: {clientAxis: 'clientX', axisCount: 40},
|
||||
stopArgs: {jCount: 18, cssNameExt: 'online'},
|
||||
stopTrue: true
|
||||
})
|
||||
});
|
||||
|
||||
$(window).resize(function(){resizeFinish()});
|
||||
$(window).resize(function () {
|
||||
resizeFinish()
|
||||
});
|
||||
resizeFinish();
|
||||
//Добавляем действия
|
||||
var i = 0;
|
||||
while (i != -1) {
|
||||
if ($(`#chcf${i}`).attr('id') != undefined) {
|
||||
$(`#chcf${i}`).change(function(){saveChatConfig();if(this.id=='chcf10'){chat.reflesh()}});
|
||||
$(`#chcf${i}`).change(function () {
|
||||
saveChatConfig();
|
||||
if (this.id == 'chcf10') {
|
||||
chat.reflesh()
|
||||
}
|
||||
});
|
||||
if (i > 1) {
|
||||
if ($.cookie(`chatCfg${i}`) == 1) {
|
||||
$('#chcf'+i).attr('checked',true);
|
||||
$('#chcf' + i).attr('checked', true);
|
||||
if (i == 11) chat.globalMsg = 1;
|
||||
}
|
||||
else if ($.cookie(`chatCfg${i}`) == 0) {
|
||||
} else if ($.cookie(`chatCfg${i}`) == 0) {
|
||||
$(`#chcf${i}`).attr('checked', false);
|
||||
}
|
||||
}
|
||||
}else i = -2;
|
||||
} else i = -2;
|
||||
i++;
|
||||
}
|
||||
//загрузка сохраненных настроек
|
||||
if ($('#chcf0').val().length >= 1) {
|
||||
srcv = $.cookie('chatCfg0');
|
||||
$('#chcf0 option:selected').each(function(id){
|
||||
$('#chcf0 option:selected').each(function (id) {
|
||||
$(this).removeAttr('selected');
|
||||
});
|
||||
$('#chcf0 option').each(function(){
|
||||
$('#chcf0 option').each(function () {
|
||||
if ($(this).val().indexOf(srcv) > -1) {
|
||||
$(this).attr('selected','yes');
|
||||
$(this).attr('selected', 'yes');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -85,9 +91,9 @@ function startEngine() {
|
||||
$('#chcf8 option:selected').each(function (id) {
|
||||
$(this).removeAttr('selected');
|
||||
});
|
||||
$('#chcf8 option').each(function(){
|
||||
$('#chcf8 option').each(function () {
|
||||
if ($(this).val().indexOf(srcv) > -1) {
|
||||
$(this).attr('selected','yes');
|
||||
$(this).attr('selected', 'yes');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -121,7 +127,8 @@ function saveChatConfig() {
|
||||
|
||||
return saveChatConfig_work(chat, 0, 'none')
|
||||
}
|
||||
function saveChatConfig_work (chatObj, count, display) {
|
||||
|
||||
function saveChatConfig_work(chatObj, count, display) {
|
||||
$('#globalMode').css({'display': display});
|
||||
chatObj.globalMsg = count;
|
||||
chatObj.genchatData(null);
|
||||
@ -133,13 +140,13 @@ function unpx(v) {
|
||||
}
|
||||
|
||||
// GENERAL
|
||||
function start_NRESize (objArgs) {
|
||||
function start_NRESize(objArgs) {
|
||||
|
||||
var { generalArgs, nowArgs, stopArgs, stopTrue } = objArgs
|
||||
var {generalArgs, nowArgs, stopArgs, stopTrue} = objArgs
|
||||
|
||||
var { cssName, whatSee, whereTo } = generalArgs
|
||||
var { clientAxis, axisCount } = nowArgs
|
||||
var { jCount, cssNameExt } = stopArgs
|
||||
var {cssName, whatSee, whereTo} = generalArgs
|
||||
var {clientAxis, axisCount} = nowArgs
|
||||
var {jCount, cssNameExt} = stopArgs
|
||||
|
||||
$(cssName).css({'z-index': 1003}); // reline2 или 1
|
||||
$('#upbox').css({'display': 'block'});
|
||||
@ -172,12 +179,12 @@ function start_NRESize (objArgs) {
|
||||
}
|
||||
|
||||
// GENERAL 2
|
||||
function now_NRESize (objArgs) {
|
||||
function now_NRESize(objArgs) {
|
||||
|
||||
// 1: 'clientY', 31, 'heigth', '#reline1', 'top'
|
||||
// 2: 'clientX', 40, 'width', '#reline2', 'left'
|
||||
|
||||
var { element, clientAxis, axisCount, whatSee, cssName, whereTo } = objArgs
|
||||
var {element, clientAxis, axisCount, whatSee, cssName, whereTo} = objArgs
|
||||
|
||||
if (element[clientAxis] > axisCount && element[clientAxis] < $(window)[whatSee]() - 40) {
|
||||
$(`#${cssName}`).css({
|
||||
@ -187,15 +194,15 @@ function now_NRESize (objArgs) {
|
||||
}
|
||||
|
||||
// GENERAL 3
|
||||
function stop_NRESize (objArgs) {
|
||||
function stop_NRESize(objArgs) {
|
||||
|
||||
// 1: 35, 'chat', 'heigth', 'reline1', 'top'
|
||||
// 2: 18, 'online', 'width', 'reline2', 'left'
|
||||
|
||||
var { jCount, cssNameExt, whatSee, cssName, whereTo } = objArgs
|
||||
var {jCount, cssNameExt, whatSee, cssName, whereTo} = objArgs
|
||||
|
||||
j = jCount;
|
||||
if($.browser.msie==true) j += 2;
|
||||
if ($.browser.msie == true) j += 2;
|
||||
|
||||
$(`#${cssNameExt}`).css({
|
||||
[whatSee]: Math.round(($(window)[whatSee]() - unpx($(`#${cssName}`).css(whereTo)) - j) / $(window)[whatSee]() * 100) + '%'
|
||||
@ -204,12 +211,12 @@ function stop_NRESize (objArgs) {
|
||||
}
|
||||
|
||||
// GENERAL 4
|
||||
function stop2_NRESize (objArgs) {
|
||||
function stop2_NRESize(objArgs) {
|
||||
|
||||
// 1: true, 'resize1', 'reline1'
|
||||
// 2: false, 'resize2', 'resize2'
|
||||
|
||||
var { stopTrue, cssName } = objArgs
|
||||
var {stopTrue, cssName} = objArgs
|
||||
|
||||
$('#upbox').css({'display': 'none'});
|
||||
|
||||
@ -231,24 +238,35 @@ function stop2_NRESize (objArgs) {
|
||||
|
||||
|
||||
function resizeFinish() {
|
||||
j = 30; i = 3;
|
||||
j = 30;
|
||||
i = 3;
|
||||
if ($.browser.msie == true) {
|
||||
j += 1;
|
||||
i += 2;
|
||||
}
|
||||
|
||||
$('#main').css({'width':'20px','height':'20px'});
|
||||
$('#touchmain').css({'width':'20px','height':'20px'});
|
||||
$('#main').css({'width': '20px', 'height': '20px'});
|
||||
$('#touchmain').css({'width': '20px', 'height': '20px'});
|
||||
|
||||
$('#chat_list').css({'width':'20px','height':'20px'});
|
||||
$('#online_list').css({'width':'20px','height':'20px'});
|
||||
$('#chat_list').css({'width': '20px', 'height': '20px'});
|
||||
$('#online_list').css({'width': '20px', 'height': '20px'});
|
||||
|
||||
$('#chat_list').css({'width':($('#chat').width()-$('#online').width()-4),'height':$('#online').height()});
|
||||
$('#online_list').css({'width':$('#online').width()-5,'height':$('#online').height()});
|
||||
$('#main').css({'height':($(window).height()-j-$('#chat_block').height()-42),'width':($(window).width()-19)});
|
||||
$('#touchmain').css({'height':($(window).height()-j-$('#chat_block').height()-42),'width':($(window).width()-19)});
|
||||
$('#reline1').css({'top':($(window).height()-j-$('#chat').height()-6)+'px'});
|
||||
$('#reline2').css({'left':($(window).width()-i-$('#online').width()-9)+'px','height':($('#chat').height())+'px','top':($('#main_td').height()+j+2)+'px'});
|
||||
$('#chat_list').css({'width': ($('#chat').width() - $('#online').width() - 4), 'height': $('#online').height()});
|
||||
$('#online_list').css({'width': $('#online').width() - 5, 'height': $('#online').height()});
|
||||
$('#main').css({
|
||||
'height': ($(window).height() - j - $('#chat_block').height() - 42),
|
||||
'width': ($(window).width() - 19)
|
||||
});
|
||||
$('#touchmain').css({
|
||||
'height': ($(window).height() - j - $('#chat_block').height() - 42),
|
||||
'width': ($(window).width() - 19)
|
||||
});
|
||||
$('#reline1').css({'top': ($(window).height() - j - $('#chat').height() - 6) + 'px'});
|
||||
$('#reline2').css({
|
||||
'left': ($(window).width() - i - $('#online').width() - 9) + 'px',
|
||||
'height': ($('#chat').height()) + 'px',
|
||||
'top': ($('#main_td').height() + j + 2) + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
function showtable(id) {
|
||||
@ -257,15 +275,18 @@ function showtable(id) {
|
||||
document.getElementById(`menu${id}`).style.display = '';
|
||||
}
|
||||
|
||||
function hidemenu (time) {
|
||||
for (var i=1;i<=2;i++) {
|
||||
function hidemenu(time) {
|
||||
for (var i = 1; i <= 2; i++) {
|
||||
document.getElementById(`menu${i}`).style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function hidesel (id) {
|
||||
for (var i=1;i<=2;i++) {
|
||||
if (i!=id) {document.getElementById(`el${i}`).style.backgroundColor='';document.getElementById(`el${i}`).style.color='';}
|
||||
function hidesel(id) {
|
||||
for (var i = 1; i <= 2; i++) {
|
||||
if (i != id) {
|
||||
document.getElementById(`el${i}`).style.backgroundColor = '';
|
||||
document.getElementById(`el${i}`).style.color = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,6 +302,7 @@ function chconf() {
|
||||
}
|
||||
|
||||
var doTest;
|
||||
|
||||
function MBcMenu() {
|
||||
T_cm = setTimeout("if(doTest){ top.infoMenuClose(1); clearTimeout(T_cm);}", 100);
|
||||
}
|
||||
@ -321,8 +343,7 @@ function mousePageXY(e) {
|
||||
};
|
||||
}
|
||||
|
||||
function infoMenu(u,e,f)
|
||||
{
|
||||
function infoMenu(u, e, f) {
|
||||
if (!e) e = window.event;
|
||||
var d = top.document.getElementById('persmenu');
|
||||
var d2 = top.document.getElementById('upbox');
|
||||
@ -337,13 +358,13 @@ function infoMenu(u,e,f)
|
||||
d2.style.display = '';
|
||||
d.className = 'topusermenu';
|
||||
s.display = '';
|
||||
var obtop = mousePageXY(e)['y']+dptop;
|
||||
var obtop = mousePageXY(e)['y'] + dptop;
|
||||
if (getNameBrouser() == 'msie') {
|
||||
obtop -= dp.document.body.scrollTop;
|
||||
} else {
|
||||
obtop -= dp.document.documentElement.scrollTop + dp.document.body.scrollTop;
|
||||
}
|
||||
var obleft = mousePageXY(e)['x']+dpleft;
|
||||
var obleft = mousePageXY(e)['x'] + dpleft;
|
||||
d.style.top = `${obtop}px`;
|
||||
d.style.left = `${obleft}px`;
|
||||
var hmmmt = `<DIV onmouseover="top.doTest = false;" onmouseout="top.doTest = true; top.MBcMenu();">
|
||||
@ -352,9 +373,9 @@ function infoMenu(u,e,f)
|
||||
<div onClick="window.open(\'inf.php?login=${u}\'); infoMenuClose(4);" class="topusermenuBtn">INFO</div>
|
||||
<div onClick="top.infoMenuClose(4);" class="topusermenuBtn"><div id="d_clip_button">COPY</div></div>`;
|
||||
|
||||
if( top.iusrno[u] == undefined || top.iusrno[u] == 0 ) {
|
||||
if (top.iusrno[u] == undefined || top.iusrno[u] == 0) {
|
||||
hmmmt = `${hmmmt}<div onClick="top.ignoreUser(\'${u}\'); infoMenuClose(4);" class="topusermenuBtn">IGNORE</div>`;
|
||||
}else{
|
||||
} else {
|
||||
hmmmt = `${hmmmt}<div onClick="top.ignoreUser(\'${u}\'); infoMenuClose(4);" class="topusermenuBtn">- IGNORE</div>`;
|
||||
}
|
||||
hmmmt = `${hmmmt}</DIV>`;
|
||||
@ -364,8 +385,8 @@ function infoMenu(u,e,f)
|
||||
var bdy = document.body.clientHeight;
|
||||
var obx = d.clientWidth;
|
||||
var oby = d.clientHeight;
|
||||
var ots = bdy-obtop-oby;
|
||||
var ols = bdx-obleft-obx;
|
||||
var ots = bdy - obtop - oby;
|
||||
var ols = bdx - obleft - obx;
|
||||
if (ots < 10) {
|
||||
obtop = bdy - 10 - oby;
|
||||
d.style.top = `${obtop}px`;
|
||||
@ -376,21 +397,20 @@ function infoMenu(u,e,f)
|
||||
}
|
||||
$("#d_clip_button").zclip({
|
||||
path: "js/ZeroClipboard.swf",
|
||||
copy: function(){
|
||||
copy: function () {
|
||||
return u;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function infoMenuClose(id)
|
||||
{
|
||||
function infoMenuClose(id) {
|
||||
var d = top.document.getElementById('persmenu');
|
||||
var d2 = top.document.getElementById('upbox');
|
||||
if (d != undefined) {
|
||||
if (id > 0 && id < 5) {
|
||||
d.className = `topusermenu inviseMen${id}`;
|
||||
T_mn = setTimeout(`top.infoMenuClose(${(id+1)})`,30);
|
||||
T_mn = setTimeout(`top.infoMenuClose(${(id + 1)})`, 30);
|
||||
} else if (id == 5) {
|
||||
var s = d.style;
|
||||
s.display = 'none';
|
||||
@ -415,22 +435,22 @@ function infoMenuMy(u, e, f, dtm) {
|
||||
d2.style.display = '';
|
||||
d.className = 'topusermenu';
|
||||
s.display = '';
|
||||
var obtop = mousePageXY(e)['y']+dptop;
|
||||
var obtop = mousePageXY(e)['y'] + dptop;
|
||||
if (getNameBrouser() == 'msie') {
|
||||
obtop -= dp.document.body.scrollTop;
|
||||
} else {
|
||||
obtop -= dp.document.documentElement.scrollTop + dp.document.body.scrollTop;
|
||||
}
|
||||
var obleft = mousePageXY(e)['x']+dpleft;
|
||||
var obleft = mousePageXY(e)['x'] + dpleft;
|
||||
d.style.top = `${obtop}px`;
|
||||
d.style.left = `${obleft}px`;
|
||||
var hmmmt = '<DIV onmouseover="top.doTest = false;" onmouseout="top.doTest = true; top.MBcMenu();">';
|
||||
var i = 0;
|
||||
while( i != -1 ) {
|
||||
if(dtm[i] != undefined) {
|
||||
while (i != -1) {
|
||||
if (dtm[i] != undefined) {
|
||||
hmmmt += `<div onClick="${dtm[i][0]} infoMenuClose(4);" class="topusermenuBtn">${dtm[i][1]}</div>`;
|
||||
i++;
|
||||
}else i = -1;
|
||||
} else i = -1;
|
||||
}
|
||||
hmmmt = `${hmmmt}</DIV>`;
|
||||
d.innerHTML = hmmmt;
|
||||
@ -439,8 +459,8 @@ function infoMenuMy(u, e, f, dtm) {
|
||||
var bdy = document.body.clientHeight;
|
||||
var obx = d.clientWidth;
|
||||
var oby = d.clientHeight;
|
||||
var ots = bdy-obtop-oby;
|
||||
var ols = bdx-obleft-obx;
|
||||
var ots = bdy - obtop - oby;
|
||||
var ols = bdx - obleft - obx;
|
||||
if (ots < 10) {
|
||||
obtop = bdy - 10 - oby;
|
||||
d.style.top = `${obtop}px`;
|
||||
@ -451,7 +471,7 @@ function infoMenuMy(u, e, f, dtm) {
|
||||
}
|
||||
$("#d_clip_button").zclip({
|
||||
path: "js/ZeroClipboard.swf",
|
||||
copy: function(){
|
||||
copy: function () {
|
||||
return u;
|
||||
}
|
||||
});
|
||||
@ -460,49 +480,57 @@ function infoMenuMy(u, e, f, dtm) {
|
||||
|
||||
//Окна
|
||||
var win = {
|
||||
winc:{}, //координаты окон
|
||||
wsdr:null,
|
||||
scor:{}, //начальные координаты
|
||||
openw:function(id,title,text,date,type,style){
|
||||
winc: {}, //координаты окон
|
||||
wsdr: null,
|
||||
scor: {}, //начальные координаты
|
||||
openw: function (id, title, text, date, type, style) {
|
||||
if ($(`#win_${id}`).attr('id') == undefined) {
|
||||
//Создаем новое окно
|
||||
this.add(id, title, text, date, type, 1, '');
|
||||
}
|
||||
},
|
||||
WstartDrag:function(id){
|
||||
$('#wupbox').css({'display':'block','cursor':'move'});
|
||||
WstartDrag: function (id) {
|
||||
$('#wupbox').css({'display': 'block', 'cursor': 'move'});
|
||||
this.wsdr = id;
|
||||
$('.w1').css({'z-index':1102});
|
||||
$(`#win_${id}`).css({'z-index':1103});
|
||||
$('.w1').css({'z-index': 1102});
|
||||
$(`#win_${id}`).css({'z-index': 1103});
|
||||
delete cm;
|
||||
},
|
||||
WmoveDrag:function(e){
|
||||
WmoveDrag: function (e) {
|
||||
//Сохраняем начальные координаты
|
||||
var x = mousePageXY(e)['x'],y = mousePageXY(e)['y'];
|
||||
if(this.scor.x==undefined){
|
||||
var x = mousePageXY(e)['x'], y = mousePageXY(e)['y'];
|
||||
if (this.scor.x == undefined) {
|
||||
this.scor.x = x;
|
||||
this.scor.y = y;
|
||||
this.scor.x2 = unpx($(`#win_${this.wsdr}`).css('left'));
|
||||
this.scor.y2 = unpx($(`#win_${this.wsdr}`).css('top'));
|
||||
}
|
||||
x = x-this.scor.x;
|
||||
y = y-this.scor.y;
|
||||
x = x - this.scor.x;
|
||||
y = y - this.scor.y;
|
||||
x += this.scor.x2;
|
||||
y += this.scor.y2;
|
||||
if(x < 9){ x = 9; }
|
||||
if(x + $(`#win_${this.wsdr}`).width() > $(window).width() - 9 ){ x = $(window).width() - 9 - $(`#win_${this.wsdr}`).width(); }
|
||||
if(y<35){ y = 35; }
|
||||
if(y + $(`#win_${this.wsdr}`).height() > $(window).height() - 35 ){ y = $(window).height() - 35 - $(`#win_${this.wsdr}`).height(); }
|
||||
$(`#win_${this.wsdr}`).css({'top':`${y}px`,'left':`${x}px`});
|
||||
if (x < 9) {
|
||||
x = 9;
|
||||
}
|
||||
if (x + $(`#win_${this.wsdr}`).width() > $(window).width() - 9) {
|
||||
x = $(window).width() - 9 - $(`#win_${this.wsdr}`).width();
|
||||
}
|
||||
if (y < 35) {
|
||||
y = 35;
|
||||
}
|
||||
if (y + $(`#win_${this.wsdr}`).height() > $(window).height() - 35) {
|
||||
y = $(window).height() - 35 - $(`#win_${this.wsdr}`).height();
|
||||
}
|
||||
$(`#win_${this.wsdr}`).css({'top': `${y}px`, 'left': `${x}px`});
|
||||
},
|
||||
WstopDrag:function(){
|
||||
$('#wupbox').css({'display':'none','cursor':'move'});
|
||||
WstopDrag: function () {
|
||||
$('#wupbox').css({'display': 'none', 'cursor': 'move'});
|
||||
this.wsdr = null;
|
||||
this.scor = {};
|
||||
},
|
||||
add:function(id,title,text,date,type,style,css){
|
||||
add: function (id, title, text, date, type, style, css) {
|
||||
var nw = '';
|
||||
if($(`#win_${id}`).attr('id') == undefined){
|
||||
if ($(`#win_${id}`).attr('id') == undefined) {
|
||||
var acts = {};
|
||||
|
||||
if (date.usewin != undefined) {
|
||||
@ -518,46 +546,46 @@ var win = {
|
||||
}
|
||||
|
||||
//нижняя часть
|
||||
if(date.n != undefined){
|
||||
if (date.n != undefined) {
|
||||
text += `<div style="margin-left:11px;">${date.n}</div>`;
|
||||
}
|
||||
var kyps = ['',''];
|
||||
var kyps = ['', ''];
|
||||
//Вывод главных данных
|
||||
if (type == 0) {
|
||||
nw = text;
|
||||
} else if (type == 1) {
|
||||
//Просто вывод данных
|
||||
nw = text;
|
||||
}else if(type==2){
|
||||
} else if (type == 2) {
|
||||
//Да \ Нет
|
||||
nw = `<div>${text}</div><div style="padding:5px"><div style="float:left"><button onClick="${date.a1};win.closew(\'${id}\');${acts[9]}" class="btnnew wi${style}sbtn11" id="winyesbtnfox${id}" style="width:100px">Да</button></div><div style="float:right"><button class="btnnew wi${style}sbtn12" onClick="${date.a2};win.closew(\'${id}\')" style="width:100px">Нет</button></div><br></div>`;
|
||||
kyps[0] = `${date.a1};top.win.closew(\\\'${id}\\\');${acts[9]}top.win.addaction(0,\\\'\\\');`;
|
||||
}else if(type==3){
|
||||
} else if (type == 3) {
|
||||
//Да \ Нет , изображения
|
||||
var stylebtn = '';
|
||||
if( style > 1 ) {
|
||||
if (style > 1) {
|
||||
stylebtn = style;
|
||||
}
|
||||
nw = `<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>${text}</td><td width="40" align="center" valign="middle"><img class="prmimgyn" style="margin-top:5px;cursor:pointer" onClick="${date.a1};win.closew(\'${id}\');" src="https://${c.img}/i/b__ok${stylebtn}.gif" width="25" height="18"><br><img onClick="win.closew(\'${id}\')" class="prmimgyn" style="cursor:pointer;margin-top:2px;" src="https://${c.img}/i/b__cancel${stylebtn}.jpg" width="25" height="18"></td></tr></table>`;
|
||||
kyps[0] = `${date.a1};top.win.closew(\\\'${id}\\\');${acts[9]}top.win.addaction(0,\\\'\\\');`;
|
||||
}else if(type==4){
|
||||
} else if (type == 4) {
|
||||
//Тройной блок
|
||||
nw = text[0];
|
||||
}
|
||||
|
||||
//Если есть вторая информация
|
||||
if(date.d!=undefined){
|
||||
nw = nw+date.d;
|
||||
if (date.d != undefined) {
|
||||
nw = nw + date.d;
|
||||
}
|
||||
|
||||
nw = `<div style="margin:2px;${css}">${nw}</div>`;
|
||||
|
||||
//Заголовок окна
|
||||
if(title != ''){
|
||||
if( date.a3 == undefined ) {
|
||||
if (title != '') {
|
||||
if (date.a3 == undefined) {
|
||||
date.a3 = '';
|
||||
}
|
||||
if( acts[9] == undefined ) {
|
||||
if (acts[9] == undefined) {
|
||||
acts[9] = '';
|
||||
}
|
||||
nw = `<div class="wi${style}s10" onselectstart="return false">
|
||||
@ -592,24 +620,23 @@ var win = {
|
||||
//Вешаем окно
|
||||
nw = `<div class="w1" ${acts[0]} id="win_${id}">${nw}</div>`;
|
||||
|
||||
$('#windows').html($('#windows').html()+nw);
|
||||
$('#windows').html($('#windows').html() + nw);
|
||||
$(`#win_${id}`).center();
|
||||
if(type == 2 || type == 3) {
|
||||
if(type == 2) {
|
||||
if (type == 2 || type == 3) {
|
||||
if (type == 2) {
|
||||
$(`#winyesbtnfox${id}`).focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
delete nw;
|
||||
},
|
||||
addaction:function(nm,vl) {
|
||||
addaction: function (nm, vl) {
|
||||
top.key_actions[nm] = vl;
|
||||
if(nm != 2) {
|
||||
if (nm != 2) {
|
||||
top.key_actions[2] = 1;
|
||||
}
|
||||
},
|
||||
closew:function(id)
|
||||
{
|
||||
closew: function (id) {
|
||||
$(`#win_${id}`).html('');
|
||||
$(`#win_${id}`).remove();
|
||||
}
|
||||
|
182
online.php
182
online.php
@ -16,6 +16,8 @@ $u = User::start();
|
||||
$filter = new Filter();
|
||||
$chat = new Chat();
|
||||
|
||||
$code = PassGen::intCode();
|
||||
|
||||
if (
|
||||
!isset($u->info['id']) ||
|
||||
$u->info['banned'] > 0 ||
|
||||
@ -68,10 +70,8 @@ $r = [
|
||||
|
||||
|
||||
if ($u->info['battle'] > 0) {
|
||||
$btl = mysql_fetch_array(
|
||||
mysql_query('SELECT `id` FROM `battle` WHERE `id` = "' . $u->info['battle'] . '" AND `time_over` = 0 LIMIT 1')
|
||||
);
|
||||
if (!isset($btl['id'])) {
|
||||
$btl = Db::getValue('select count(*) from battle where id = ? and time_over = 0', [$u->info['battle']]);
|
||||
if (empty($btl)) {
|
||||
$r['js'] .= 'top.frames["main"].location="main.php";';
|
||||
}
|
||||
}
|
||||
@ -91,103 +91,60 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
if (strripos($x[$j], 'new-combats.com/info/')) {
|
||||
$ulogin = explode('/info/', $x[$j]);
|
||||
$ulogin = $ulogin[1];
|
||||
$ulogin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `login` FROM `users` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$ulogin
|
||||
) . '" OR `login` = "' . mysql_real_escape_string($ulogin) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ulogin['login'])) {
|
||||
$ulogin = htmlspecialchars($ulogin['login']);
|
||||
$uname = '<font color=#831db7><Информация о "' . $ulogin . '"></font>';
|
||||
$ulogin = Db::getValue('select login from users where id = ? or login = ?', [$ulogin, $ulogin]);
|
||||
if (!empty($ulogin)) {
|
||||
$uname = '<span style="color: #831db7; "><Информация о "' . $ulogin . '"></span>';
|
||||
}
|
||||
} elseif (strripos($x[$j], 'audio_1610649509.mp3')) { //ТУТ аудио
|
||||
$uname = '<font color=#FF851B><Голосовое сообщение></font>';
|
||||
$uname = '<span style="color: #FF851B; "><Голосовое сообщение></span>';
|
||||
} elseif (strripos($x[$j], 'new-combats.com/item/')) {
|
||||
$ulogin = explode('/item/', $x[$j]);
|
||||
$ulogin = $ulogin[1];
|
||||
$ulogin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `name` FROM `items_main` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$ulogin
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ulogin['name'])) {
|
||||
$ulogin = htmlspecialchars($ulogin['name']);
|
||||
$uname = '<font color=#5f9b00><Предмет "' . $ulogin . '"></font>';
|
||||
$ulogin = Db::getValue('select name from items_main where id = ?', [$ulogin]);
|
||||
if (isset($ulogin)) {
|
||||
$uname = '<span style="color: #5f9b00; "><Предмет "' . $ulogin . '"></span>';
|
||||
} else {
|
||||
$uname = '<font color=#5f9b00><Библиотека предметов></font>';
|
||||
$uname = '<span style="color: #5f9b00; "><Библиотека предметов></span>';
|
||||
}
|
||||
} elseif (strripos($x[$j], 'new-combats.com/news')) {
|
||||
$ulogin = explode('/news', $x[$j]);
|
||||
$ulogin = $ulogin[1];
|
||||
$ulogin = ltrim($ulogin, '/');
|
||||
$ulogin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `title` FROM `events_news` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$ulogin
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ulogin['title'])) {
|
||||
$ulogin = htmlspecialchars($ulogin['title']);
|
||||
$uname = '<font color=#b57300><Новость "' . $ulogin . '"></font>';
|
||||
$ulogin = Db::getValue('select title from events_news where id = ?', [$ulogin]);
|
||||
if (isset($ulogin)) {
|
||||
$uname = '<span style="color: #b57300; "><Новость "' . $ulogin . '"></span>';
|
||||
} else {
|
||||
$uname = '<font color=#b57300><Новостная лента></font>';
|
||||
$uname = '<span style="color: #b57300; "><Новостная лента></span>';
|
||||
}
|
||||
} elseif (strripos($x[$j], 'new-combats.com/lib')) {
|
||||
$ulogin = explode('/lib', $x[$j]);
|
||||
$ulogin = $ulogin[1];
|
||||
$ulogin = ltrim($ulogin, '/');
|
||||
$ulogin = rtrim($ulogin, '/');
|
||||
$ulogin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `title` FROM `library_content` WHERE `url_name` = "' . mysql_real_escape_string(
|
||||
$ulogin
|
||||
) . '" AND `moder` > 0 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ulogin['title'])) {
|
||||
$ulogin = htmlspecialchars($ulogin['title']);
|
||||
$uname = '<font color=#4c6e00><Библиотека "' . $ulogin . '"></font>';
|
||||
$ulogin = Db::getValue('select title from library_content where url_name = ? and moder > 0', [$ulogin]);
|
||||
if (isset($ulogin)) {
|
||||
$uname = '<span style="color: #4c6e00; "><Библиотека "' . $ulogin . '"></span>';
|
||||
} else {
|
||||
$uname = '<font color=#4c6e00><Библиотека></font>';
|
||||
$uname = '<span style="color: #4c6e00; "><Библиотека></span>';
|
||||
}
|
||||
} elseif (strripos($x[$j], 'new-combats.com/forum')) {
|
||||
$ulogin = explode('/forum?read=', $x[$j]);
|
||||
$ulogin = $ulogin[1];
|
||||
$ulogin = explode('&', $ulogin);
|
||||
$ulogin = $ulogin[0];
|
||||
//
|
||||
$ulogin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `title` FROM `forum_msg` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$ulogin
|
||||
) . '" AND `delete` = 0 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ulogin['title'])) {
|
||||
$ulogin = htmlspecialchars($ulogin['title']);
|
||||
$uname = '<font color=#0055b5><Форум "' . $ulogin . '"></font>';
|
||||
$ulogin = Db::getValue('select title from forum_msg where id = ? and `delete` = 0', [$ulogin]);
|
||||
if (isset($ulogin)) {
|
||||
$uname = '<span style="color: #0055b5; "><Форум "' . $ulogin . '"></span>';
|
||||
} else {
|
||||
$ulogin = explode('/forum?r=', $x[$j]);
|
||||
$ulogin = $ulogin[1];
|
||||
$ulogin = explode('&', $ulogin);
|
||||
$ulogin = $ulogin[0];
|
||||
//
|
||||
$ulogin = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `name` FROM `forum_menu` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$ulogin
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ulogin['name'])) {
|
||||
$uname = '<font color=#0055b5><Конференция форума "' . $ulogin['name'] . '"></font>';
|
||||
$ulogin = Db::getValue('select name from forum_menu where id = ?', [$ulogin]);
|
||||
if (isset($ulogin)) {
|
||||
$uname = '<span style="color: #0055b5; "><Конференция форума "' . $ulogin . '"></span>';
|
||||
} else {
|
||||
$uname = '<font color=#0055b5><Форум проекта></font>';
|
||||
$uname = '<span style="color: #0055b5; "><Форум проекта></span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,10 +153,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
"/(https:\\/\\/)?(new-combats+\\.com(([ \"'>\r\n\t])|(\\/([^ \"'>\r\n\t]*)?)))/",
|
||||
$x[$j],
|
||||
$ok
|
||||
) ? str_replace(
|
||||
$ok[2], "<small><a href=https://$ok[2] target=_blank ><i>" . $uname . "</i></a></small>",
|
||||
str_replace("https://", "", $x[$j])
|
||||
) . " " : $x[$j] . " ";
|
||||
) ? str_replace($ok[2], "<small><a href=https://$ok[2] target=_blank ><i>" . $uname . "</i></a></small>", str_replace("https://", "", $x[$j])) . " " : $x[$j] . " ";
|
||||
}
|
||||
return $newbuf;
|
||||
}
|
||||
@ -232,26 +186,15 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
|
||||
$_POST['msg'] = str_replace(' ', ' ', $_POST['msg']);
|
||||
|
||||
$smg = Db::getRow('select * from chat where login = ? and time > unix_timestamp() - 20 order by time desc limit 1', [$u->info['login']]);
|
||||
|
||||
$smg = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `chat` WHERE `login` = "' . $u->info['login'] . '" AND `time` > ' . (time(
|
||||
) - 20) . ' ORDER BY `time` DESC LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['exp'] < 499999999) {
|
||||
$lmg = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT COUNT(`id`) FROM `chat` WHERE `login` = "' . $u->info['login'] . '" AND `time` > ' . (time(
|
||||
) - 5) . ' LIMIT 2'
|
||||
)
|
||||
);
|
||||
$lmg = Db::getValue('select count(id) from chat where login = ? and time = unix_timestamp() - 5 limit 2', [$u->info['login']]);
|
||||
} else {
|
||||
$lmg[0] = 0;
|
||||
$lmg = 0;
|
||||
}
|
||||
$testsmg = ' ' . $_POST['msg'] . ' ';
|
||||
if ($testsmg == $smg['text'] && $u->info['exp'] > 100000) {
|
||||
|
||||
if ($u->info['molch1'] < time()) {
|
||||
|
||||
//Молчанка за флуд на 5 минут
|
||||
@ -259,11 +202,10 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
$r['js'] .= 'chat.sendMsg(["new","' . time(
|
||||
) . '","6","","' . $u->info['login'] . '","<small>Вы наказаны за спам на 20 минут </small>","Black","1","1","0"]);';
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `molch1` = "' . $u->info['molch1'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '" . $u->info['login'] . "' LIMIT 1000");
|
||||
$_POST['msg'] = 'Я спамер ' . $u->info['login'] . ' и меня нужно заблокировать https://new-combats.com/info/' . $u->info['id'] . '';
|
||||
Db::sql('update users set molch1 = ? where id = ?', [$u->info['molch1'], $u->info['id']]);
|
||||
Db::sql('update chat set `delete` = 1 where login = ?', [$u->info['login']]);
|
||||
|
||||
$_POST['msg'] = 'Я спамер ' . $u->info['login'] . ' и меня нужно заблокировать https://new-combats.com/info/' . $u->info['id'];
|
||||
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`nosee`,`invis`,`da`,`delete`,`molch`,`new`,`login`,`to`,`city`,`room`,`time`,`type`,`spam`,`text`,`toChat`,`color`,`typeTime`,`sound`,`global`) VALUES (
|
||||
@ -314,7 +256,7 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
);
|
||||
|
||||
}
|
||||
} elseif ($lmg[0] > 0) {
|
||||
} elseif ($lmg > 0) {
|
||||
$r['js'] .= 'chat.sendMsg(["new","' . time(
|
||||
) . '","6","","' . $u->info['login'] . '","<small>Вы не можете отправлять так часто сообщения... </small>","Black","1","1","0"]);';
|
||||
if ($u->info['molch1'] < time()) {
|
||||
@ -627,20 +569,56 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') {
|
||||
|
||||
//Получаем список онлайн
|
||||
if ($_GET['r1'] != 0) {
|
||||
$sp = mysql_query(
|
||||
'SELECT `u`.`pass`,`u`.`sex`,`s`.`dnow`,`u`.`timeMain`,`s`.`bot`,`s`.`atack`,`u`.`afk`,`u`.`dnd`,`u`.`banned`,`u`.`molch1`,`u`.`room`,`u`.`id`,`u`.`city`,`u`.`cityreg`,`u`.`online`,`u`.`align`,`u`.`clan`,`u`.`login`,`u`.`level`,`u`.`inTurnir`,`u`.`battle`,`u`.`invis`,`u`.`inUser`,`s`.`x`,`s`.`y` FROM `users` AS `u` LEFT JOIN `stats` AS `s` ON `s`.`id` = `u`.`id` WHERE ((`u`.`room` = "' . $u->info['room'] . '" AND "' . mysql_real_escape_string(
|
||||
(int)$_GET['r3']
|
||||
) . '" != "1") OR ("' . mysql_real_escape_string(
|
||||
(int)$_GET['r3']
|
||||
) . '" = "1" AND `pass` NOT LIKE "%saint%")) AND `mail`!="No E-mail" AND `room` != "303" ORDER BY `u`.`inUser` DESC,`u`.`online` DESC,`u`.`login` DESC LIMIT 1000'
|
||||
);
|
||||
// $_GET['r3'] передаётся из onlineList.js как переключатель "все пользователи\пользователи в комнате".
|
||||
define('BOT_ROOM', 303);
|
||||
$ar_id = 0;
|
||||
$ar_lvl = 0;
|
||||
$ar_all = '0';
|
||||
$usl = [];
|
||||
$cw = [];
|
||||
$usid = [];
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$onlineListQuery = 'select
|
||||
users.id, pass, sex, dnow, timeMain, bot, atack, afk, dnd, banned, molch1,
|
||||
room, city, cityreg, online, align, clan, login, level, inTurnir, battle, invis, inUser, x, y
|
||||
from users left join stats on users.id = stats.id
|
||||
where
|
||||
(
|
||||
(room = ? and ' . (int)$_GET['r3'] . ' != 1) or
|
||||
(' . (int)$_GET['r3'] . ' = 1 and pass not like ?)
|
||||
) and
|
||||
mail != ? and
|
||||
room != ?
|
||||
order by inUser desc, online desc, login desc';
|
||||
$sp = Db::getRows($onlineListQuery, [$u->info['room'], '%saint%', '', BOT_ROOM]);
|
||||
foreach ($sp as $pl) {
|
||||
|
||||
// }
|
||||
//
|
||||
// $sp = mysql_query(
|
||||
// 'SELECT
|
||||
// `u`.`pass`,
|
||||
// `u`.`sex`,
|
||||
// `s`.`dnow`,
|
||||
// `u`.`timeMain`,
|
||||
// `s`.`bot`,`s`.`atack`,`u`.`afk`,`u`.`dnd`,`u`.`banned`,`u`.`molch1`,`u`.`room`,`u`.`id`,`u`.`city`,`u`.`cityreg`,`u`.`online`,`u`.`align`,
|
||||
// `u`.`clan`,`u`.`login`,`u`.`level`,`u`.`inTurnir`,`u`.`battle`,`u`.`invis`,`u`.`inUser`,`s`.`x`,`s`.`y`
|
||||
//FROM
|
||||
//`users` AS `u`
|
||||
// LEFT JOIN `stats` AS `s` ON `s`.`id` = `u`.`id`
|
||||
//WHERE (
|
||||
// (`u`.`room` = "' . $u->info['room'] . '" AND "' . mysql_real_escape_string((int)$_GET['r3']) . '" != "1") OR
|
||||
// ("' . mysql_real_escape_string((int)$_GET['r3']) . '" = "1" AND `pass` NOT LIKE "%saint%")) AND
|
||||
// `mail`!="No E-mail" AND
|
||||
// `room` != "303"
|
||||
// ORDER BY `u`.`inUser` DESC,`u`.`online` DESC,`u`.`login` DESC LIMIT 1000'
|
||||
// );
|
||||
// $ar_id = 0;
|
||||
// $ar_lvl = 0;
|
||||
// $ar_all = '0';
|
||||
// $usl = [];
|
||||
// $cw = [];
|
||||
// $usid = [];
|
||||
// while ($pl = mysql_fetch_array($sp)) {
|
||||
$ysee = 1;
|
||||
if ($pl['inUser'] > 0) {
|
||||
if ($pl['inTurnir'] == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user