include "header.php"; ?> |
include "menu.php"; ?> |
เว็บบอร์ด ประกาศผลสอบ รายชื่อ สถานที่สอบ งานราชการ งานรัฐวิสาหกิจ |
 |
|
|
|
|
|
|
$sql="SELECT id, title, name, view, date, time FROM `board` WHERE sticky='1' ";
$re=mysql_query($sql) or die("ERROR บรรทัด 259");
$n=mysql_num_rows($re);
while($r=mysql_fetch_row($re)){
?>
|
|
$s2="select * from board_a where b_id='$r[0]'";
$re2=mysql_query($s2) or die("ERROR $s2 บรรทัด 298");
$n2=mysql_num_rows($re2);
echo "$n2";
?>
|
|
|
|
|
} ?>
$strSQL="SELECT id, title, name, view, date, time FROM `board` WHERE sticky='0' ";
$objQuery=mysql_query($strSQL) or die("ERROR บรรทัด 296");
$Num_Rows = mysql_num_rows($objQuery);
$Per_Page = 20; // 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;
}
$strSQL .=" order by id DESC LIMIT $Page_Start , $Per_Page";
$objQuery = mysql_query($strSQL);
while($objResult = mysql_fetch_row($objQuery))
{
?>
|
|
$s3="select * from board_a where b_id='$objResult[0]'";
$re3=mysql_query($s3) or die("ERROR $s3 บรรทัด 378");
$n3=mysql_num_rows($re3);
echo "$n3";
?>
|
|
|
|
|
} ?>
มี กระทู้ถาม - ตอบ ทั้งหมด
$num=$Num_Rows+$n; echo "$num";?>
กระทู้ : แสดงผลหน้าละ
กระทู้ จำนวนทั้งหมด
หน้า |
$pages = new Paginator;
$pages->items_total = $Num_Rows;
$pages->mid_range = 10;
$pages->current_page = $Page;
$pages->default_ipp = $Per_Page;
$pages->url_next = $_SERVER["PHP_SELF"]."?QueryString=value&Page=";
$pages->paginate();
echo $pages->display_pages()
?> |
|
|
|
|
background="../img/" } if($bannerr[3]!=""){ ?>bgcolor="#" } ?>> include "footer.php"; ?> |
|