<?php include "config.inc.php"; include "adodb5/adodb.inc.php"; $conn=NewADOConnection('mysql'); $conn->Connect($db_host,$db_user,$db_pass,$db_name); $conn->Execute($db); $sql = "select * from namesent"; $result = $conn->Execute($sql); echo "<table border='1' >"; echo "<tr>"; echo "<td align='center' width='300' align='center'font color='993300'><h6>เธซเธฑเธงเธเนเธญ</h6></td>"; echo "<td align='center' width='300' align='center' font color='993300'><h6>เธฃเธฒเธขเธฅเธฐเน€เธญเธตเธขเธ”</h6></td>"; echo "<td align='center' width='300' align='center' font color='993300'><h6>เธเธณเธซเธเธ”เธชเนเธ</h6></td>"; echo "</tr>"; $Num_Rows = $result->RecordCount(); $Per_Page = 2; // 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.=" order by namesent DESC LIMIT $Page_Start , $Per_Page"; while (!$result->EOF) { echo "<td align='center' width='400' >".$result->fields['name_th']."</td>"; echo "<td align='center' width='400' >".$result->fields['detail']."</td>"; echo "<td align='center' width='400' >".$result->fields['time_send']."</td>";?> <?php $result->MoveNext(); echo "</tr>"; } echo "</table>"; print "<font color='#0099FF'><br>เธซเธเนเธฒเธ—เธฑเนเธเธซเธกเธ” = $Num_Pages เธซเธเนเธฒเธเธฑเธเธเธธเธเธฑเธ =</font>"; if($Prev_Page) { echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><font color='#0099FF'><< Back</font></a> "; } for($i=1; $i<=$Num_Pages; $i++){ if($i != $Page) { echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'><font color='#0099FF'>$i</font></a> ]"; } else { echo "<b><font color='#0099FF'> $i </font></b>"; } } if($Page!=$Num_Pages) { echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'><font color='#0099FF'>Next>></font></a> "; } ?>
<?php include "config.inc.php"; include "adodb5/adodb.inc.php"; $conn=NewADOConnection('mysql'); $conn->Connect($db_host,$db_user,$db_pass,$db_name); $conn->Execute($db); $sql = "select * from namesent"; $result = $conn->Execute($sql); echo "<table border='1' >"; echo "<tr>"; echo "<td align='center' width='300' align='center'font color='993300'><h6>หัวข้อ</h6></td>"; echo "<td align='center' width='300' align='center' font color='993300'><h6>รายละเอียด</h6></td>"; echo "<td align='center' width='300' align='center' font color='993300'><h6>กำหนดส่ง</h6></td>"; echo "</tr>"; $Num_Rows = $result->RecordCount(); $Per_Page = 2; // 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.=" order by namesent DESC LIMIT $Page_Start , $Per_Page"; while (!$result->EOF) { echo "<td align='center' width='400' >".$result->fields['name_th']."</td>"; echo "<td align='center' width='400' >".$result->fields['detail']."</td>"; echo "<td align='center' width='400' >".$result->fields['time_send']."</td>";?> <?php $result->MoveNext(); echo "</tr>"; } echo "</table>"; print "<font color='#0099FF'><br>หน้าทั้งหมด = $Num_Pages หน้าปัจจุบัน =</font>"; if($Prev_Page) { echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><font color='#0099FF'><< Back</font></a> "; } for($i=1; $i<=$Num_Pages; $i++){ if($i != $Page) { echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'><font color='#0099FF'>$i</font></a> ]"; } else { echo "<b><font color='#0099FF'> $i </font></b>"; } } if($Page!=$Num_Pages) { echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'><font color='#0099FF'>Next>></font></a> "; } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง