id); $forum = getForum($thread->forum); $category = getCategory($forum->category); $logged_in_user = get_logged_in_user(false); $logged_in_user = getForumPreferences($logged_in_user); $title = cleanup_title($thread->title); if ($category->is_helpdesk) { if (!$sort_style) { $sort_style = getSortStyle($logged_in_user,"answer"); } else { setSortStyle($logged_in_user,"answer", $sort_style); } page_head($title); } else { if (!$sort_style) { $sort_style = getSortStyle($logged_in_user,"thread"); } else { setSortStyle($logged_in_user,"thread", $sort_style); } if ($logged_in_user->jump_to_unread){ page_head($title, 'jumpToUnread();'); echo "id."\" rel=\"up\" title=\"".$forum->title."\">"; } else { page_head($title); echo "id."\" rel=\"up\" title=\"".$forum->title."\">"; } } // TODO: Constant for default sort style and filter values. if ($sort_style == NULL) { $sort_style = "timestamp"; } $is_subscribed = false; if ($logged_in_user) { $result = mysql_query("SELECT * FROM subscriptions WHERE userid = " . $logged_in_user->id . " AND threadid = " . $thread->id); if ($result) { $is_subscribed = (mysql_num_rows($result) > 0); } } show_forum_title($forum, $thread, $category->is_helpdesk); if (($thread->hidden) && (!isSpecialUser($logged_in_user,0))) { /* If the user logged in is a moderator, show him the + * thread if he goes so far as to name it by ID like this. + * Otherwise, hide the thread. + */ error_page("This thread has been hidden for administrative purposes"); } else { echo "
\n"; // Here is where the actual thread begins. if ($category->is_helpdesk) { $headings = array(array("Author","authorcol"), "Question"); } else { $headings = array(array("Author","authorcol"), "Message"); } start_forum_table($headings, "id=\"thread\" width=100%"); show_posts($thread, $sort_style, $filter, true, true, $category->is_helpdesk); end_forum_table(); echo ""; show_forum_title($forum, $thread, $category->is_helpdesk); } page_tail(); ?>