/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
ajax
/
setting_slide
/
up file
home
<?php include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $admin_id = mysqli_real_escape_string($connection, $_POST['admin_id']); $temp = explode(".", $admin_id); $admin_id = bigsara_decode($temp[0], $temp[1]); $slide_id = randomCode2(10); ?> <style> .select2-close-mask { z-index: 2099; } .select2-dropdown { z-index: 3051; } </style> <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_slide" method="post"> <input type="hidden" name="slide_id" id="slide_id" class="form-control" value="<?php echo $slide_id; ?>" readonly> <input type="hidden" name="create_user_id" id="create_user_id" class="form-control" value="<?php echo $admin_id; ?>" readonly> <div class="row"> <div class="col-lg-12 mb-2" style="text-align:center;"> <div class="form-group"> <div class="BroweForFile"> <!-- <label for="slide_image"><strong>ไฟล์ (ขนาดแนะนำ 1900 X 500)</strong></label> --> <div id="show_image"><label for="upload_file"> <a><img id="blah" src="img/AddFile.png" width="250px" height="250px" /></a></label> </div><br /> <input type="file" id="upload_file" name="slide_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="link_slide" id="link_slide" class="form-control" value=""> </div> </div> <div class="col-lg-12"> <div class="form-group"> <div> <label>สิทธิ์การมองเห็น ตามระดับสมาชิก</label> </div> <input type="checkbox" value="1" name="visitors"> ผู้เยี่ยมชม <input type="checkbox" value="1" name="general"> สมาชิกทั่วไป <input type="checkbox" value="1" name="extraordinary"> สมาชิกวิสามัญ <input type="checkbox" value="1" name="ordinary"> สมาชิกสามัญ </div> </div> <div class="col-lg-12"> <div class="form-group"> <div> <label>สิทธิ์การมองเห็น ตามประเภทสมาชิก</label> </div> <input type="checkbox" value="1" name="employer"> นายจ้าง <input type="checkbox" value="1" name="company"> บนจ. <input type="checkbox" value="1" name="agency"> Agency <input type="checkbox" value="1" name="worker"> แรงงาน </div> </div> --> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick="save_slide();"><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") { $('#blah').attr('src', 'images/file_svg/pdf.svg'); } else { $('#blah').attr('src', e.target.result); } // $('#blah_name').text(input.files[0]['name']); } reader.readAsDataURL(input.files[0]); } } </script>