Уборка Unreachable statement. Замена === на == и !== на != в яваскриптах из-за ошибок с нестрогой типизацией при переходе на 7.4.

This commit is contained in:
2023-04-08 18:14:19 +03:00
parent 3f3ffc2114
commit cfaf82f73a
76 changed files with 2079 additions and 1918 deletions

View File

@@ -156,7 +156,7 @@ if (isset($_GET['loc'])) {
$go['file'],
$training_manager->getRegistered(
)[$training_manager->getCurrentStepName()]->allowedToMove()
)) {
) || $u->info['admin'] > 0) {
$tr_pl = mysql_fetch_array(
mysql_query(

View File

@@ -16,16 +16,6 @@ if (floor($u->info['align']) == 1) {
$rang = '<i>Неизвестное существо</i>';
}
/*
if($u->info['admin'] == 0) {
if(
($u->info['city'] == 'capitalcity' && $rang == 'Тарман') ||
($u->info['city'] == 'newcapitalcity' && $rang == 'Паладин')
) {
die('<center><br>Запрещено пользоваться модераторскими функциями на вражеской территории.</center>');
}
}
*/
if (isset($_GET['exitMod'])) {
unset($_SESSION['palpsw']);

View File

@@ -214,9 +214,9 @@ echo '<script>var server_fight = "";</script>';
return null;
}
if (delimiter === ''
|| delimiter === false
|| delimiter === null) {
if (delimiter == ''
|| delimiter == false
|| delimiter == null) {
return false;
}
@@ -227,7 +227,7 @@ echo '<script>var server_fight = "";</script>';
return emptyArray;
}
if (delimiter === true) {
if (delimiter == true) {
delimiter = '1';
}

View File

@@ -183,9 +183,9 @@ function explode( delimiter, string ) {
return null;
}
if ( delimiter === ''
|| delimiter === false
|| delimiter === null )
if ( delimiter == ''
|| delimiter == false
|| delimiter == null )
{
return false;
}
@@ -198,7 +198,7 @@ function explode( delimiter, string ) {
return emptyArray;
}
if ( delimiter === true ) {
if ( delimiter == true ) {
delimiter = '1';
}

View File

@@ -217,9 +217,9 @@ echo '<script>var server_fight = "";</script>';
return null;
}
if (delimiter === ''
|| delimiter === false
|| delimiter === null) {
if (delimiter == ''
|| delimiter == false
|| delimiter == null) {
return false;
}
@@ -230,7 +230,7 @@ echo '<script>var server_fight = "";</script>';
return emptyArray;
}
if (delimiter === true) {
if (delimiter == true) {
delimiter = '1';
}

View File

@@ -1,212 +1,305 @@
<?php
if(!defined('GAME'))
{
die();
if (!defined('GAME')) {
die();
}
if($u->room['file']=='cp1') {
if ($u->room['file'] != 'cp1') {
return;
}
if (date("H") >= 8 && date("H") <= 23) {
$now = 'day';
$tattack = '<a style="color:#D8D8D8; cursor:pointer" onclick="top.useMagic(\'Нападение на персонажа\',\'night_atack\',\'pal_button8.gif\',1,\'main.php?nightatack=1\');">Напасть на игрока</a> &nbsp; ';
} else {
$now = 'night';
$tattack = '';
}
if(date("H")>=8 && date("H")<=23) {
$now = 'day';
$tattack = '<a style="color:#D8D8D8" style="cursor:pointer" onclick="top.useMagic(\'Нападение на персонажа\',\'night_atack\',\'pal_button8.gif\',1,\'main.php?nightatack=1\');">Напасть на игрока</a> &nbsp; ';
}else{
$now = 'night';
$tattack = '';
}
?>
<script>
<?php
if(date("H")<23 || date("H")>=6)
{
?>
function AtackNoWindow()
{
var dt = document.getElementById('atackDiv');
if(dt.style.display=='none')
{
dt.style.display = '';
}else{
dt.style.display = 'none';
}
}
<?php
}
?>
<?php
if (date("H") < 23 || date("H") >= 6) {
?>
function AtackNoWindow() {
var dt = document.getElementById('atackDiv');
if (dt.style.display == 'none') {
dt.style.display = '';
} else {
dt.style.display = 'none';
}
}
<?php
}
?>
</script>
<?php
function timeOut($ttm) {
$out = '';
$time_still = $ttm;
$tmp = floor($time_still/2592000);
$id=0;
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." мес. ";}
$time_still = $time_still-$tmp*2592000;
}
/*
$tmp = floor($time_still/604800);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." нед. ";}
$time_still = $time_still-$tmp*604800;
}
*/
$tmp = floor($time_still/86400);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." дн. ";}
$time_still = $time_still-$tmp*86400;
}
$tmp = floor($time_still/3600);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." ч. ";}
$time_still = $time_still-$tmp*3600;
}
$tmp = floor($time_still/60);
if ($tmp > 0)
{
$id++;
if ($id<3) {$out .= $tmp." мин. ";}
}
if($out=='')
{
if($time_still<0)
{
$time_still = 0;
}
$out = $time_still.' сек.';
}
return $out;
}?>
<?php
function timeOut($ttm): string
{
$out = '';
$time_still = $ttm;
$tmp = floor($time_still / 2592000);
$id = 0;
if ($tmp > 0) {
$id++;
if ($id < 3) {
$out .= $tmp . " мес. ";
}
$time_still = $time_still - $tmp * 2592000;
}
$tmp = floor($time_still / 86400);
if ($tmp > 0) {
$id++;
if ($id < 3) {
$out .= $tmp . " дн. ";
}
$time_still = $time_still - $tmp * 86400;
}
$tmp = floor($time_still / 3600);
if ($tmp > 0) {
$id++;
if ($id < 3) {
$out .= $tmp . " ч. ";
}
$time_still = $time_still - $tmp * 3600;
}
$tmp = floor($time_still / 60);
if ($tmp > 0) {
$id++;
if ($id < 3) {
$out .= $tmp . " мин. ";
}
}
if ($out == '') {
if ($time_still < 0) {
$time_still = 0;
}
$out = $time_still . ' сек.';
}
return $out;
} ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="250" valign="top">
<?php $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><?php require_once('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;">
<tr>
<td width="250" valign="top">
<?php $usee = $u->getInfoPers($u->info['id'], 0);
if ($usee) {
echo $usee[0];
} else {
echo 'information is lost.';
} ?>
</td>
<td width="230" valign="top" style="padding-top:19px;"><?php require_once('modules_data/stats_loc.php'); ?></td>
<td width="230" valign="top" style="padding-top:19px;">
<span style="font-size:12px;">
</span>
</td>
<td valign="top"><div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td>
<?php if($re!=''){ echo '<font color="red"><b>'.$re.'</b></font>'; } ?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="position:relative; cursor: pointer;" id="ione">
<img src="//img.new-combats.tech/city/capitalcity/<?= $now; ?>/city_capres1.jpg" alt="" name="img_ione" width="580" height="312" border="1" id="img_ione"/>
<div id="buttons_on_image" style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
<?= $tattack; ?>
&nbsp;
<span onclick="window.open('/forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Форум проекта</span> &nbsp;
</div>
<script language="javascript" type="text/javascript">
<!--
if(document.getElementById('ione'))
{
document.getElementById('ione').appendChild(document.getElementById('buttons_on_image'));
document.getElementById('buttons_on_image').style.position = 'absolute';
document.getElementById('buttons_on_image').style.bottom = '8px';
document.getElementById('buttons_on_image').style.right = '23px';
}else{
document.getElementById('buttons_on_image').style.display = 'none';
}
-->
</script>
<div style="position:absolute; left:150px; top:40px; width:236px; height:157px; z-index:90;"><img <?php thisInfRm('1.180.0.3'); ?> src="//img.new-combats.tech/i/images/300x225/capital/2klub.gif" width="236" height="157" class="aFilter" /></div>
<div style="position: absolute; left: 459px; top: 155px; width: 79px; height: 88px; z-index: 91;"><img <?php thisInfRm('1.180.0.371'); ?> src="//img.new-combats.tech/city/capitalcity/day/loto.gif" class="aFilter" width="86" height="63" /></div>
<div style="position: absolute; left: 125px; top: 165px; width: 73px; height: 47px; z-index: 91;"><img <?php thisInfRm('1.180.0.10'); ?> src="//img.new-combats.tech/i/images/300x225/capital/2shop.gif" width="73" height="47" class="aFilter" /></div>
<div style="position: absolute; left: 270px; top: 158px; width: 71px; height: 45px; z-index: 91;"><img <?php thisInfRm('1.180.0.210'); ?> src="//img.new-combats.tech/i/images/300x225/capital/2remont.gif" width="71" height="45" class="aFilter" /></div>
<?php
$btc = mysql_fetch_array(mysql_query('SELECT * FROM `stats` WHERE `id` = "89489" LIMIT 1'));
if( isset($btc['id']) ) {
if (timeOut($btc['res_x']-time()) =='0 сек.'){
?>
<div style="position:absolute; left:300px; top:168px; width:27px; height:55px; z-index:99;"><img onclick="location.href='main.php?atak_user=89489'" src="//img.new-combats.tech/i/images/300x225/capital/jora1.png" width="120" height="135" title="Напасть на Слабого Трупожора" /></div>
<?}}?>
<?php
$btc = mysql_fetch_array(mysql_query('SELECT * FROM `stats` WHERE `id` = "903093" LIMIT 1'));
if( isset($btc['id']) ) {
if (timeOut($btc['res_x']-time()) =='0 сек.'){
?>
<div style="position:absolute; left:100px; top:175px; width:27px; height:55px; z-index:99;"><img onclick="location.href='main.php?atak_user=903093'" src="//img.new-combats.tech/i/images/300x225/capital/jora2.png" width="120" height="150" title="Напасть на Сильного Трупожора" /></div>
<?}}?>
<?php if( date('d.m') == '31.10' || (date('m') == 11 && date('d') < 7) ) { /* Хэллоуин */ ?>
<div style="position: absolute; left: 219px; top: 171px; width: 32px; height: 43px; z-index: 91;"><img onclick="location.href='main.php?talk=5'" title="Диалог с Тыквоголовым" src="//img.new-combats.tech/loca/cp11/sun_pmd.gif" width="32" height="43" class="aFilter" /></div>
<?php }
if(date('m') == 12 || date('m') == 1 ){/*Ёлка*/ ?>
<div style="position: absolute; left: 212px; top: 133px; width: 32px; height: 43px; z-index: 91;"><img <?php thisInfRm('1.180.0.208'); ?> src="//img.new-combats.tech/newyear2014.png" width="60" height="90" title="" class="aFilter" /></div>
<?php } ?>
<div style="position:absolute; left:360px; top:142px; width:111px; height:72px; z-index:92;"><img <?php thisInfRm('1.180.0.226'); ?> src="//img.new-combats.tech/city/capitalcity/day/2pochta.gif" width="111" height="72" class="aFilter" /></div>
<div style="position:absolute; left:33px; top:180px; width:92px; height:62px; z-index:92;"><img <?php thisInfRm('1.180.0.14'); ?> onclick="alert('Не работает. Находится на реконструкции.')" onMouseOver="this.className='aFilterhover';" onMouseOut="this.className='aFilter';" src="//img.new-combats.tech/city/capitalcity/day/2vokzal.gif" width="92" height="62" class="aFilter" /></div>
<div style="position:absolute; left:535px; top:225px; width:30px; height:54px; z-index:94;"><img <?php thisInfRm('1.180.0.11'); ?> src="//img.new-combats.tech/i/images/300x225/capital/2strelka.gif" width="30" height="54" class="aFilter" /></div>
<div style="position:absolute; left:14px; top:225px; width:30px; height:54px; z-index:910;"><img src="//img.new-combats.tech/i/images/300x225/capital/3strelka.gif" width="30" height="53" <?php thisInfRm('1.180.0.323'); ?> class="aFilter" /></div>
<div id="snow"></div>
<?= $goline; ?>
</div>
</td>
</tr>
</table>
<?php
if(date("H")<6 || date("H")>=22)
{
?>
<div align="center" id="atackDiv" style="display:none;">
<form method="post" action="main.php">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div style="width:300px; padding:3px; margin:7px; background-color:#CCCCCC; border:1px solid #575757;"> Введите логин жертвы:<br />
<input name="atack" type="text" id="atack" size="35" maxlength="30" />
<input type="submit" name="button" id="button" class="btn" value="OK" />
</div></td>
</tr>
</table>
</form>
</div>
<?php
}
?>
<!-- -->
<div style="width:580px; text-align:left; background-color:#D3D3D3;">
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" class="menutop" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.3&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.3',1); ?>">Бойцовский Клуб</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.323&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.323',1); ?>">Парковая Улица</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.10&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.10',1); ?>">Магазин</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.210&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.210',1); ?>">Ремонтная Мастерская</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11',1); ?>">Страшилкина Улица</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.14&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.14',1); ?>">Вокзал</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img src="//img.new-combats.tech/i/move/links.gif" width="9" height="7" />&nbsp;<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.226&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.226',1); ?>">Почта</a></span>
</div>
<!-- -->
<div style="display:none; height:0px " id="moveto"></div>
</td>
<td></td>
</tr>
</table>
<small>
<HR>
<strong>Внимание!Смените пароль на уникальный,который не использовался ранее в подобных проектах,это обезопасит вашего персонажа от взлома.<BR>
<em>Администрация.</strong> </em></small> <BR>
<?= $rowonmax; ?><BR>
</div></td>
</tr>
</table>
<?php
}
</td>
<td valign="top">
<div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td>
<?php if (!empty($re)) {
echo '<b style="color: red;">' . $re . '</b>';
} ?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="position:relative; cursor: pointer;" id="ione">
<img
src="//img.new-combats.tech/city/capitalcity/<?= $now; ?>/city_capres1.jpg"
alt="" name="img_ione" width="580" height="312" border="1"
id="img_ione"/>
<div id="buttons_on_image"
style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
<?= $tattack; ?>
&nbsp;
<span
onclick="window.open('/forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Форум проекта</span>
&nbsp;
</div>
<script language="javascript" type="text/javascript">
<!--
if (document.getElementById('ione')) {
document.getElementById('ione').appendChild(document.getElementById('buttons_on_image'));
document.getElementById('buttons_on_image').style.position = 'absolute';
document.getElementById('buttons_on_image').style.bottom = '8px';
document.getElementById('buttons_on_image').style.right = '23px';
} else {
document.getElementById('buttons_on_image').style.display = 'none';
}
-->
</script>
<div
style="position:absolute; left:150px; top:40px; width:236px; height:157px; z-index:90;">
<img <?php thisInfRm('1.180.0.3'); ?>
src="//img.new-combats.tech/i/images/300x225/capital/2klub.gif"
width="236" height="157" class="aFilter"/></div>
<div
style="position: absolute; left: 459px; top: 155px; width: 79px; height: 88px; z-index: 91;">
<img <?php thisInfRm('1.180.0.371'); ?>
src="//img.new-combats.tech/city/capitalcity/day/loto.gif"
class="aFilter" width="86" height="63"/></div>
<div
style="position: absolute; left: 125px; top: 165px; width: 73px; height: 47px; z-index: 91;">
<img <?php thisInfRm('1.180.0.10'); ?>
src="//img.new-combats.tech/i/images/300x225/capital/2shop.gif"
width="73" height="47" class="aFilter"/></div>
<div
style="position: absolute; left: 270px; top: 158px; width: 71px; height: 45px; z-index: 91;">
<img <?php thisInfRm('1.180.0.210'); ?>
src="//img.new-combats.tech/i/images/300x225/capital/2remont.gif"
width="71" height="45" class="aFilter"/></div>
?>
<?php
$btc = mysql_fetch_array(
mysql_query('SELECT * FROM `stats` WHERE `id` = 89489 LIMIT 1')
);
if (isset($btc['id'])) {
if (timeOut($btc['res_x'] - time()) == '0 сек.') {
?>
<div
style="position:absolute; left:300px; top:168px; width:27px; height:55px; z-index:99;">
<img onclick="location.href='main.php?atak_user=89489'"
src="//img.new-combats.tech/i/images/300x225/capital/jora1.png"
width="120" height="135"
title="Напасть на Слабого Трупожора"/></div>
<?php }
} ?>
<?php
$btc = mysql_fetch_array(
mysql_query('SELECT * FROM `stats` WHERE `id` = 903093 LIMIT 1')
);
if (isset($btc['id'])) {
if (timeOut($btc['res_x'] - time()) == '0 сек.') {
?>
<div
style="position:absolute; left:100px; top:175px; width:27px; height:55px; z-index:99;">
<img onclick="location.href='main.php?atak_user=903093'"
src="//img.new-combats.tech/i/images/300x225/capital/jora2.png"
width="120" height="150"
title="Напасть на Сильного Трупожора"/></div>
<?php }
} ?>
<?php if (date('d.m') == '31.10' || (date('m') == 11 && date(
'd'
) < 7)) { /* Хэллоуин */ ?>
<div
style="position: absolute; left: 219px; top: 171px; width: 32px; height: 43px; z-index: 91;">
<img onclick="location.href='main.php?talk=5'"
title="Диалог с Тыквоголовым"
src="//img.new-combats.tech/loca/cp11/sun_pmd.gif" width="32"
height="43" class="aFilter"/></div>
<?php }
if (date('m') == 12 || date('m') == 1) {/*Ёлка*/ ?>
<div
style="position: absolute; left: 212px; top: 133px; width: 32px; height: 43px; z-index: 91;">
<img <?php thisInfRm('1.180.0.208'); ?>
src="//img.new-combats.tech/newyear2014.png" width="60"
height="90" title="" class="aFilter"/></div>
<?php } ?>
<div
style="position:absolute; left:360px; top:142px; width:111px; height:72px; z-index:92;">
<img <?php thisInfRm('1.180.0.226'); ?>
src="//img.new-combats.tech/city/capitalcity/day/2pochta.gif"
width="111" height="72" class="aFilter"/></div>
<div
style="position:absolute; left:33px; top:180px; width:92px; height:62px; z-index:92;">
<img <?php thisInfRm('1.180.0.14'); ?>
onclick="alert('Не работает. Находится на реконструкции.')"
onMouseOver="this.className='aFilterhover';"
onMouseOut="this.className='aFilter';"
src="//img.new-combats.tech/city/capitalcity/day/2vokzal.gif"
width="92" height="62" class="aFilter"/></div>
<div
style="position:absolute; left:535px; top:225px; width:30px; height:54px; z-index:94;">
<img <?php thisInfRm('1.180.0.11'); ?>
src="//img.new-combats.tech/i/images/300x225/capital/2strelka.gif"
width="30" height="54" class="aFilter"/></div>
<div
style="position:absolute; left:14px; top:225px; width:30px; height:54px; z-index:910;">
<img src="//img.new-combats.tech/i/images/300x225/capital/3strelka.gif"
width="30" height="53"
<?php thisInfRm('1.180.0.323'); ?>class="aFilter"/></div>
<div id="snow"></div>
<?= $goline; ?>
</div>
</td>
</tr>
</table>
<?php
if (date("H") < 6 || date("H") >= 22) {
?>
<div align="center" id="atackDiv" style="display:none;">
<form method="post" action="main.php">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div
style="width:300px; padding:3px; margin:7px; background-color:#CCCCCC; border:1px solid #575757;">
Введите логин жертвы:<br/>
<input name="atack" type="text" id="atack" size="35"
maxlength="30"/>
<input type="submit" name="button" id="button" class="btn"
value="OK"/>
</div>
</td>
</tr>
</table>
</form>
</div>
<?php
}
?>
<!-- -->
<div style="width:580px; text-align:left; background-color:#D3D3D3;">
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" class="menutop" id="greyText"
onclick="location='main.php?loc=1.180.0.3&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.3', 1); ?>">Бойцовский Клуб</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=1.180.0.323&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.323', 1); ?>">Парковая Улица</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=1.180.0.10&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.10', 1); ?>">Магазин</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=1.180.0.210&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.210', 1); ?>">Ремонтная Мастерская</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.11', 1); ?>">Страшилкина Улица</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=1.180.0.14&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.14', 1); ?>">Вокзал</a></span>
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px"><img
src="//img.new-combats.tech/i/move/links.gif" width="9" height="7"/>&nbsp;<a
href="#" id="greyText" class="menutop"
onclick="location='main.php?loc=1.180.0.226&rnd=<?= $code; ?>';"
title="<?php thisInfRm('1.180.0.226', 1); ?>">Почта</a></span>
</div>
<!-- -->
<div style="display:none; height:0px " id="moveto"></div>
</td>
<td></td>
</tr>
</table>
<HR>
<BR><?= $rowonmax; ?><BR>
</div>
</td>
</tr>
</table>

