$Num_Pages) || ($Page<0)) print "
จำนวน $Page มากกว่า $Num_Pages เกิดการผิดพลาด
"; $sql .= " Order by date_news Desc LIMIT $Page_start , $Per_Page"; ?> "; echo "
"; echo "
"; echo type_name($type); echo " ย้อนหลังทั้งหมด
"; echo ""; //ส่วนแสดงผล $result= mysql_query($sql) or die(mysql_error()); $num=mysql_num_rows($result); if($num>0){ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //เริ่มโค้ดปักหมุด if($Page<2){ $sql2= "select * From news Where type_news='$type' and status_news='s' and fix_news='s' "; $result2= mysql_query($sql2) or die(mysql_error()); $num2=mysql_num_rows($result2); if($num2>0){ $no=1; While($row2= mysql_fetch_array($result2)) { $id=$row2["id_news"]; $title = $row2["title_news"]; $dayn = $row2["date_news"]; $count=$row2["count_click"]; $day=date("Y-m-d",$dayn); echo ""; } else { echo " bgcolor=\"\" >"; } echo ""; echo ""; echo ""; echo ""; echo ""; $no++; } } } // สิ้นสุดโค้ดปักหมุด $no=1; $on=$Page_start+1; While($row= mysql_fetch_array($result)) { $id=$row["id_news"]; $title = $row["title_news"]; $dayn = $row["date_news"]; $count=$row["count_click"]; $day=date("Y-m-d",$dayn); echo ""; } else { echo " bgcolor=\"\" >"; } echo ""; echo ""; echo ""; echo ""; echo ""; $no++; $on++; } } echo "
"; echo "ลำดับ"; echo " "; echo "หัวข้อข่าว "; echo "วันที่ป้อน "; echo "อ่าน
"; echo "ปักหมุด"; echo "   "; echo ""; echo $title; echo " "; echo dateThai($day); echo " "; echo $count; echo "
"; echo $on; echo "   "; echo ""; echo $title; echo " "; echo dateThai($day); echo " "; echo $count; echo "
"; ?>

พบทั้งหมด รายการ : : รวมทั้งหมด : หน้า : \"หน้าแรก\""; if($Prev_Page) echo " \"ย้อนกลับ\" "; for($i=1; $i<$Num_Pages; $i++){ if($i != $Page) echo "[$i]"; else echo " $i "; } /*สร้างปุ่มเดินหน้า */ if($Page!=$Num_Pages) echo " \"หน้าถัดไป\" "; if($Page!=$Num_Pages) echo " \"หน้าสุดท้าย\" "; mysql_close(); ?>