is_helpdesk) { doHeader('Help Desk'); $sort_style = 'help-activity-most'; } else { doHeader('Forum'); ($_GET['sort'] != NULL) ? $sort_style = $_GET['sort'] : $sort_style = 'modified-new'; } ?>
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; ?>
Question | Answers | Titles | Replies | Author | Views | Last Post |
---|---|---|---|---|---|---|
title) ?> | is_helpdesk) { echo "", $thread->replies, " | "; } else { echo "", $thread->replies, " | owner, "\">", $user->name, " | ", $thread->views, " | ", date('D M j, Y g:i a', $thread->timestamp), " | "; } ?>