Прикручиваем шаблон. Хороним идиотские ошибки. Делаем новые, более идиотские. Проклинаем автора изначального кода.

This commit is contained in:
Igor Barkov (iwork) 2020-09-30 17:13:55 +03:00
parent def01b331d
commit cf8f795550
2 changed files with 8 additions and 23 deletions

View File

@ -1,4 +1,4 @@
<? <?php
if ($user->room == 403) { if ($user->room == 403) {
$s = db::c()->query('SELECT * FROM podzem2 WHERE name= "?s"', $mir['name'])->fetch_assoc(); $s = db::c()->query('SELECT * FROM podzem2 WHERE name= "?s"', $mir['name'])->fetch_assoc();

29
ch.php
View File

@ -112,11 +112,8 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
$ch4 = '_passive'; $ch4 = '_passive';
$ch5 = '_passive'; $ch5 = '_passive';
} }
Template::header(sprintf('%s (%s)', $rooms[$user->room], mysql_num_rows($data)));
?> ?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<meta charset="utf-8">
<script> <script>
function fastshow(content) { function fastshow(content) {
var el = document.getElementById("mmoves"); var el = document.getElementById("mmoves");
@ -170,18 +167,6 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
top.rld(); top.rld();
</script> </script>
<title><?= $rooms[$user->room], ' (', mysql_num_rows($data) ?>)</title>
</head>
<body style="margin: 0; padding: 0; background: #EEEEEE;" onscroll="top.myscroll()"
onload="document.body.scrollTop=top.OnlineOldPosition">
<? if ($user['first'] != 99) { ?>
<center>
<div id="mini_qsst" onclick="top.frames['main'].location.href='kwest.php';"
style="cursor: pointer; display: block;"><img src="i/bot_q/mini_wm1.png"></div>
</center>
<? } ?>
<center> <center>
<? if (!$_GET['rms']) { ?> <? if (!$_GET['rms']) { ?>
<div id="fixednew" <div id="fixednew"
@ -278,15 +263,15 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
if ($math[1] > time() - 60) { if ($math[1] > time() - 60) {
$math[3] = stripslashes($math[3]); $math[3] = stripslashes($math[3]);
//echo "console.log($math[1]|$math[2]|$math[3]);"; //echo "console.log($math[1]|$math[2]|$math[3]);";
if ((@$math[2] == '{[]}' . $user['login'] . '{[]}') && (@$math[1] >= @$user['chattime'])) { if (($math[2] == '{[]}' . $user['login'] . '{[]}') && ($math[1] >= $user['chattime'])) {
echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';"; echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';"; echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date2>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
echo "top.show_new(\"wtab1\"); top.show_new(\"wtab5\");"; echo "top.show_new(\"wtab1\"); top.show_new(\"wtab5\");";
$ks++; $ks++;
$lastpost = $math[1]; $lastpost = $math[1];
} elseif (substr($math[2], 0, 4) == '{[]}' && (@$math[1] >= @$user['chattime'])) { } elseif (substr($math[2], 0, 4) == '{[]}' && ($math[1] >= $user['chattime'])) {
//exit; //exit;
} elseif ((@$math[2] == '!sys!!') && (@$math[1] >= @$user['chattime']) /*&& ($user->room==$math[4])*/ && $_GET['om'] != 1) { } elseif (($math[2] == '!sys!!') && ($math[1] >= @$user['chattime']) && $_GET['om'] != 1) {
if ($_GET['sys'] == 1 || strpos($math[3], "<img src=i/magic/") !== FALSE) { if ($_GET['sys'] == 1 || strpos($math[3], "<img src=i/magic/") !== FALSE) {
echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';"; echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';"; echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
@ -294,19 +279,19 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
$ks++; $ks++;
$lastpost = $math[1]; $lastpost = $math[1];
} }
} elseif (@$math[2] == '!sys2all!!' && @$math[1] >= @$user['chattime']) { } elseif ($math[2] == '!sys2all!!' && @$math[1] >= $user['chattime']) {
echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';"; echo "top.frames['chat'].document.all(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . "<BR>';"; echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . "<BR>';";
echo "top.show_new(\"wtab5\");"; echo "top.show_new(\"wtab5\");";
$ks++; $ks++;
$lastpost = $math[1]; $lastpost = $math[1];
} elseif ((@$math[2] == '!cavesys!!') && (@$math[1] >= @$user['chattime']) && ($user['caveleader'] == $math[4])) { } elseif (($math[2] == '!cavesys!!') && ($math[1] >= $user['chattime']) && ($user['caveleader'] == $math[4])) {
echo "top.frames['chat'].document.getElementById(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';"; echo "top.frames['chat'].document.getElementById(\"mes\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . " <BR>';";
echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . "<BR>';"; echo "top.frames['chat'].document.all(\"mes_system\").innerHTML += '<span class=date>" . date("H:i", $math[1]) . "</span> " . $math[3] . "<BR>';";
echo "top.show_new(\"wtab5\");"; echo "top.show_new(\"wtab5\");";
$ks++; $ks++;
$lastpost = $math[1]; $lastpost = $math[1];
} elseif (@$math[1] >= @$user['chattime']) { } elseif ($math[1] >= @$user['chattime']) {
if (strpos($math[3], "private [klan-{$user['klan']}-") !== FALSE) { if (strpos($math[3], "private [klan-{$user['klan']}-") !== FALSE) {
$pos = strpos($math[3], "[klan-{$user['klan']}-") + strlen($user['klan']) + 7; $pos = strpos($math[3], "[klan-{$user['klan']}-") + strlen($user['klan']) + 7;
} elseif (((strpos($math[3], "private [help]") !== FALSE))) { } elseif (((strpos($math[3], "private [help]") !== FALSE))) {