diff --git a/res/forum/list_table.php b/res/forum/list_table.php index e769823..287b899 100644 --- a/res/forum/list_table.php +++ b/res/forum/list_table.php @@ -1,6 +1,20 @@ query("SELECT username, admin FROM user WHERE username=\"" . $_SESSION["username"] . "\" AND admin=\"1\""); + +if ($out -> num_rows != 1) +{ + fail: + echo "nope"; + header("Location: ../../index.php"); + return; +} + $out = $database -> query("SELECT username FROM user ORDER BY id ASC");