/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
ajax
/
application
/
up file
home
<?php include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $list = []; $sql = "SELECT * FROM `tbl_storage` ORDER BY `start_no` DESC"; $result = mysqli_query($connection, $sql); while ($row = mysqli_fetch_assoc($result)) { $storage_balance = (500 - $row["storage_count"]); $data = [ "start_no"=> $row["start_no"], "end_no"=> $row["end_no"], "storage_count"=> $row["storage_count"], "storage_balance"=> $storage_balance, ]; array_push($list, $data); } ?> <table class="table table-striped table-bordered"> <thead> <tr> <th class="text-left">เริ่มต้น</th> <th class="text-left">สิ้นสุด</th> <th class="text-right">ดำเนินการแล้ว</th> <th class="text-right">คงเหลือ</th> <th class="text-center"></th> </tr> </thead> <tbody> <?php foreach ($list as $row): ?> <tr> <td><?php echo $row['start_no']; ?></td> <td><?php echo $row['end_no']; ?></td> <td class="text-right"><?php echo number_format($row['storage_count']); ?></td> <td class="text-right"><?php echo number_format($row['storage_balance']); ?></td> <td class="text-center"> <div class="btn-group"> <?php if ($row['storage_count'] < 500): ?> <a href="application_update?start=<?php echo $row['start_no']; ?>" class="btn btn-sm btn-primary"><i class="fa fa-file-text-o"></i> จัดเก็บเอกสาร</a> <?php endif; ?> <button class="btn btn-sm btn-success" type="button"><i class="fa fa-search"></i> ดูรายการ</button> </div> </td> </tr> <?php endforeach; ?> </tbody> </table>