include("top_news.php"); ?>
Show all articles
Show articles from last one week
Show articles from last two week
Show articles from last three week
Show articles from last one month
Show articles from last two months
Show articles from last six months
Show articles from last one year
Status
Topic
Author
Replie s
Clicks
Recent Reply
$sql_category="select * from bbs_article where firstclass_id='$firstclassid'";
$query_category=mysql_query($sql_category, $connect);
if ($query_category){
$result=mysql_num_rows($query_category); //get record number
$pagesize=10; //8 record per page
$pages=ceil($result/$pagesize); //get pages
if($currentpage<1) $currentpage=1; //Dispaly first page
if($currentpage>$pages) $currentpage=$pages; //if $page beyond, display last page
$offset=($currentpage-1)*$pagesize;
$recno=0;
}
else{
$result=0;
$pages=0;
}
$sql_category=$sql_category." limit ".$offset.",".$pagesize;
$query_category=mysql_query($sql_category, $connect);
$rowcount = 0;
$num=0;
while($array_category=mysql_fetch_array($query_category)){
echo "";
echo " ";
echo "";
if ($array_category["content_mode"]){
echo " ";
}
echo "".$array_category["content_entitle"]." ";
echo " ".$array_category["user"]." ";
$sql_reply="select * from bbs_reply where article_id=".$array_category["content_id"]." order by reply_time" ;
$query_reply=mysql_query($sql_reply, $connect);
$array_reply=mysql_fetch_array($query_reply);
$reply_num=mysql_num_rows($query_reply);
echo "".$reply_num." ";
echo "".$array_category["hits"]." ";
if($array_reply=mysql_fetch_array($query_reply)){
echo ""."[ ".$array_reply["reply_user"]." ]".""." ";
echo date(Y, $array_reply["reply_time"])."-".date(m, $array_reply["reply_time"])."-".date(d, $array_reply["reply_time"]);
echo " ";
}
else{
echo " ";
}
echo " ";
}
?>
[Total of articles:
echo $result; ?>]
Sort by :
1