<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <?php include 'header.php'; ?> <!----------------------------------------------------------------------------------------------------> <?php // Connects to your Database $objConnect = mysql_connect("localhost","root","123456789") or die("Error Connect to Database"); $objDB = mysql_select_db("com"); $data = mysql_query("SELECT * FROM login order by login_id DESC "); $Num_Rows = mysql_num_rows($data); $Per_Page = 3; // 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; } $data .=" order by login_id ASC LIMIT $Page_Start , $Per_Page"; $data = mysql_query($info); echo "<table class='table table-hover'>"; echo "<tr class='info'> <th>ลำดับ</th> <th>Username</th> <th>Password</th> <th>ชื่อ</th> <th>นามสกุล</th> <th>ตำแหน่ง</th> <th>สังกัด</th> <th>เบอร์โทร</th> <th>สถานะ</th> <th>การอนุมัติ</th> </tr>"; while($info = mysql_fetch_array( $data )) { print "<tr><td>".$info['login_id'] . "</td>"; print "<td>".$info['login_user'] . "</td>"; print "<td>".$info['login_pass'] ."</td>"; print "<td>".$info['login_name1'] ."</td>"; print "<td>".$info['login_name2'] ."</td>"; print "<td>".$info['login_info1'] ."</td>"; print "<td>".$info['login_info2'] ."</td>"; print "<td>".$info['login_status'] ."</td>"; print "<td>".$info['login_phone'] ."</td>"; if($info['login_status'] == 2){ print "<td><a href='admin/frm_statusmemberphp?login_id=$info[login_id]' class='btn btn-info'> <span class='glyphicon glyphicon-pencil' aria-hidden='true'></span>admin</a></td>"; } elseif($info['login_status'] == 1){ print "<td><a href='admin/frm_statusmember.php?login_id=$info[login_id]' class='btn btn-warning'> <span class='glyphicon glyphicon-pencil' aria-hidden='true'></span>สมาชิก</a></td>"; } elseif($info['login_status'] == 0){ print "<td><a href='admin/frm_statusmember.php?login_id=$info[login_id]' class='btn btn-success'> <span class='glyphicon glyphicon-pencil' aria-hidden='true'></span>รออนุมัติ</a></td>"; } } print "</tr></table>"; /// END PAGE NAVI ZONE ?> <br> Total <?= $Num_Rows;?> Record : <?=$Num_Pages;?> Page : <? if($Prev_Page) { echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< Back</a> "; } for($i=1; $i<=$Num_Pages; $i++){ if($i != $Page) { echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]"; } else { echo "<b> $i </b>"; } } if($Page!=$Num_Pages) { echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Next>></a> "; } mysql_close(); ?> </body> </html> <!---------------------------------------------------------------------------------------------------->
$data = mysql_query("SELECT * FROM login order by login_id DESC "); $data .=" order by login_id ASC LIMIT $Page_Start , $Per_Page";
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง