$pages)) { $page=$pages; } $query="SELECT topic FROM bbs_topics WHERE id=".$which; $result=mysql_query($query); $topictitle=htmlcleanonerow(mysql_result($result,0)); $query="SELECT bbs_posts.post,bbs_posts.author,bbs_posts.added,users.nickname,users.avatar,users.level FROM bbs_posts,users WHERE bbs_posts.author=users.id AND bbs_posts.topic=".$which." ORDER BY bbs_posts.added ASC"; $query.=" LIMIT ".(($page-1)*$posts_per_page).",".$posts_per_page; $result=mysql_query($query); while($tmp=mysql_fetch_assoc($result)) { $replies[]=$tmp; } // place page & topic related infos into a global object so it can be used in displayPageLinks() $GLOBALS['pageAndTopicInfos'] = array( 'page'=>$page, 'pages'=>$pages, 'which'=>$which, 'com'=>$com ); /* * displayPageLinks * add the TR with the links to the pages ( first/previous/next/last/dropdown ) * * added on 2007/04/14 by p01 */ function displayPageLinks() { // make a local copy of the 'pageAndTopicInfos' foreach( $GLOBALS['pageAndTopicInfos'] as $key=>$val ) $$key = $val; ?>

1 ) { ?> 1 && $pages>0 ) { ?> first page
1 ) { ?> previous page

 

last page
next page


">">
 
here"); } else { print(parse_message($replies[$i]["post"])); } ?>
added on the by ">  
">" width="16" height="16" border="0" alt="" title="">

post a new reply
message:

BB Code is allowed here

post a new reply
You need to be logged in to post a new reply :: register here