Размер файла: 1.3Kb
<?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("<do type=\"accept\" label=\"Post New Topic\">");
print("<go href=\"wap_post.php\" method=\"post\">");
print("<postfield name=\"topic\" value=\"$viewtopic\" />");
print("<postfield name=\"forum\" value=\"$forum\" />");
print("<postfield name=\"op\" value=\"new\" />");
print("</go>");
print("</do>");
print("<p><a href=\"wap_index.php\">Main Menu</a></p>");
}
end_card();
print("</wml>");
?>