/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
ajax
/
setting_bank
/
up file
home
<?php include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $bank_id = mysqli_real_escape_string($connection, $_POST['id']); $sql = "SELECT * FROM tbl_bank WHERE bank_id = '$bank_id'"; $res = mysqli_query($connection, $sql); $row = mysqli_fetch_assoc($res); ?> <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"> <form id="form_edit" method="post" enctype="multipart/form-data"> <input type="hidden" name="bank_id" id="bank_id" value="<?php echo $bank_id; ?>"> <div class="row"> <div class="col-lg-12 mb-2" style="text-align:center;"> <div class="form-group"> <div class="BroweForFile"> <label for="logo_image"><strong>โลโก้ธนาคาร</strong></label> <div id="logo_image"><label for="logo_img"> <a><img id="blah1" src="img/<?php echo $row['logo'] == '' ? 'AddFile.png' : $row['logo'] ?>" width="100px" height="100px" /></a></label> </div><br /> <input type="file" id="logo_img" name="logo_image" onchange="readURL(this);" style="display: none;"> </div> </div> </div> <div class="col-lg-12 mb-2"> <div class="form-group"> <label>ชื่อธนาคาร</label> <input type="text" name="bank_name" class="form-control" id="bank_name" value="<?php echo $row['bank_name']; ?>"> </div> </div> <div class="col-lg-12 mb-2"> <div class="form-group"> <label>ชื่อบัญชี</label> <input type="text" name="account_name" class="form-control" id="account_name" value="<?php echo $row['account_name']; ?>"> </div> </div> <div class="col-lg-12 mb-2"> <div class="form-group"> <label>หมายเลขบัญชี</label> <input type="text" name="account_number" class="form-control" id="account_number" value="<?php echo $row['account_number']; ?>"> </div> </div> <!-- <div class="col-lg-12 mb-2" style="text-align:center;"> <div class="form-group"> <div class="BroweForFile"> <label for="qr_image"><strong>QR Code สแกนชำระเงิน</strong></label> <div id="qr_image"><label for="qr"> <a><img id="blah2" src="img/<?php echo $row['logo'] == '' ? 'AddFile.png' : $row['bank_qrcode'] ?>" width="150px" height="150px" /></a></label> </div><br /> <input type="file" id="qr" name="qr_image" onchange="readURL2(this);" style="display: none;"> </div> </div> </div> --> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick="EditBank();"><i class="fa fa-check"></i> บันทึก</button> <button type="button" class="btn btn-white" data-dismiss="modal">ปิด</button> </div> </form> <script> function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { if (input.files[0]['type'] == "application/pdf") { $('#blah1').attr('src', 'images/file_svg/pdf.svg'); } else { $('#blah1').attr('src', e.target.result); } } reader.readAsDataURL(input.files[0]); } } function readURL2(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { if (input.files[0]['type'] == "application/pdf") { $('#blah2').attr('src', 'images/file_svg/pdf.svg'); } else { $('#blah2').attr('src', e.target.result); } } reader.readAsDataURL(input.files[0]); } } </script>