Мелкие ошибки из анализатора.

This commit is contained in:
Igor Barkov (iwork)
2021-02-01 16:39:48 +02:00
parent 95ade992e0
commit 538047f36f
13 changed files with 148 additions and 168 deletions
+43 -44
View File
@@ -1,4 +1,7 @@
<?php
use Battles\Template;
session_start();
require_once 'functions.php';
@@ -108,7 +111,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
$ch4 = '_passive';
$ch5 = '_passive';
}
\Battles\Template::header(sprintf('%s (%s)', $rooms[$user->room], mysql_num_rows($data)));
Template::header(sprintf('%s (%s)', $rooms[$user->room], mysql_num_rows($data)));
?>
<script>
function fastshow(content) {
@@ -163,25 +166,24 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
top.rld();
</script>
<center>
<div>
<? if (!$_GET['rms']) { ?>
<div id="fixednew"
style="position: fixed; margin: 0; padding: 0; z-index: 9; width: 100%; text-align: center; overflow: auto;">
<div id="fixednew" style="position: fixed; margin: 0; padding: 0; z-index: 9; width: 100%; text-align: center; overflow: auto;">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><img align="left"
onclick="this.src='i/buttons/ch1_passive.jpg'; location.href='ch.php?online='+Math.random();"
src="i/buttons/ch1<?= $ch1; ?>.jpg"/></td>
src="i/buttons/ch1<?= $ch1; ?>.jpg"/>
<? if (!empty($user['klan'])) { ?>
<td><img align="left" title="Соклановцы" style="cursor: pointer;"
onclick="location.href='ch.php?online='+Math.random()+'&amp;chview=5';"
src="i/buttons/ch5<?= $ch5; ?>.jpg"/></td>
src="i/buttons/ch5<?= $ch5; ?>.jpg"/>
<? } ?>
</tr>
</tbody>
</table>
</div><br/><br/><br/>
</div>
<br><br><br>
<? } ?>
<div id="mmoves"
style="background-color: #FFFFCC; visibility:hidden; overflow: visible; position: absolute; border-color: #666666; border-style: solid; border-width: 0; padding: 0; white-space: nowrap; display: block; vertical-align: middle; word-wrap: break-word;"></div>
@@ -195,53 +197,50 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
}
?>
<? echo '<br />' . $ttl . '<br />'; ?>
</center>
<table border=0>
<tr>
<td nowrap>
<script>
<?php
while ($row = $data->fetch_assoc()) {
if ($row['in_battle'] > 0) {
$in_battle = 1;
} else {
$in_battle = 0;
</div>
<div>
<script>
<?php
while ($row = $data->fetch_assoc()) {
if ($row['in_battle'] > 0) {
$in_battle = 1;
} else {
$in_battle = 0;
}
if ($row['invis'] > 0 && $row['id'] == $_SESSION['uid']) {
$row['login2'] = $row['login'] . "</a> (невидимка)";
}
if ($row['invis'] == 0 || $row['id'] == $_SESSION['uid']) {
if (!empty($row['action'])) {
function stripslashes_deep($text)
{
while (strstr($text, "\\")) {
$text = stripslashes($text);
}
return $text;
}
if ($row['invis'] > 0 && $row['id'] == $_SESSION['uid']) {
$row['login2'] = $row['login'] . "</a> (невидимка)";
}
if ($row['invis'] == 0 || $row['id'] == $_SESSION['uid']) {
if (!empty($row['action'])) {
function stripslashes_deep($text)
{
while (strstr($text, "\\")) {
$text = stripslashes($text);
}
return $text;
}
$rrr = $row['action'];
$act = explode("<>:<>", $rrr);
$aa = htmlspecialchars(stripslashes_deep($act[1]));
$aa = preg_replace("/afk ", "", $aa)
$rrr = $row['action'];
$act = explode("<>:<>", $rrr);
$aa = htmlspecialchars(stripslashes_deep($act[1]));
$aa = preg_replace("/afk ", "", $aa)
$aa = preg_replace("/dnd ", "", $aa);
$aa = preg_replace("/buy ", "", $aa);
$aa = preg_replace("/sell ", "", $aa);
$act_line = " <span onmouseover=\"fastshow(\'$aa\')\" onmouseout=\"hideshow()\"><b><small>{$act[0]}</small></b></span> ";
} else $act_line = '';
echo 'w(\'', $row['login'], '\',', $row['id'], ',', $in_battle, ',\'', $row['align'], '\',\'' . $row['klan'] . '\', \'' . $act_line . '\',\'', $row['level'], '\',\'', $row['slp'], '\',\'', $row['trv'], '\',\'', '\',\'', $row['login2'], '\');';
}
}
?>
</script>
</td>
</tr>
</table>
echo 'w(\'', $row['login'], '\',', $row['id'], ',', $in_battle, ',\'', $row['align'], '\',\'' . $row['klan'] . '\', \'' . $act_line . '\',\'', $row['level'], '\',\'', $row['slp'], '\',\'', $row['trv'], '\',\'', '\',\'', $row['login2'], '\');';
}
}
?>
</script>
</div>
<?php
if (!$_GET['room']) {
?>
<SCRIPT>document.write('<INPUT TYPE=checkbox onclick="if(this.checked == true) { top.OnlineStop = false; } else { top.OnlineStop = true; }" ' + (top.OnlineStop ? '' : 'checked') + '> Обновлять автомат.')
</SCRIPT></body></html>
</SCRIPT>
<?php
exit;
}