aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-05-07 23:04:16 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-05-07 23:04:16 +0000
commit2efd2e97b8389124cad52b7ab544ca1c92ef3c26 (patch)
treee65708b612ff5845d9b753f06d14bffa0f87eb94 /phpBB/viewforum.php
parent2d6c9177442e6509841d0c2dc7a93268e21c2935 (diff)
downloadforums-2efd2e97b8389124cad52b7ab544ca1c92ef3c26.tar
forums-2efd2e97b8389124cad52b7ab544ca1c92ef3c26.tar.gz
forums-2efd2e97b8389124cad52b7ab544ca1c92ef3c26.tar.bz2
forums-2efd2e97b8389124cad52b7ab544ca1c92ef3c26.tar.xz
forums-2efd2e97b8389124cad52b7ab544ca1c92ef3c26.zip
Added generate_pagination routine
git-svn-id: file:///svn/phpbb/trunk@265 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php40
1 files changed, 8 insertions, 32 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 98c55cf796..7f0d727668 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -6,7 +6,8 @@
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
- * $Id$ *
+ * $Id$
+ *
*
***************************************************************************/
@@ -89,6 +90,7 @@ if(!$forum_row)
$forum_name = stripslashes($forum_row[0]["forum_name"]);
$topics_count = $forum_row[0]["forum_topics"];
+
for($x = 0; $x < $db->sql_numrows($result); $x++)
{
if($x > 0)
@@ -197,39 +199,13 @@ if($total_topics)
"LAST_POST_USER" => $last_post_user,
"U_VIEW_TOPIC" => $view_topic_url,
- "U_LAST_POST_USER_PROFILE" => $last_post_profile_url));
- }
-
- $count = 1;
- $next = $start + $board_config['topics_per_page'];
- if($topics_count > $board_config['topics_per_page'])
- {
- if($next < $topics_count)
- {
- $pagination = "<a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id&start=$next")."\">$l_nextpage</a> | ";
- }
- for($x = 0; $x < $topics_count; $x++)
- {
- if(!($x % $board_config['topics_per_page']))
- {
- if($x == $start)
- {
- $pagination .= "$count";
- }
- else
- {
- $pagination .= " <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id&start=$x")."\">$count</a> ";
- }
- $count++;
- if(!($count % 20))
- {
- $pagination .= "<br>";
- }
- }
- }
+ "U_LAST_POST_USER_PROFILE" => $last_post_profile_url)
+ );
}
+
$template->assign_vars(array(
- "PAGINATION" => $pagination));
+ "PAGINATION" => generate_pagination("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id", $topics_count, $board_config['topics_per_page'], $start))
+ );
$template->pparse("body");
}
else