2) { $filter_min = -2; } $thread = getThread($_GET['id']); $thread->incView(); $forum = getForum($thread->forum); $category = getCategory($forum->category); $logged_in_user = get_logged_in_user(false); // TODO: Make these more specific. if ($category->is_helpdesk) { doHeader('Help Desk'); $sort_style = 'rating-high'; } else { doHeader('Forum'); } // TODO: Constant for default sort style and filter values. if ($sort_style == NULL) { $sort_style = "date-old"; } $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); } } echo "
\n"; if ($category->is_helpdesk) { $headings = array("Author", "Question"); } else { $headings = array("Author", "Message"); } start_forum_table($headings, array(150, NULL)); show_posts($thread, $sort_style, $filter_min, true, true, $category->is_helpdesk); end_forum_table(); echo ""; doFooter(); ?>