/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
ajax
/
payment_status
/
up file
home
<?php session_start(); include("../../../config/main_function.php"); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $member_id = mysqli_real_escape_string($connection, $_POST['member_id']); $temp_id = explode(".", $member_id); $member_id = bigsara_decode($temp_id[0], $temp_id[1]); $sql = "SELECT a.member_code, b.* FROM tbl_member a LEFT JOIN tbl_member_payment b ON b.member_id = a.member_id WHERE a.member_id ='$member_id' ORDER BY create_datetime DESC"; $res = mysqli_query($connection, $sql); ?> <div class="table-responsive"> <table class="table table-striped dataTables-example table-bordered" id="filterTable"> <thead> <!-- <tr> <th style="width: 1%;">#</th> <th style="width: 20%;">วันที่สมัคร</th> <th style="width: 20%;">วันที่ทำรายการ</th> <th class="text-center" style="width: 15%;">หลักฐานการชำระเงิน</th> <th class="text-center" style="width: 10%;">สถานะ</th> </tr> --> <tr> <th style="width: 1%;">#</th> <th style="width: 20%;">วันที่สมัคร</th> <th style="width: 20%;">การชำระเงิน</th> <th>ใบเสร็จ</th> <th>ความเป็นสมาชิก</th> <th>บัตรสมาชิก</th> </tr> </thead> <tbody> <?php $i = 1; while ($row = mysqli_fetch_assoc($res)) { ?> <tr> <td><?php echo $i; ?></td> <td><?php echo date('d/m', strtotime($row['create_datetime'])) . '/' . date('Y', strtotime($row['create_datetime'] + 543)) ?></td> <td> <?php if (empty($row['transfer_date'])) { ?> <button class="btn btn-warning btn-md " style="width: 100%;" onclick="GetModalEdit('<?php echo $row['payment_id'] ?>')">รอชำระเงิน</button> <?php } else { ?> <button class="btn btn-info btn-lg" style="width: 100%;" onclick="GetModalEdit('<?php echo $row['payment_id'] ?>')">ชำระเงินแล้ว</button> <?php } ?> </td> <td class="text-center"> <div class="alert alert-danger text-center">X</div> </td> <td> <?php if (empty($row['member_code'])) { ?> <div class="alert alert-warning text-center">รออนุมัติ</div> <!-- <button class="btn btn-warning btn-sm" style="width: 100%;">รออนุมัติ</button> --> <?php } else { ?> <div class="alert alert-info text-center">รออนุมัติ</div> <!-- <button class="btn btn-info btn-sm" style="width: 100%;">อนุมัติแล้ว</button> --> <?php } ?> </td> <td class="text-center"> <div class="alert alert-danger text-center">X</div> </td> </tr> <!-- <tr> <td><?php echo $i; ?></td> <td><?php echo date('d/m', strtotime($row['create_datetime'])) . '/' . date('Y', strtotime($row['create_datetime'] + 543)) ?></td> <td><?php echo date('d/m', strtotime($row['transfer_date'])) . '/' . date('Y', strtotime($row['transfer_date'] + 543)) ?></td> <td> <?php if (empty($row['transfer_date'])) { ?> <button class="btn btn-warning btn-sm" style="width: 100%;" onclick="GetModalEdit('<?php echo $row['payment_id'] ?>')">รอชำระเงิน</button> <?php } else { ?> <button class="btn btn-info btn-sm" style="width: 100%;" onclick="GetModalEdit('<?php echo $row['payment_id'] ?>')">ชำระเงินแล้ว</button> <?php } ?> </td> <td class="text-center"> <?php if (empty($row['transfer_date'])) { ?> <div class='alert alert-warning'>รอชำระเงิน</div> <div class="bg-warning text-white p-1 rounded">รอชำระเงิน</div> <?php } else { if ($row['approve_result'] == '') { ?> <div class="bg-warning text-white p-1 rounded">รออนุมัติ</div> <?php } elseif ($row['approve_result'] == '1') { ?> <div class="bg-primary text-white p-1 rounded">อนุมัติ</div> <?php } elseif ($row['approve_result'] == '0') { ?> <div class="bg-danger text-white p-1 rounded">ปฎิเสธ</div> <?php } } ?> </td> </tr> --> <?php $i++; } ?> </tbody> </table> </div> <?php mysqli_close($connection); ?>