From 04d6646508e84f03de9338a5d5d7861605e694f6 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 21 Jun 2019 21:43:56 +0300 Subject: [PATCH] more fixes --- zayavka.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/zayavka.php b/zayavka.php index 2682a90..5bcd2ca 100644 --- a/zayavka.php +++ b/zayavka.php @@ -9,6 +9,9 @@ if ($user['battle'] != 0) { header('Location: fbattle.php'); die(); } + +$level = filter_input(INPUT_REQUEST, 'level'); + db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE'); if ((input::check('do') == "clear") AND $user['admin'] == 1) { @@ -690,17 +693,17 @@ if ($_POST['open']) {   - >Новичков"); else echo 'Зал Славы Тьмы' ?> - >Физические"); else echo 'Зал Славы Света' ?> - >Договорные"); else echo 'Квесты' ?> - > + >Новичков"); else echo 'Зал Славы Тьмы' ?> + >Физические"); else echo 'Зал Славы Света' ?> + >Договорные"); else echo 'Квесты' ?> + > Тьма vs Свет'; }; ?> - >Хаотичные"); else echo 'В разработке' ?> + >Хаотичные"); else echo 'В разработке' ?> >Текущие >&">Завершенные @@ -1205,7 +1208,7 @@ if ($_POST['open']) { } - if ($_REQUEST['level'] == 'haos') { + if ($level == 'haos') { if ($user['level'] < 2) { die("


Хаотичные бои доступны с 2 уровня.
"); } @@ -1261,8 +1264,8 @@ if ($_POST['open']) { if ($_REQUEST['tklogs'] != null) { $t1 = floor(time() - 900); - $data = mysql_query("SELECT * FROM `battle` WHERE `win` = '3' AND `to1` > '" . $t1 . "' AND `to2` > '" . $t1 . "' ORDER by `id` ASC"); - while ($row = @mysql_fetch_array($data)) { + $data = db::c()->query('SELECT * FROM `battle` WHERE `win` = 3 AND `to1` > ?i AND `to2` > ?i ORDER BY `id` ASC', $t1, $t1); + while ($row = $data->fetch_assoc()) { echo "{$row['date']}"; $z = explode(";", $row['t1']); foreach ($z as $k => $v) { @@ -1283,7 +1286,7 @@ if ($_POST['open']) { } } - if ($_REQUEST['logs'] != null) { + if (!is_null($_REQUEST['logs'])) { echo '