$content_id=$_GET[board_id];
$no5=0;
include "connect.php";
include "function.php";
//¼ÙéªÁ
$sql="select * from webboard_content where content_id='$content_id'";
$result5=mysql_db_query($dbname,$sql);
$num5=mysql_num_rows($result5);
$r5=mysql_fetch_array($result5);
$content_view=$r5[content_view];
$submit=$content_view+1;
$sql="update webboard_content set content_view='$submit' where content_id='$content_id'";
mysql_db_query($dbname,$sql);
$sql="select * from webboard_answer where answer_content_id ='$content_id' order by answer_id ";
$result5=mysql_db_query($dbname,$sql);
$num5=mysql_num_rows($result5);
// $sql="select * from group_trade order by trade_access desc ";
//$result5=mysql_db_query($dbname,$sql);
// $num5=mysql_num_rows($result5);
$Num_Rows = mysql_num_rows($result5);
$Per_Page = 30; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$sql .="LIMIT $Page_Start , $Per_Page";
$result5=mysql_db_query($dbname,$sql);
?>
�ͺ
���
//=$Num_Pages;?>
if($Num_Rows<>0){?>
Page :
if($Prev_Page)
{
echo " << Back ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ $i ]";
}
else
{
echo " $i ";
}
}
if($Page!=$Num_Pages)
{
echo " Next>> ";
}
}//if Num_Rows
?>
$no6=0;
$sql="select * from webboard_content where content_id='$content_id'";
$result6=mysql_db_query($dbname,$sql);
$num6=mysql_num_rows($result6);
?>
if($num6>0){
while ($r6=mysql_fetch_array($result6)){
$content_id=$r6[content_id];
$content_member_id=$r6[content_member_id];
$content_title=$r6[content_title];
$content_detail=$r6[content_detail];
$content_view=$r6[content_view];
//$content_dateadded=displaydate($r6[content_dateadded]);
$content_dateadded=$r6[content_dateadded];
$no5++;
//��ҷ���ͧ������ ���ç����Ѻ������
?>
if($a_picture<>""){ ?>
}?>
|
|
}//while
}//if on while
?>
if($num5>0){
while ($r5=mysql_fetch_array($result5)){
$answer_id =$r5[answer_id];
$answer_member_id =$r5[answer_member_id];
$answer_content_id =$r5[answer_content_id];
$answer_detail =$r5[answer_detail];
$answer_dateadded =$r5[answer_dateadded];
$no5++;
//��ҷ���ͧ������ ���ç����Ѻ������
?>
if($a_picture<>""){ ?>
}?>
|
|
}//while
}//if on while
?>
�ͺ
���
//=$Num_Pages;?>
if($Num_Rows<>0){?>
Page :
if($Prev_Page)
{
echo " << Back ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ $i ]";
}
else
{
echo " $i ";
}
}
if($Page!=$Num_Pages)
{
echo " Next>> ";
}
}//if Num_Rows
?>