include '../header2_inc.php';
print '
ARCHIVED FORUM: Gurdwara Tapoban Sahib
';
print "Forum Posts ";
print "Return to Newer Forum
";
$page=$_REQUEST['p'];
if ($page =='') $page = 1;
else $page = intval($page);
$limit = 100;
$offset = 100*$page;
mysql_select_db ("$DBPhorumName");
$SQL ="SELECT DISTINCT thread, subject, author, min(datestamp) as date FROM tap_1__messages WHERE status=2 GROUP BY thread ORDER by message_id DESC LIMIT $page, $offset";
$phorumresults = mysql_query($SQL);
$num_of_rows = mysql_num_rows($phorumresults) or $emptyString="No information available.";
print "";
print "| Title | Author | Date |
";
if ($num_of_rows > 0) {
for ($recno=1;$recno<=$num_of_rows;$recno++){
$phorumrow = mysql_fetch_array ($phorumresults);
$phorum_title = substr($phorumrow['subject'],0,34);
$phorum_title= str_replace("“","\"",$phorum_title);
$phorum_title= str_replace("”","\"",$phorum_title);
$phorum_title= str_replace("‘","'",$phorum_title);
$phorum_title= str_replace("’","'",$phorum_title);
if ($recno & 1 ) $color='lightgrey';
else $color='white';
print "| $phorum_title | ".$phorumrow['author']." | ".date("n/d/Y g:i a",$phorumrow['date'])." |
";
}
}
print "
";
?>
0){?>-1}?>
=0 && $num_of_rows==$limit){?> | }?>
1}?>
include '../footer_inc.php'?>