notices fix

This commit is contained in:
lopar 2019-06-21 20:35:40 +03:00
parent 0d88ccf4bc
commit 3f9ff97d34

View File

@ -11,12 +11,12 @@ if ($user['battle'] != 0) {
} }
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE'); db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE');
if (($_GET['do'] == "clear") && (($user['align'] > 1.4 && $user['align'] < 2) || $user['admin'] == 1)) { if ((input::check('do') == "clear") AND $user['admin'] == 1)) {
db::c()->query('UPDATE `zayavka` SET `coment` = "?s" WHERE `id` = ?i', '<em>Вырезано цензурой!</em>', $_GET['zid']); db::c()->query('UPDATE `zayavka` SET `coment` = "?s" WHERE `id` = ?i', '<em>Вырезано цензурой!</em>', $_GET['zid']);
} }
if ($_GET['del'] && $user['admin'] == 1) { //удаление заявки на бой. if (!empty($_GET['del']) && $user['admin'] == 1) { //удаление заявки на бой.
$zayavka = db::c()->query('SELECT `id` FROM `zayavka` WHERE `id` = ?i', $_GET['zid'])->fetch_assoc(); $zayavka = db::c()->query('SELECT `id` FROM `zayavka` WHERE `id` = ?i', $_GET['zid'])->fetch_assoc();
if (isset($zayavka['id'])) { if (isset($zayavka['id'])) {
db::c()->query('UPDATE `users` SET `zayavka` = 0 WHERE `zayavka` = ?i', $zayavka['id']); db::c()->query('UPDATE `users` SET `zayavka` = 0 WHERE `zayavka` = ?i', $zayavka['id']);
@ -682,7 +682,7 @@ if ($_POST['open']) {
<FORM METHOD=POST name=F1> <FORM METHOD=POST name=F1>
<TR> <TR>
<TD colspan=5> <TD colspan=5>
<?php if ($_REQUEST['level']) echo nick($user); ?> <?php if (!empty($_REQUEST['level'])) echo nick($user); ?>
</TD> </TD>
<TD colspan=4 align=right> <TD colspan=4 align=right>
<INPUT TYPE=button value="Вернуться" onclick="location.href='main.php?top=<?= mt_rand() ?>';"> <INPUT TYPE=button value="Вернуться" onclick="location.href='main.php?top=<?= mt_rand() ?>';">
@ -691,27 +691,27 @@ if ($_POST['open']) {
<TR> <TR>
<TD class=m width=40>&nbsp;<B><?php if ($user['room'] != 101) echo 'Бои:'; else echo 'Разделы:'; ?></B></TD> <TD class=m width=40>&nbsp;<B><?php if ($user['room'] != 101) echo 'Бои:'; else echo 'Разделы:'; ?></B></TD>
<?php //FIXME Убрать этот адов пиздец, когда одни и те же ссылки ведут в разные места и называются по разному. Или нормально понять зачем это. ?> <?php //FIXME Убрать этот адов пиздец, когда одни и те же ссылки ведут в разные места и называются по разному. Или нормально понять зачем это. ?>
<TD class=<?= ($_REQUEST['level'] == 'begin') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=begin&".mt_rand()."\">Новичков</A></TD>"); else echo 'Зал Славы Тьмы</TD>' ?> <TD class=<?= (input::check('level') == 'begin') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=begin&".mt_rand()."\">Новичков</A></TD>"); else echo 'Зал Славы Тьмы</TD>' ?>
<TD class=<?= ($_REQUEST['level'] == 'fiz') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=fiz&".mt_rand()."\">Физические</A></TD>"); else echo 'Зал Славы Света</TD>' ?> <TD class=<?= (input::check('level') == 'fiz') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=fiz&".mt_rand()."\">Физические</A></TD>"); else echo 'Зал Славы Света</TD>' ?>
<TD class=<?= ($_REQUEST['level'] == 'dgv') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=dgv&".mt_rand()."\">Договорные</A></TD>"); else echo 'Квесты</TD>' ?> <TD class=<?= (input::check('level') == 'dgv') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=dgv&".mt_rand()."\">Договорные</A></TD>"); else echo 'Квесты</TD>' ?>
<TD class=<?= ($_REQUEST['level'] == 'group') ? "s" : "m" ?>><A HREF="zayavka.php?level=group&<?= mt_rand() ?>"> <TD class=<?= (input::check('level') == 'group') ? "s" : "m" ?>><A HREF="zayavka.php?level=group&<?= mt_rand() ?>">
<?php if ($user['room'] != 101) { <?php if ($user['room'] != 101) {
echo("Групповые"); echo 'Групповые';
} else { } else {
echo("<font color=red><b>Тьма vs Свет</b></font>"); echo '<span style="color:red; font-weight: bold;">Тьма vs Свет</span>';
}; ?> }; ?>
</A></TD> </A></TD>
<TD class=<?= ($_REQUEST['level'] == 'haos') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=haos&".mt_rand()."\">Хаотичные</A></TD>"); else echo 'В разработке</TD>' ?> <TD class=<?= (input::check('level') == 'haos') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=haos&".mt_rand()."\">Хаотичные</A></TD>"); else echo 'В разработке</TD>' ?>
<TD class=<?= ($_REQUEST['tklogs'] == '1') ? "s" : "m" ?>><A HREF="zayavka.php?tklogs=1&<?= mt_rand() ?>">Текущие</A> <TD class=<?= (input::check('tklogs') == '1') ? "s" : "m" ?>><A HREF="zayavka.php?tklogs=1&<?= mt_rand() ?>">Текущие</A>
</TD> </TD>
<TD class=<?= ($_REQUEST['logs'] != null) ? "s" : "m" ?>><A HREF="zayavka.php?logs=<?= date("d.m.y") ?>&<?= mt_rand() ?>">Завершенные</A></TD> <TD class=<?= (!is_null($_REQUEST['logs'])) ? "s" : "m" ?>><A HREF="zayavka.php?logs=<?= date("d.m.y") ?>&<?= mt_rand() ?>">Завершенные</A></TD>
</TR> </TR>
</TABLE> </TABLE>
<TABLE width=100% cellspacing=0 cellpadding=0> <TABLE width=100% cellspacing=0 cellpadding=0>
<TR> <TR>
<TD valign=top> <TD valign=top>
<?php <?php
if (!in_array($user['room'], [1,2,3,4,5,6,7,8,9,10,15,16,19,101]) AND !$_REQUEST['logs'] AND !$_REQUEST['tklogs']) die(err('В этой комнате невозможно подавать заявки!')); if (!in_array($user['room'], [1,2,3,4,5,6,7,8,9,10,15,16,19,101]) AND empty($_REQUEST['logs']) AND empty($_REQUEST['tklogs'])) die(err('В этой комнате невозможно подавать заявки!'));
// if ($user['room'] != 1 && $user['room'] != 2 && $user['room'] != 3 && $user['room'] != 4 && // if ($user['room'] != 1 && $user['room'] != 2 && $user['room'] != 3 && $user['room'] != 4 &&
// $user['room'] != 5 && $user['room'] != 6 && $user['room'] != 7 && $user['room'] != 9 && // $user['room'] != 5 && $user['room'] != 6 && $user['room'] != 7 && $user['room'] != 9 &&
// $user['room'] != 10 && $user['room'] != 15 && $user['room'] != 16 && $user['room'] != 19 && // $user['room'] != 10 && $user['room'] != 15 && $user['room'] != 16 && $user['room'] != 19 &&