File size: 1.07Kb
<?php
session_start();
include('wap_common.php');
wapheader();
if(!isset($HTTP_GET_VARS['forum'])){
start_card("error","Error");
print("<p> No Forum Specified. Hit the BACK button on your browser </p>");
}
else{
$forum=$HTTP_GET_VARS['forum'];
$sql="SELECT topic_id, forum_id, topic_title, topic_replies FROM " . $TABLE_PREFIX. "topics WHERE forum_id = '" . $forum . "' ORDER BY topic_id DESC LIMIT " .$NUM_TOPICS_LIST;
start_card("posts","Post Lising");
//print($sql);
$result=$db->sql_query($sql);
if(!$result) print ("<p>No Posts Found</p>");
while( $row=$db->sql_fetchrow($result)){
print("<p><a href=\"wap_view_posts.php?topic=" . $row['topic_id'] . "\">" . $row['topic_title'] . "</a></p>");
print("<p>Total " . $row['topic_replies'] . " Replies.</p>");
}
print ("<p>End of Listing</p>");
print("<p><a href=\"wap_post.php?op=new&forum=" . $forum . "\">Post New Topic</a></p>");
print("<p><a href=\"wap_index.php\">Main Menu</a></p>");
}
end_card();
print("</wml>");
?>