<?php session_start(); if(!$_SESSION['username']){ header('location:login.php'); } include 'mysql_connect.php'; ?> <a href="logout.php"><i class="glyphicon glyphicon-off"></i> logout </i></a> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div id="page-wrapper" style="min-height: 292px;"> <?php if(!empty($_POST['status'])){ if($_POST['status'] == 0){ $sql = "SELECT * FROM ma" } else if($_POST['status'] == 1){ $sql = "SELECT * FROM ma where status = 0" } else if($_POST['status'] == 2){ $sql = "SELECT * FROM ma where status = 1" } } else{ $sql = "SELECT * FROM ma" } $query = mysql_query($sql); ?> <td width="80%" valign="top" class="content"> <div class="row"> <div class="col-lg-12"> <h4 class="page-header">รายการ MA </h4> </div> <form name="form" method="post" action="approve_see.php"> <label> <select name="status" id="select" class="form-control input-sm"> <option value="0">ดูทั้งหมด</option> <option value="1">Not yet Approved</option> <option value="2">Approved</option> </select> </label> <input type="submit" name="button" id="button" class="btn btn-sm btn-success" value="ดู MA"> <br> <label></label> <br> <table class="table table-hover table-striped"> <tr> <th class="text-center" scope="col">เลขทะเบียนเครื่องคอมพิวเตอร์</th> <th class="text-center" scope="col">ชื่อผู้ใช้งาน</th> <th class="text-center" scope="col">นามสกุล</th> <th class="text-center" scope="col">ชื่อเครื่องคอม</th> <th class="text-center" scope="col">ฝ่าย/แผนก</th> <th class="text-center" scope="col">วันที่ตรวจ</th> </tr> <?php while($row=mysql_fetch_array($query)) { if($row['status'] == 0){ $status = '<span class="label label-default">Not yet Approved</span>'; } else if($row['status'] == 1){ $status = '<span class="label label-warning">Approved</span>'; } ?> <tr> <td align="center"><?= $row['asset'] ?></td> <td align="center"><?= $row['namethai'] ?></td> <td align="center"><?= $row['lastnamethai'] ?></td> <td align="center"><?= $row['comname'] ?></td> <td align="center"><?= $row['depart'] ?></td> <td align="center"><?= date("d/m/Y",strtotime($row['q18_4'])) ?></td> <td align="center"><a href="approve_seedetail.php?id=<?php echo $row['id']; ?>&chk=0" class="btn btn-sm btn-success"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></a></td> <form action="approve_seedetail.php" method="post"> <input type="hidden" name="<?= $id=$row['id']?>" id="" value="" > </form> </tr> <?php } ?> </table> </form> </div> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง