/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
backoffice
/
ajax
/
blog_setting
/
up file
home
<?php session_start(); include("../../../config/main_function.php"); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $blog_id = $_POST["blog_id"]; $content_type = $_POST["content_type"]; ?> <div class="modal-header"> <h4 class="modal-title">เพิ่มเนื้อหา</h4> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> </div> <div class="modal-body"> <form id="form_add" method="post" enctype="multipart/form-data"> <input type="hidden" name="blog_id" id="blog_id" value="<?php echo $blog_id; ?>"> <?php if ($content_type == 1) { ?> <input type="hidden" name="content_type" id="content_type" value="<?php echo $content_type; ?>"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="form-group"> <label><strong>เนื้อหา </strong></label> <div> <textarea class="form-control summernote" name="content_text" id="content_text"></textarea> </div> </div> </div> </div> <?php } elseif ($content_type == 2) { ?> <input type="hidden" name="content_type" id="content_type" value="<?php echo $content_type; ?>"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="form-group text-center"> <label><strong>รูปภาพเนื้อหา</strong></label><br> <input type="file" id="content_image" name="content_image[]" onchange="ImageReadURL(this,value,'#temp_image');" value="" style="height:100%;width:100%;position:absolute;border:2px;top:27px;left:34px;opacity:0;cursor:pointer;" multiple> <label><img id="temp_image" for="content_image" src="../../../files/blog_files/no-image.png" style="object-fit:cover;max-width:100%;max-height:200px;" /></label> </div> </div> </div> <?php } elseif ($content_type == 3) { ?> <input type="hidden" name="content_type" id="content_type" value="<?php echo $content_type; ?>"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 text-center"> <iframe id="iframe_label" width="560" height="315" src="https://www.youtube.com/embed/" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> <div class="col-lg-12 col-md-12 col-sm-12 mt-2"> <div class="form-group"> <label><strong>YOUTUBE ID </strong></label> <input type="text" class="form-control" name="content_yt_id" id="content_yt_id" onchange="SetIFrame(this)"> </div> </div> </div> <?php } elseif ($content_type == 4) { ?> <input type="hidden" name="content_type" id="content_type" value="<?php echo $content_type; ?>"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="form-group"> <label><strong>วิดิโอ </strong> <span class="text-danger">.mp4 เท่านั้น</span></label> <div class="custom-file"> <input type="file" class="custom-file-input" name="content_video" id="content_video" onchange="VideoReadURL(this,value,'#blah_video');"> <label id="blah_video" for="content_video" class="custom-file-label">เลือกไฟล์...</label> </div> </div> </div> </div> <?php } ?> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">ปิด</button> <button type="button" class="btn btn-success" id="AddFormSubmit">บันทึก</button> </div>