/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
up file
home
<?php include('header.php'); ?> <body class="top-navigation"> <div id="wrapper"> <div id="page-wrapper" class="gray-bg"> <div class="wrapper wrapper-content animated fadeInRight"> <div class="ibox"> <div class="ibox-title"> <button class="btn btn-sm btn-primary" type="button" onclick="addFile();"> <i class="fa fa-plus"></i> เพิ่มแฟ้ม </button> </div> <div class="ibox-content"> <div class="table-responsive" id="showTable"></div> </div> </div> </div> </div> </div> <!--- init layout --> <?php include('footer.php'); ?> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg modal-dialog-centered"> <div class="modal-content animated fadeIn"> <div id="showModal"></div> </div> </div> </div> <script> $(document).ready(function () { getTable(); }); function getTable() { $.ajax({ type: "post", url: "ajax/application/table", data: {}, dataType: "html", success: function (response) { $("#showTable").html(response); $("#showTable table").dataTable({ ordering:false }); } }); } function addFile() { swal({ title: 'กรุณายืนยันเพื่อทำรายการ', type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', cancelButtonText: 'ยกเลิก', confirmButtonText: 'ยืนยัน', closeOnConfirm: false }, function() { $.ajax({ type: "post", url: "ajax/application/addFile", data: {}, dataType: "json", success: function (response) { if (response.status == 1) { swal({ title: "แจ้งเตือน", text: "ดำเนินการสำเร็จ", type: "success" }, function() { getTable(); }) } else { swal({ title: "แจ้งเตือน", text: "ติดต่อเซิฟเวอร์ไม่สำเร็จกรุณาลองอีกครั้ง", type: "error" }) } } }); }); } </script> </body> </html>