is_helpdesk) { doHeader('Help Desk'); $sort_style = 'help-activity-most'; } else { doHeader('Forum'); ($_GET['sort'] != NULL) ? $sort_style = $_GET['sort'] : $sort_style = 'modified-new'; } ?>
id ?>> is_helpdesk) { ?>

title ?>
Forum

is_helpdesk) echo "Post a New Question"; else echo "Post a New Thread / Question"; ?>

threads > $n): $totalPages = floor($forum->threads / $n); $curPage = floor($_GET['start'] / $n); $pages = array(0, 1, 2); for ($i = -1 ; $i <= 1 ; $i++) if ($curPage + $i > 0 && $curPage + $i < $totalPages - 1) array_push($pages, $curPage + $i); for ($i = -3 ; $i <= -1 ; $i++) if ($totalPages + $i > 0) array_push($pages, $totalPages + $i); $pages = array_unique($pages); natsort($pages); $pages = array_values($pages); $gotoStr = '

Goto page '; if ($curPage == 0) $gotoStr .= '1'; else $gotoStr .= 'Previous 1'; for ($i = 1 ; $i < count($pages)-1 ; $i++) { if ($curPage == $pages[$i]) { $gotoStr .= ($i > 0 && $pages[$i-1] == $pages[$i] - 1)?', ':' ... '; $gotoStr .= ''.($pages[$i]+1).''; } else { $gotoStr .= ($i > 0 && $pages[$i-1] == $pages[$i] - 1)?', ':' ... '; $gotoStr .= ''.($pages[$i]+1).''; } } if ($curPage == $totalPages-1) $gotoStr .= ', '.$totalPages.''; else $gotoStr .= ', '.$totalPages.' Next'; $gotoStr .= '

'; echo $gotoStr; endif; ?>

is_helpdesk) { ?> getThreads($_GET['start'], $n, $sort_style); while($thread = getNextThread($threads)): $user = getUser($thread->owner); ?> is_helpdesk) { echo ""; } else { echo " "; } ?>
Question Answers Titles Replies Author Views Last Post
title) ?> ", $thread->replies, "", $thread->replies, " owner, "\">", $user->name, " ", $thread->views, " ", date('D M j, Y g:i a', $thread->timestamp), "

threads > $n) echo $gotoStr; ?>