View File

@@ -245,7 +245,7 @@ $titm = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.
function shuffle (array) {
var currentIndex = array.length, temporaryValue, randomIndex ;
while (0 !== currentIndex) {
while (0 != currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
@@ -322,7 +322,7 @@ $titm = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.
var $winImg
for (var i = 60; i < 90; i++) {
if ($('.list li:eq(' + i + ')')[0].children[0].getAttribute("type") === `id${idItem}`) {
if ($('.list li:eq(' + i + ')')[0].children[0].getAttribute("type") == `id${idItem}`) {
elemRul = $('.list li:eq(' + i + ')')[0].children[0].offsetLeft
$winImg = $('.list li:eq(' + i + ')')[0]
}

View File

@@ -245,7 +245,7 @@ if($u->room['file']=='loto2')
function shuffle (array) {
var currentIndex = array.length, temporaryValue, randomIndex ;
while (0 !== currentIndex) {
while (0 != currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
@@ -321,7 +321,7 @@ if($u->room['file']=='loto2')
var $winImg
for (var i = 60; i < 90; i++) {
if ($('.list li:eq(' + i + ')')[0].children[0].getAttribute("type") === `id${idItem}`) {
if ($('.list li:eq(' + i + ')')[0].children[0].getAttribute("type") == `id${idItem}`) {
elemRul = $('.list li:eq(' + i + ')')[0].children[0].offsetLeft
$winImg = $('.list li:eq(' + i + ')')[0]
}

View File

@@ -20,7 +20,7 @@ if (empty($members) || empty($tournamentStartTime)): ?>
<?php
exit(); endif; ?>
<?php
if ((int)$tournamentStartTime === -1): ?>
if ((int)$tournamentStartTime == -1): ?>
Турнир начался!
<?php
else: ?>

View File

@@ -571,69 +571,6 @@ if (!isset($u->info['noreal']) && $c['bonussocial'] == true) {
}
echo '<div align="center"><button style="width:224px;margin-top:5px;" class="btnnew" onclick="top.mailConf();"><img src="//img.new-combats.tech/mini_mail.png" height="13" width="13"> ' . $mcff . '</button></div>';
}
$mcf = mysql_fetch_array(
mysql_query(
'SELECT * FROM `mini_actions` WHERE `uid` = "' . $u->info['id'] . '" AND (`val` = "vkauth" OR `val` = "fbauth" OR `val` = "okauth") LIMIT 1'
)
);
if (!isset($mcf['id'])) {
require_once('vk/VK.php');
require_once('vk/VKException.php');
$vk_config = [
'app_id' => '5145826',
'api_secret' => 'V90yIzlgSglfgrnHw7Ny',
'callback_url' => '/social.php?vkconnect',
'api_settings' => 'offline,friends,email',
];
if (isset($_GET['vkconnect'])) {
echo '<hr>';
try {
$vk = new VK\VK($vk_config['app_id'], $vk_config['api_secret']);
if (!isset($_REQUEST['code'])) {
/**
* If you need switch the application in test mode,
* add another parameter "true". Default value "false".
* Ex. $vk->getAuthorizeURL($api_settings, $callback_url, true);
*/
$authorize_url = $vk->getAuthorizeURL(
$vk_config['api_settings'], $vk_config['callback_url']
);
} else {
$access_token = $vk->getAccessToken($_REQUEST['code'], $vk_config['callback_url']);
echo 'access token: ' . $access_token['access_token']
. '<br />expires: ' . $access_token['expires_in'] . ' sec.'
. '<br />user id: ' . $access_token['user_id'] . '<br /><br />';
}
} catch (VK\VKException $error) {
echo $error->getMessage();
}
echo '<hr>';
} else {
$vk = new VK\VK($vk_config['app_id'], $vk_config['api_secret']);
$authorize_url = $vk->getAuthorizeURL(
$vk_config['api_settings'], $vk_config['callback_url']
);
}
echo '<div align="center"><hr>';
echo 'Подтвердите одну из страничек в социальных сетях за 1 екр. и 150 кр.<br><br>';
echo '<button style="width:224px;margin-top:5px;" class="btnnew" onclick="window.open(\'' . $authorize_url . '\', \'opener\', \'width=660,height=450\');"><img src="//img.new-combats.tech/vk.png" height="13" width="13"> Подтвердить ВКонтакте &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</button>';
echo '<br>или<br>';
echo '<button style="width:224px;margin-top:5px;" class="btnnew" onclick="window.open(\'/social.php?fbconnect\', \'opener\', \'width=660,height=450\');"><img src="//img.new-combats.tech/fb.png" height="13" width="13"> Подтвердить Facebook &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</button>';
echo '</div>';
}
}
echo '</div>';
$prt = explode('|', $u->info['prmenu']);

View File

@@ -283,7 +283,7 @@ if ($u->stats['pbe'] > 0) {
</button>
<script>
function myWindow5(e) {// создать iframe и добавить его после кнопки
if (e.nextSibling.nodeName.toLowerCase() !== "iframe") {// если после кнопки нет iframe
if (e.nextSibling.nodeName.toLowerCase() != "iframe") {// если после кнопки нет iframe
var iframe = document.createElement('iframe');
iframe.setAttribute('src', '/bonuss.php');
iframe.setAttribute('height', '150');