/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
ajax
/
officer_list
/
up file
home
<?php use function PHPSTORM_META\type; session_start(); include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $status = mysqli_real_escape_string($connection, $_POST['status']); $sql = "SELECT * FROM tbl_admin WHERE active_status = '$status'"; $res = mysqli_query($connection, $sql); $date = explode('/', $_POST['date']); $date = date('Y-m-d', strtotime($date['0'] . "-" . $date['1'] . "-" . $date['2'])); ?> <style> </style> <div class="table-responsive"> <table class="table table-striped dataTables-example table-bordered"> <thead> <tr> <th style="width: 10%;">รูป</th> <th style="width: 20%;">รายละเอียด</th> <th>บริษัท</th> <th style="width: 10%;">สถานะ</th> <th style="width: 10%;">จัดการ</th> </tr> </thead> <tbody> <?php $i = 1; while ($row = mysqli_fetch_assoc($res)) { ?> <tr id="tr_<?php echo $row['admin_id']; ?>"> <td> <img src="../main/upload/join/no-image.jpg" alt="" width="100px" height="120px"> </td> <td> ชื่อ : <?php echo $row['admin_name']; ?> <br> Usename : <?php echo $row['username']; ?> </td> <td> <?php echo $row['username']; ?> </td> <td> <button class="btn btn-xs w-100 <?php echo ($row['active_status'] == 1) ? 'btn-primary' : 'btn-danger'; ?>" onclick="ChangeStatus(this,'<?php echo $row['admin_id']; ?>')"> <?php echo ($row['active_status'] == 1) ? 'ใช้งาน' : 'ไม่ใช้งาน'; ?> </button> </td> <td> <button class="btn btn-info btn-xs w-100 mb-2" onclick="GetModalMenuAccess('<?php echo $row['admin_id']; ?>')">ตั้งค่าเมนู</button> <button class="btn btn-warning btn-xs w-100 mb-2" onclick="GetModalEdit('<?php echo $row['admin_id']; ?>')">แก้ไข</button> </td> </tr> <?php $i++; } ?> </tbody> </table> </div>