if ($maintenance_mode[0]->value == 'true') { // Maintenance mode is enabled, only admins can view if (!$user->isLoggedIn() || !$user->canViewACP($user->data()->id)) { require 'pages/forum/maintenance.php'; die; } } // Set the page name for the active link in navbar $page = 'forum'; // User must be logged in to proceed if (!$user->isLoggedIn()) { Redirect::to('/forum'); die; } $forum = new Forum(); $mentionsParser = new MentionsParser(); require 'core/includes/htmlpurifier/HTMLPurifier.standalone.php'; // HTML Purifier if (!isset($_GET['tid']) || !is_numeric($_GET['tid']) || !isset($_GET['fid']) || !is_numeric($_GET['fid'])) { Redirect::to('/forum/error/?error=not_exist'); die; } $tid = (int) $_GET['tid']; $fid = (int) $_GET['fid']; // Does the topic exist, and can the user view it? $list = $forum->topicExist($tid, $user->data()->group_id); if (!$list) { Redirect::to('/forum/error/?error=not_exist'); die; } // Get the topic information
<?php /* * Made by Samerton * http://worldscapemc.co.uk * * License: MIT */ // Set the page name for the active link in navbar $page = "forum"; $forum = new Forum(); $timeago = new Timeago(); $paginate = new Pagination(); $mentionsParser = new MentionsParser(); require 'inc/functions/paginate.php'; // Get number of users on a page require 'inc/includes/html/library/HTMLPurifier.auto.php'; // HTML Purifier if (!isset($_GET['tid']) || !is_numeric($_GET['tid'])) { Redirect::to('/forum/error/?error=not_exist'); die; } $tid = (int) $_GET['tid']; // Does the topic exist, and can the user view it? $list = $forum->topicExist($tid, $user->data()->group_id); if (!$list) { Redirect::to('/forum/error/?error=not_exist'); die; } // Is the URL pointing to a specific post? if (isset($_GET['pid'])) {