/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
ajax
/
application
/
up file
home
<?php include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $start_no = mysqli_real_escape_string($connection, $_POST["start_no"]); $sql = "SELECT * FROM `tbl_storage` WHERE `start_no` = '$start_no' AND `storage_count` != 500;"; $result = mysqli_query($connection, $sql); if (mysqli_num_rows($result) == 1) { $row = mysqli_fetch_array($result); $end_no = $row["end_no"]; $list = []; $sqlMember ="SELECT * FROM `tbl_member` WHERE `storage_no` >= '$start_no' AND `storage_no` <= '$end_no' ORDER BY `storage_no` DESC"; $resultMember = mysqli_query($connection, $sqlMember); while ($rowMember = mysqli_fetch_array($resultMember)) { $data = [ "member_id"=> $rowMember["member_id"], "storage_no"=> $rowMember["storage_no"], "member_name"=> $rowMember["member_name"], ]; array_push($list, $data); } ?> <div class="ibox"> <div class="ibox-title text-center px-0"> คุณกำลังดำเนินการจัดเก็บแฟ้มหมายเลข <h3 class="text-primary"> <?php echo number_format($row['start_no']); ?> - <?php echo number_format($row['end_no']); ?> </h3> </div> <div class="ibox-content"> <div class="row"> <div class="col-md-6 col-12 text-center mb-3"> ดำเนินการไปแล้ว <h5 id="storage_count"><?php echo number_format($row['storage_count']); ?></h5> <input type="hidden" id="countNo" value="<?php echo ($row['storage_count']); ?>"> </div> <div class="col-md-6 col-12 text-center mb-3"> ลำดับถัดไป <h5 class="text-primary" id="storage_next"><?php echo number_format($row['start_no'] + $row['storage_count']); ?></h5> <input type="hidden" id="nextNo" value="<?php echo ($row['start_no'] + $row['storage_count']); ?>"> </div> </div> <div class="text-center mb-3"> <label for="inputQR">ยิง QR Code บนใบสมัคร หรือ พิมพ์เลขบัตรประชาชน</label> <input type="text" class="form-control text-center" id="inputQR"> </div> <table class="table table-bordered table-striped" id="tableData"> <thead> <tr> <th class="text-center">ลำดับจัดเก็บ</th> <th class="text-center">ชื่อ สกุล</th> <th class="text-center"></th> </tr> </thead> <tbody> <?php foreach ($list as $data): ?> <tr> <td class='text-center'><?php echo $data['storage_no']; ?></td> <td> <?php echo $data['member_name']; ?> </td> <td class='text-center'> <button class='btn btn-sm btn-danger deleteRowStorage' type='button' data-id='<?php echo $data['member_id']; ?>' onclick='deleteRowStorage(this);'> <i class="fa fa-close">ลบ</i> </button> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> <?php } ?>