id ?>>

title ?>
Forum

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; ?>

getThreads($_GET['start'], $n, $sort_style); while($thread = getNextThread($threads)): $user = getUser($thread->owner); ?>
Titles Replies Author Views Last Post
title) ?> replies ?> name ?> views ?> timestamp) ?>

threads > $n) echo $gotoStr; ?>