Рефакторинг

This commit is contained in:
2023-06-11 14:51:42 +03:00
parent 2440ad3cc1
commit 0668d3de5f
2 changed files with 40 additions and 33 deletions

View File

@@ -12,21 +12,23 @@ if (!defined('GAME')) {
elem.parentNode.removeChild(elem);
function openMod(title, dat) {
var d = document.getElementById('useMagic');
if (d != undefined) {
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">' + title + '</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
document.getElementById('moddata').innerHTML = dat;
d.style.display = '';
const d = document.getElementById('useMagic');
if (!d) {
return;
}
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">' + title + '</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
document.getElementById('moddata').innerHTML = dat;
d.style.display = '';
}
function closeMod() {
var d = document.getElementById('useMagic');
if (d != undefined) {
document.getElementById('modtitle').innerHTML = '';
document.getElementById('moddata').innerHTML = '';
d.style.display = 'none';
const d = document.getElementById('useMagic');
if (!d) {
return;
}
document.getElementById('modtitle').innerHTML = '';
document.getElementById('moddata').innerHTML = '';
d.style.display = 'none';
}
</script>
<script src='<?= Config::img() ?>/js/commoninf.js'></script>
@@ -152,7 +154,6 @@ if (isset($ba['id'])) {
$i++;
}
//if( isset($backdoor) ) {
$i = 0;
while ($i < count($bns2)) {
if (isset($bns2[$i][0]) && $_POST['buy4ekr'] >= $bns2[$i][0]) {
@@ -160,7 +161,6 @@ if (isset($ba['id'])) {
}
$i++;
}
//}
//Бонус опытовый, первичный и накопительный
$out_ekr = $_POST['buy4ekr'];
@@ -338,17 +338,17 @@ echo "<br><h4><div align=left>Необходимые средства в раб
$p['m1'] = 1;
$srok = [15 => '15 минут', 30 => '30 минут', 60 => 'один час', 180 => 'три часа', 360 => 'шесть часов', 720 => 'двенадцать часов', 1440 => 'одни сутки', 4320 => 'трое суток'];
if (isset($_GET['usemod'])) {
if (isset($_POST['usem1'])) {
require_once('moder/usem1.php');
}
if (isset($_GET['usemod']) && isset($_POST['usem1'])) {
require_once('moder/usem1.php');
}
if (isset($_POST['tologin'], $_POST['message'])) {
$cmsg = new ChatMessage();
$cmsg->setRoom(1);
$cmsg->setCity($infcity);
$cmsg->setTo($_POST['tologin']);
$cmsg->setText('<span style="color: darkblue; ">Сообщение телеграфом от </span> <b>' . $u->info['login'] . '</b>: ' . $_POST['message']);
$cmsg->setText(
'<span style="color: darkblue; ">Сообщение телеграфом от </span> <b>' . $u->info['login'] . '</b>: ' . $_POST['message']
);
$cmsg->setType(6);
(new Chat())->sendMsg($cmsg);
}
@@ -359,9 +359,11 @@ if (isset($_POST['tologin'], $_POST['message'])) {
src="<?= Config::img() ?>/i/items/sleep.gif" title="Заклятие молчания"/></a>
&nbsp;
<br><h4>Телеграф</h4>
<form method=post style="margin:5px;">Логин персонажа <input type=text size=20 name="tologin"> сообщение <input
type=text size=80 name="message"> &nbsp; <input type=submit class="btn btn-success"
value="отправить"></form>
<form method=post style="margin:5px;">
Логин персонажа <input type=text size=20 name="tologin">
сообщение <input type=text size=80 name="message">
&nbsp; <input type=submit class="btn btn-success" value="отправить">
</form>
<?php
echo '<br><h2>Список реальщиков:</h2><br>';
$sp = mysql_query('SELECT * FROM `pay_operation` WHERE `good` > 0 GROUP BY `uid`');