$breadcrumbObj->addCrumb("Forum"); include $prevFolder . "include/breadcrumb.php"; $boardObj->showSearchForm(); echo "\t\n\t<table class='forumTable'>\n"; $result = $mysqli->query("SELECT forumcategory_id FROM " . $dbprefix . "forum_category ORDER BY ordernum DESC"); while ($row = $result->fetch_assoc()) { $arrForumCats[] = $row['forumcategory_id']; $categoryObj->select($row['forumcategory_id']); $catInfo = $categoryObj->get_info_filtered(); $arrBoards = $categoryObj->getAssociateIDs("AND subforum_id = '0' ORDER BY sortnum", true); $dispBoards = ""; foreach ($arrBoards as $boardID) { $boardObj->select($boardID); if ($boardObj->memberHasAccess($memberInfo)) { $boardInfo = $boardObj->get_info_filtered(); $arrForumTopics = $boardObj->getForumTopics(); $newTopicBG = ""; $dispNewTopicIMG = ""; if ($LOGGED_IN && $boardObj->hasNewTopics($memberInfo['member_id'])) { $dispNewTopicIMG = " <img style='margin-left: 5px' src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/forum-new.png' title='New Posts!'>"; $newTopicBG = " boardNewPostBG"; } // Get Last Post Display Info if (count($arrForumTopics) > 0) { $boardObj->objPost->select($arrForumTopics[0]); $firstPostInfo = $boardObj->objPost->get_info_filtered(); $boardObj->objTopic->select($firstPostInfo['forumtopic_id']); $lastPostID = $boardObj->objTopic->get_info("lastpost_id"); $boardObj->objPost->select($lastPostID); $lastPostInfo = $boardObj->objPost->get_info_filtered(); $postMemberObj->select($lastPostInfo['member_id']);
} $dispPageSelectTop = ""; $dispPageSelectBottom = ""; if ($blnPageSelect) { $dispPageSelectTop = "\n\t<p style='margin-top: 0px'><b>Page:</b> <select id='pageSelectTop' class='textBox'>" . $pageoptions . "</select> <input type='button' id='btnPageSelectTop' class='submitButton' value='GO' style='width: 40px'></p>\n\t<p style='margin-top: 0px'>" . $dispPreviousPage . $dispNextPage . "</p>\n\t"; $dispPageSelectBottom = "\n\t<p style='margin-top: 0px'><b>Page:</b> <select id='pageSelectBottom' class='textBox'>" . $pageoptions . "</select> <input type='button' id='btnPageSelectBottom' class='submitButton' value='GO' style='width: 40px'></p>\n\t<p style='margin-top: 0px'>" . $dispPreviousPage . $dispNextPage . "</p>\n\t"; } // Subforums $subForumObj = new ForumBoard($mysqli); $arrSubForums = $boardObj->getSubForums(); $dispSubForums = ""; foreach ($arrSubForums as $boardID) { $subForumObj->select($boardID); if ($subForumObj->memberHasAccess($memberInfo)) { $subForumInfo = $subForumObj->get_info_filtered(); $arrForumTopics = $subForumObj->getForumTopics(); $newTopicBG = ""; $dispNewTopicIMG = ""; if ($LOGGED_IN && $subForumObj->hasNewTopics($memberInfo['member_id'])) { $dispNewTopicIMG = " <img style='margin-left: 5px' src='" . $MAIN_ROOT . "themes/" . $THEME . "/images/forum-new.png' title='New Posts!'>"; $newTopicBG = " boardNewPostBG"; } // Get Last Post Display Info if (count($arrForumTopics) > 0) { $subForumObj->objPost->select($arrForumTopics[0]); $firstPostInfo = $subForumObj->objPost->get_info_filtered(); $subForumObj->objTopic->select($firstPostInfo['forumtopic_id']); $lastPostID = $subForumObj->objTopic->get_info("lastpost_id"); $subForumObj->objPost->select($lastPostID); $lastPostInfo = $subForumObj->objPost->get_info_filtered(); $postMemberObj->select($lastPostInfo['member_id']);