"")) { $commId=$_REQUEST["commId"]; checkCommunityExists($commId); } else { header("Location: index.php"); die(); } function main() { $conn = db(); global $commId,$topicId,$config; $commRes=mysqli_fetch_object(mysqli_query($conn, "select * from pb_communities where pbid='$commId'")); $recPerPage=$config->pb_postsperpage; $strpass="&commId=".$commId; $topicQ=mysqli_query($conn, "select *,UNIX_TIMESTAMP(ondate) as postdate from pb_forum_topics where comid=$commId and pid=0 and pbdeleted='n' order by latestpost desc"); if(!isset($_REQUEST["pg"])) $pg=1; else $pg=$_REQUEST["pg"]; $rcount=mysqli_num_rows($topicQ); if ($rcount==0 ) { $pages=0; } else { $pages=floor($rcount / $recPerPage); if (($rcount%$recPerPage) > 0 ) { $pages=$pages+1; } } if($pg>$pages) $pg=$pages; $jmpcnt=1; while ( $jmpcnt<=($pg-1)*$recPerPage && $row = mysqli_fetch_object($topicQ) ) { $jmpcnt = $jmpcnt + 1; } ?>
1) { ?>
  Home > Communities > title; ?> > Forum
   Replies Views  Last Post
  pb_seo_title!="") $title=str_replace(" ","-",trim($forumRes->pb_seo_title)); else $title="topic"; ?>
  By