From 884583af27d0e1062e4723195508dbfc11658d71 Mon Sep 17 00:00:00 2001 From: "Igor Barkov [iwork]" Date: Wed, 31 Oct 2018 19:43:30 +0200 Subject: [PATCH] Remove notices --- forum.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/forum.php b/forum.php index 2442614..464b7e6 100644 --- a/forum.php +++ b/forum.php @@ -501,11 +501,11 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 $error = "

Тема перемещена.

forum.php?topic=" . $_POST['numt'] . "&konftop=" . $_POST['selectt'] . ""; } } - $pgs = db::c()->query('SELECT count(`id`) FROM `forum` WHERE `parent` = "?s"', $_GET['topic'])->fetch_assoc(); + $pgs = db::c()->query('SELECT count(`id`) FROM `forum` WHERE `parent` = "?s"', $_GET['topic'])->fetch_row(); $pgs = $pgs[0] / 20; if ($pgs > 1) echo " Страницы : "; $pages_str = ''; - $page = (int)$_GET['page'] > 0 ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0; + $page = isset($_GET['page']) ? (((int)$_GET['page'] + 1) > $pgs ? ($pgs - 1) : (int)$_GET['page']) : 0; $page = ceil($page); if ($pgs > 1) { for ($i = 0; $i < ceil($pgs); $i++) { @@ -598,10 +598,9 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228 if (($closed == 1 && $_GET['topic'] != 228043095)) { echo "
" . $closepal . "


"; } else { - if (empty($_GET['baned'])) $_GET['baned'] = 0; if ($user['align'] == 4 && $_GET['conf'] != 23) { $error = "

Персонажам со склонностью хаос запрещено писать на этом форуме!

"; - } elseif ($user['baned'] == 1) { + } elseif (isset($user['baned']) AND $user['baned'] == 1) { $error = "

Заблокированным персонажам запрещено писать на форуме!

"; } elseif ($user['level'] < 2) { $error = "

Персонажам до 2-го уровня запрещено писать на форуме!

";