/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
up file
home
<?php include('header.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); ?> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/signature_pad/1.5.3/signature-pad.min.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/signature_pad/1.5.3/signature_pad.min.js"></script> <body class="top-navigation"> <div id="wrapper"> <div id="page-wrapper" class="gray-bg px-0"> <div id="Loading"> <div class="spiner-example"> <div class="sk-spinner sk-spinner-wave"> <div class="sk-rect1"></div> <div class="sk-rect2"></div> <div class="sk-rect3"></div> <div class="sk-rect4"></div> <div class="sk-rect5"></div> </div> </div> </div> <div id="show_form" class="mt-5"></div> </div> </div> <?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-body"> <div class="modal-content animated fadeIn"> <div id="showModal"></div> </div> </div> </div> </div> <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-sm modal-dialog-centered"> <div class="modal-content animated fadeIn"> <div class="modal-header"> <h4 class="modal-title">รูปภาพ</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <div class="row"> <div class="col-lg-12 mb-2"> <div class="form-group"> <img id="example_image" src="" style="width:100%;"> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> ปิด</button> </div> </div> </div> </div> <script> $(document).ready(function() { GetForm() }); function GetForm() { $.ajax({ type: "POST", url: "ajax/company_info/form_add.php", dataType: "html", success: function(response) { $("#Loading").hide(); $("#show_form").html(response); $(".select2").select2({ width: "100%" }); } }); } function selectZipCode() { var zipcode = $('#zipcode').val(); $.ajax({ type: "GET", data: { postcode: zipcode, nameform: 'company_district_id', namefn: 'company' }, dataType: 'json', url: "ajax/join/getpostcode.php", success: function(response) { if (response.status == 200) { $('#show_district2').html(response.data.district); $('#show_ampoe2').html(response.data.amphoe); $('#show_province2').html(response.data.province); } else if (response.status == 500) { swal({ title: "คำเตือน", text: response.message, type: "warning" }); $('#zipcode').val(null); $('#show_district2').html(response.data.district); $('#show_ampoe2').html(response.data.amphoe); $('#show_province2').html(response.data.province); } $(".select2").select2({ width: "100%" }); } }); } function company_districtChange() { let company_district_id = $("#company_district_id").val(); $.ajax({ type: "post", url: "ajax/join/getdistric.php", data: { district_id: company_district_id, }, dataType: "json", success: function(response) { $('#show_ampoe2').html(response.data.amphoe); $('#show_province2').html(response.data.province); } }); } function InfoAdd() { let formData = new FormData($("#form_add")[0]); $.ajax({ type: "POST", url: "ajax/company_info/add_company_info.php", data: formData, cache: false, processData: false, contentType: false, dataType: "json", success: function(data) { if (data.result == 1) { swal({ title: 'บันทึกข้อมูลสำเร็จ', type: 'success', showConfirmButton: false, timer: 1500 }, function() { swal.close(); $("#myModal").modal('hide'); window.location.href = 'company_info' }); } else if (data.result == 0) { swal({ title: 'แจ้งเตือน', text: 'เกิดข้อผิดพลาด กรุณาลองใหม่', type: 'warning', showConfirmButton: false, timer: 1500 }); } else if (data.result == 9) { swal({ title: 'แจ้งเตือน', text: 'ไม่สามารถติดต่อเซิฟเวอร์ได้ กรุณาลองใหม่อีกครั้ง', type: 'warning', showConfirmButton: false, timer: 1500 }); } } }); } </script> </body> </html>