Remove notices

This commit is contained in:
Igor Barkov [iwork] 2018-10-31 19:38:12 +02:00
parent 2767cf3665
commit ed376bd4da

View File

@ -553,6 +553,8 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
$sort_type = 'DESC';
}
if (empty($_GET['page'])) $_GET['page'] = "";
#$data = mysql_query("SELECT * FROM `forum` WHERE `parent` = '" . mysql_real_escape_string($_GET['topic']) . "' ORDER by `id` {$sort_type} LIMIT " . (int)($_GET['page'] * 20) . ",20");
$data = db::c()->query('SELECT * FROM `forum` WHERE `parent` = "?s" ORDER BY "?s" LIMIT ?i,20', $_GET['topic'], $sort_type, ($_GET['page'] * 20));
while ($row = $data->fetch_assoc()) {
@ -596,6 +598,7 @@ if (isset($_GET['topic']) && is_numeric($_GET['topic']) && $_GET['topic'] == 228
if (($closed == 1 && $_GET['topic'] != 228043095)) {
echo "<br /><div align=center>" . $closepal . "</div><br /><br />";
} else {
if (empty($_GET['baned'])) $_GET['baned'] = 0;
if ($user['align'] == 4 && $_GET['conf'] != 23) {
$error = "<br /><br /><b>Персонажам со склонностью хаос запрещено писать на этом форуме!</b><br /><br />";
} elseif ($user['baned'] == 1) {