Server IP : 103.233.192.212 / Your IP : 3.144.154.109 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/domains/sumpatuan.go.th/private_html/admin/new/ |
Upload File : |
<?php require_once('session_backend_administrator.php'); header('Content-Type: text/html; charset=UTF-8'); if($STT_login=="admin_login_true"){ $check_id = $con_db_administrator->real_escape_string($_GET['id']); $check_type = $con_db_administrator->real_escape_string($_GET['type']); $check_link = $con_db_administrator->real_escape_string($_GET['link']); if(!isset($check_id) or $check_id=="" or !isset($check_type) or $check_type=="" or !isset($check_link) or $check_link=="" ){ echo "<SCRIPT type='text/javascript'> alert('ไม่พบข้อมูล ที่ต้องการแก้ไข'); window.location.replace('../index'); </SCRIPT>"; exit; }else{ $sql_data = " SELECT * FROM `data_new` WHERE `id_new`='$check_id' "; $qr_data = mysqli_query($con_db_administrator, $sql_data); $rs_data = mysqli_fetch_assoc($qr_data); if( empty($rs_data) ){ echo "<SCRIPT type='text/javascript'> alert('ไม่ข้อมูล ที่ต้องการแก้ไข'); window.location.replace('$check_link'); </SCRIPT>"; exit; } $id_new = $rs_data['id_new']; $name_new = $rs_data['name_new']; $type_new = $rs_data['type_new']; $stt_new = $rs_data['stt_new']; $sql_cpwimg = "SELECT COUNT(*) FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$check_type' AND `cm_filedoc_news`='img' "; $qr_cpwimg = mysqli_query($con_db_administrator, $sql_cpwimg) or trigger_error("SQL", E_USER_ERROR); $rs_cpwimg = mysqli_fetch_row($qr_cpwimg); } }else{ echo "<SCRIPT type='text/javascript'> alert('กรุณาเข้าสู่ระบบ'); window.location.replace('../index'); </SCRIPT>"; exit; } ?> <!doctype html> <html lang="en"> <head> <?php include_once ("head.html"); ?> </head> <body> <?php include_once ("menu.php"); ?> <div class="container pt-3 pb-4 " > <div class="row"> <div class="col text-secondary" > <div class="p-1 ps-2 box-link " ><a href="../backend-administrator" class="link-info">หน้าหลัก</a> / <a href="<?php echo $check_link;?>" class="link-info"><?php echo $check_type;?> </a> / แก้ไขข้อมูล <?php echo $check_type;?> </div> </div> <div class="w-100 pb-4"></div> <div class="col m-auto" > <div class="bg-line-1 hideTab"></div> </div> <div class="col-auto text-center"> <span class="lh-sm h1 fw-700">แก้ไขข้อมูล <br class="showTab"><?php echo $check_type;?> </span> </div> <div class="col m-auto" > <div class="bg-line-1 hideTab"></div> </div> </div> <div class="row mt-3 mb-4 p-2"> <div class="col box-data p-4"> <form action="action/save-News-edit" name='form_new_edit' id='form_new_edit' method="post" enctype="multipart/form-data"> <input type="hidden" name="edt_id" value="<?php echo $id_new;?>" readonly> <input type="hidden" name="linknew" value="<?php echo $check_link;?>" readonly> <div class="row mb-4"> <label class="col-lg-2 col-form-label fw-700 txtbox-align">หัวข้อ</label> <div class="col-lg-10"> <input type="text" class="form-control " name="edt_name" value="<?php echo $rs_data['name_new'];?>" required> </div> </div> <?php if($check_type=="ข่าวการเงิน" or $check_type=="รายงานการประชุม"){ ?> <div class="row mb-4"> <label class="col-lg-2 col-form-label m-auto fw-700 txtbox-align">ประจำปี</label> <div class="col-lg-10"> <input type="text" class="form-control" name="edt_year" oninput="this.value = this.value.replace(/\D+/g, '').replace(/^0[^.]/, '0');" maxlength="4" value="<?php echo $rs_data['year_new'];?>" style="max-width:150px" required> </div> </div> <?php }else{ ?> <input type="hidden" name="edt_year" value="" readonly> <?php } ?> <div class="row mb-4"> <label class="col-lg-2 col-form-label fw-700 txtbox-align">ประเภท</label> <div class="col-lg-10"> <input type="hidden" name="edt_type" value="<?php echo $check_type;?>" readonly> <?php $subtype_new = $rs_data['subtype_new']; switch($check_type){ case "ข่าวประชาสัมพันธ์": echo '<select class="form-select w-selec" name="edt_subtype" >'; echo '<option value="ข่าวประชาสัมพันธ์"'; if( $subtype_new=="ข่าวประชาสัมพันธ์" ){ echo "selected"; } echo '>ข่าวประชาสัมพันธ์</option>'; echo '<option value="ข่าวย้อนหลัง"'; if( $subtype_new=="ข่าวย้อนหลัง" ){ echo "selected"; } echo '>ข่าวย้อนหลัง</option>'; echo '<option value="ข่าว Otop"'; if( $subtype_new=="ข่าว Otop" ){ echo "selected"; } echo '>ข่าว Otop</option>'; echo '</select>'; break; case "ข่าวภาษี": echo '<input type="text" class="form-control w-selec" name="edt_subtype" value="ข่าวภาษี" readonly>'; break; case "ข่าวกิจกรรม": echo '<input type="text" class="form-control w-selec" name="edt_subtype" value="ข่าวกิจกรรม" readonly>'; break; case "ข่าวการเงิน": echo '<select class="form-select w-selec" name="edt_subtype" >'; echo '<option value="สถิติการเงิน"'; if( $subtype_new=="สถิติการเงิน" ){ echo "selected"; } echo '>สถิติการเงิน</option>'; echo '<option value="งบรายรับ-รายจ่าย"'; if( $subtype_new=="งบรายรับ-รายจ่าย" ){ echo "selected"; } echo '>งบรายรับ-รายจ่าย</option>'; echo '<option value="งบลูกหนี้-เจ้าหนี้"'; if( $subtype_new=="งบลูกหนี้-เจ้าหนี้" ){ echo "selected"; } echo '>งบลูกหนี้-เจ้าหนี้</option>'; echo '<option value="งบทรัพย์สิน"'; if( $subtype_new=="งบทรัพย์สิน" ){ echo "selected"; } echo '>งบทรัพย์สิน</option>'; echo '<option value="งบทดลอง"'; if( $subtype_new=="งบทดลอง" ){ echo "selected"; } echo '>งบทดลอง</option>'; echo '<option value="งบแสดงฐานะการเงิน"'; if( $subtype_new=="งบแสดงฐานะการเงิน" ){ echo "selected"; } echo '>งบแสดงฐานะการเงิน</option>'; echo '<option value="รายงานทางการเงิน"'; if( $subtype_new=="รายงานทางการเงิน" ){ echo "selected"; } echo '>รายงานทางการเงิน</option>'; echo '</select>'; break; case "ข่าวจัดชื้อจัดจ้าง และ พัสดุ": echo '<select class="form-select w-selec" name="edt_subtype" >'; echo '<option value="ประกาศจัดชื้อจัดจ้างเเละพัสดุ"'; if( $subtype_new=="ประกาศจัดชื้อจัดจ้างเเละพัสดุ" ){ echo "selected"; } echo '>ประกาศจัดชื้อจัดจ้างเเละพัสดุ</option>'; echo '<option value="การเผยแพร่ราคากลางตามแบบ บก."'; if( $subtype_new=="การเผยแพร่ราคากลางตามแบบ บก." ){ echo "selected"; } echo '>การเผยแพร่ราคากลางตามแบบ บก.</option>'; echo '<option value="สรุปผลการจัดซื้อจัดจ้างประจำเดือน (สขร.1)"'; if( $subtype_new=="สรุปผลการจัดซื้อจัดจ้างประจำเดือน (สขร.1)" ){ echo "selected"; } echo '>สรุปผลการจัดซื้อจัดจ้างประจำเดือน (สขร.1)</option>'; echo '<option value="รายงานผลการจัดซื้อจัดจ้าง"'; if( $subtype_new=="รายงานผลการจัดซื้อจัดจ้าง" ){ echo "selected"; } echo '>รายงานผลการจัดซื้อจัดจ้าง</option>'; echo '<option value="ประกาศผลผู้ชนะการเสนอราคา"'; if( $subtype_new=="ประกาศผลผู้ชนะการเสนอราคา" ){ echo "selected"; } echo '>ประกาศผลผู้ชนะการเสนอราคา</option>'; echo '</select>'; break; case "ข่าวตรวจสอบภายใน": echo '<input type="text" class="form-control w-selec" name="edt_subtype" value="ข่าวตรวจสอบภายใน" readonly>'; break; case "กิจการสภา": echo '<input type="text" class="form-control w-selec" name="edt_subtype" value="กิจการสภา" readonly>'; break; case "รายงานการประชุม": echo '<input type="text" class="form-control w-selec" name="edt_subtype" value="รายงานการประชุม" readonly>'; break; case "รายงานผลการประเมินประสิทธิภาพขององค์กรปกครองส่วนท้องถิ่น(LPA)": echo '<input type="text" class="form-control" name="edt_subtype" value="รายงานผลการประเมินประสิทธิภาพขององค์กรปกครองส่วนท้องถิ่น(LPA)" readonly>'; break; case "รายงานผลการประเมินคุณธรรมและความโปร่งใสในการดำเนินงานของหน่วยงานภาครัฐ(ITA)": echo '<input type="text" class="form-control" name="edt_subtype" value="รายงานผลการประเมินคุณธรรมและความโปร่งใสในการดำเนินงานของหน่วยงานภาครัฐ(ITA)" readonly>'; break; } ?> </div> </div> <?php $date = str_replace('/', '-', $rs_data['date_new']); $date_new = date("Y-m-d",strtotime($date)); ?> <div class="row mb-4"> <label class="col-lg-2 col-form-label fw-700 txtbox-align"><?php if($check_type=="ข่าวตรวจสอบภายใน"){ echo "วันที่ตรวจสอบ"; }else{ echo "วันที่ลงข่าว"; }; ?></label> <div class="col-lg-10"> <input type="date" class="form-control w-selec" id="edt_date" name="edt_date" data-date-format="DD MMMM YYYY" value="<?php echo $date_new; ?>" required> </div> </div> <?php if($rs_cpwimg[0]>=1){ ?> <div class="row mb-4"> <label class="col-lg-2 col-form-label fw-700 txtbox-align">ตัวอย่างรูปภาพ<br><small class="fw-300">- จะอยู่ข้างบนเนื้อหา</small></label> <div class="col-lg-10"> <?php $sql_pwimg = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$check_type' AND `cm_filedoc_news`='img' "; $qr_pwimg = mysqli_query($con_db_administrator,$sql_pwimg) or die( mysqli_error($con_db_administrator)); if($rs_cpwimg[0]==1){ while($rs_pwimg = mysqli_fetch_array($qr_pwimg)){ echo '<div class="w-100 text-center bg-white border"><img src="../../'.$rs_pwimg['path_filedoc_news'].'" class="img-fluid mh_1pic imgpopup" onclick="ac_imgpopup(this.src)"></div>'; } }else if($rs_cpwimg[0]>1){ echo '<div id="slideNewsV" class="carousel slide carousel-dark bg-white border" data-bs-ride="carousel"> <div class="carousel-inner">'; $c_row=0; while($rs_pwimg = mysqli_fetch_array($qr_pwimg)){ $c_row++; if($c_row==1){ echo '<div class="carousel-item active text-center animated fadeIn" data-bs-interval="2000"> <img src="../../'.$rs_pwimg['path_filedoc_news'].'" class="img-fluid mh_pic imgpopup" id="'.$c_row.'" onclick="ac_imgpopup_slide(this.id)"> </div>'; }else{ echo '<div class="carousel-item text-center animated fadeIn" data-bs-interval="2000"> <img src="../../'.$rs_pwimg['path_filedoc_news'].'" class="img-fluid mh_pic imgpopup" id="'.$c_row.'" onclick="ac_imgpopup_slide(this.id)"> </div>'; } } echo ' </div> <button class="carousel-control-prev" type="button" data-bs-target="#slideNewsV" data-bs-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="visually-hidden">Previous</span> </button> <button class="carousel-control-next" type="button" data-bs-target="#slideNewsV" data-bs-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="visually-hidden">Next</span> </button> </div>'; }; ?> </div> </div> <?php } ?> <div class="row mb-4"> <label class="col-lg-2 col-form-label fw-700 txtbox-align">รายละเอียด</label> <div class="col-lg-10"> <textarea id="editor" name="edt_data" ><?php echo $rs_data['data_new'];?></textarea> </div> </div> <div class="row mb-4"> <label class="col-2 col-form-label fw-700 txtbox-align">สถานะ</label> <div class="col-10"> <select class="form-select w-selec" name="statusshow" > <option value="0" <?php if($stt_new=="0"){ echo "selected"; }?>>แสดง</option> <option value="1" <?php if($stt_new=="1"){ echo "selected"; }?>>ไม่แสดง</option> </select> </div> </div> <hr class="hr-das mb-3"> <div class="text-center"> <button type="submit" class="btn btn-success"><i class="fas fa-save me-2" ></i> บันทึกการแก้ไข</button> <button type="button" class="btn btn-danger ms-2" onclick="location.href='<?php echo $check_link;?>'">ย้อนกลับ</button> </div> </form> </div> <div class="w-100"></div> <div class="col mx-auto box-data p-4 mt-4" > <div class="fs-30 fw-700 text-center">จัดการไฟล์</div> <ul class="nav nav-tabs" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> <button class="nav-link active" id="img-tab" data-bs-toggle="tab" data-bs-target="#img-tab-pane" type="button" role="tab" aria-controls="img-tab-pane" aria-selected="true"><i class="fas fa-file-image"></i> อัพโหลดรูปภาพ</button> </li> <li class="nav-item" role="presentation"> <button class="nav-link" id="doc-tab" data-bs-toggle="tab" data-bs-target="#doc-tab-pane" type="button" role="tab" aria-controls="doc-tab-pane" aria-selected="false"><i class="fas fa-folder-open"></i> อัพโหลดไฟล์เอกสาร</button> </li> </ul> <div class="tab-content" id="myTabContent"> <div class="tab-pane fade show bg-white p-4 border mh_upload active " id="img-tab-pane" role="tabpanel" aria-labelledby="img-tab" tabindex="0" > <div class="row"> <label class="col-auto col-form-label fw-700 txtbox-align">เพิ่มไฟล์รูปภาพ</label> <div class="col"> <form action="action/save-addfiledoc-imgnews" name='form_imgnews' id='form_imgnews' method="post" enctype="multipart/form-data"> <input type="hidden" name="id_data_filedoc" value="<?php echo $id_new;?>" readonly> <input type="hidden" name="tbdata_filedoc" value="<?php echo $type_new;?>" readonly> <input type="hidden" name="cm_filedoc" value="img" readonly> <div class="input-group mt-1"> <input type="file" class="form-control" id="uploadImg" name="uploadImg[]" aria-label="Upload" accept="image/png, image/gif, image/jpeg" multiple required> <button type="submit" class="btn btn-primary"><i class="fas fa-cloud-download-alt"></i> อัพโหลดรูปภาพ</button> </div> <div class="mt-2 lh-base fs-14 text-secondary fw-300"> - อัพโหลดไฟล์รูปภาพ เพื่อนำไปเป็นสไลด์รูปภาพประกอบเนื้อหา <br>- ถ้ามีรูปภาพเพียงรูปเดียว จะเป็นแสดงภาพสูงสุดที่ 600px <br>- ถ้ามีรูปภาพหลายรูป จะเป็นภาพสไลด์ ตอนแสดงผล จะกำหนดไว้สูงสุดที่ 500px </div> </form> </div> </div> <?php $sql_cfileimg = "SELECT COUNT(*) FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$type_new' AND `cm_filedoc_news`='img' "; $qr_cfileimg = mysqli_query($con_db_administrator, $sql_cfileimg) or trigger_error("SQL", E_USER_ERROR); $rs_cfileimg = mysqli_fetch_row($qr_cfileimg); $sql_data_fileimg = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$type_new' AND `cm_filedoc_news`='img' "; $qr_data_fileimg = mysqli_query($con_db_administrator,$sql_data_fileimg) or die( mysqli_error($con_db_administrator)); ?> <table class="mt-3 table table-sm table-striped table-bordered table-hover "> <thead > <tr class="text-center table-secondary fs-16"> <th style="width:94%">ไฟล์รูปภาพ <?php echo $rs_cfileimg['0'];?> รายการ</th> <th style="width:6%">ลบ</th> </tr> </thead> <tbody class="table-group-divider fs-16"> <?php while($rs_data_fileimg = mysqli_fetch_array($qr_data_fileimg)){ ?> <tr> <td><a href="<?php echo "../../".$rs_data_fileimg['path_filedoc_news'];?>" target="_blank" class="link-danger"><i class="fas fa-file-image"></i> <?php echo $rs_data_fileimg['name_filedoc_news'];?></a></td> <td class="text-center fs-18" > <a href="action/del-filedoc-news?id=<?php echo $rs_data_fileimg['id_filedoc_news'];?>&path=<?php echo $rs_data_fileimg['path_filedoc_news'];?>" class="link-dark" data-bs-toggle="tooltip" data-bs-title="ลบข้อมูล" onclick="return confirm('ต้องการลบข้อมูล ใช่หรือไม่?');" ><i class="fas fa-trash-alt" ></i></a> </td> </tr> <?php } ?> <?php if($rs_cfileimg[0]=="0"){ echo '<tr><td colspan="7"><div class="w-100 text-center mt-3 mb-3 text-secondary opacity-50 fs-16" ><i class="fas fa-eye-slash"></i>ไม่พบไฟล์รูปภาพ</div></td></tr>';} ?> </tbody> </table> </div> <div class="tab-pane fade bg-white p-4 border" id="doc-tab-pane" role="tabpanel" aria-labelledby="doc-tab" tabindex="0"> <div class="row"> <label class="col-auto col-form-label fw-700 txtbox-align">เพิ่มไฟล์เอกสาร</label> <div class="col"> <form action="action/save-addfiledoc-filenews" name='form_filenews' id='form_filenews' method="post" enctype="multipart/form-data"> <input type="hidden" name="id_data_filedoc" value="<?php echo $id_new;?>" readonly> <input type="hidden" name="tbdata_filedoc" value="<?php echo $type_new;?>" readonly> <input type="hidden" name="cm_filedoc" value="doc" readonly> <div class="input-group mt-1"> <input type="file" class="form-control" id="uploadFile" name="uploadFile[]" aria-label="Upload" accept="image/png, image/gif, image/jpeg, application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" multiple required> <button type="submit" class="btn btn-primary"><i class="fas fa-cloud-download-alt"></i> อัพโหลดไฟล์เอกสาร</button> </div> <div class="mt-2 lh-base fs-14 text-secondary fw-300"> - อัพโหลดไฟล์เอกสารที่เกี่ยวข้องกับหัวข้อ เพื่อนำไปเผยแพร่หน้าข้อมูล <br>- เปลี่ยนชื่อไฟล์ให้เกี่ยวข้องกับหัวข้อ ก่อนทำการเลือกไฟล์อัพโหลด <br>- อัพโหลดได้เฉพาะไฟล์รูปภาพ , .pdf , .doc/.docx , .xls/.xlsx <br>- สามารถอัพโหลดไฟล์เพิ่มในภายหลังได้ </div> </form> </div> </div> <?php $sql_cfiledoc = "SELECT COUNT(*) FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$type_new' AND `cm_filedoc_news`='doc' "; $qr_cfiledoc = mysqli_query($con_db_administrator, $sql_cfiledoc) or trigger_error("SQL", E_USER_ERROR); $rs_cfiledoc = mysqli_fetch_row($qr_cfiledoc); $sql_data_filedoc = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$type_new' AND `cm_filedoc_news`='doc' "; $qr_data_filedoc = mysqli_query($con_db_administrator,$sql_data_filedoc) or die( mysqli_error($con_db_administrator)); ?> <table class="mt-3 table table-sm table-striped table-bordered table-hover "> <thead > <tr class="text-center table-secondary fs-16"> <th style="width:94%">ไฟล์เอกสาร <?php echo $rs_cfiledoc['0'];?> รายการ</th> <th style="width:6%">ลบ</th> </tr> </thead> <tbody class="table-group-divider fs-16"> <?php while($rs_data_filedoc = mysqli_fetch_array($qr_data_filedoc)){ ?> <tr> <td><a href="<?php echo "../../".$rs_data_filedoc['path_filedoc_news'];?>" target="_blank" class="link-danger"><i class="fas fa-file-alt" ></i> <?php echo $rs_data_filedoc['name_filedoc_news'];?></a></td> <td class="text-center fs-18" > <a href="action/del-filedoc-news?id=<?php echo $rs_data_filedoc['id_filedoc_news'];?>&path=<?php echo $rs_data_filedoc['path_filedoc_news'];?>" class="link-dark" data-bs-toggle="tooltip" data-bs-title="ลบข้อมูล" onclick="return confirm('ต้องการลบข้อมูล ใช่หรือไม่?');" ><i class="fas fa-trash-alt" ></i></a> </td> </tr> <?php } ?> <?php if($rs_cfiledoc[0]=="0"){ echo '<tr><td colspan="7"><div class="w-100 text-center mt-3 mb-3 text-secondary opacity-50 fs-16" ><i class="fas fa-eye-slash"></i>ไม่พบไฟล์เอกสาร</div></td></tr>';} ?> </tbody> </table> </div> </div> </div> </div> <?php include_once ("../footer.php"); ?> <!------ img popup ------> <script> $( document ).ready(function() { $("#btn_close_imgpopup").click(function(){ $("#bd_imgpopup").css("display", "none"); $("#bd_imgpopup").fadeOut(); }); $("#btn_close_imgpopup_slide").click(function(){ $(".del_active").removeClass( "active" ); $("#bd_imgpopup_slide").css("display", "none"); $("#bd_imgpopup_slide").fadeOut(); }); }); function ac_imgpopup(srcimg){ $("#imgshowsrc").attr("src", srcimg); $("#bd_imgpopup").css("display", "block"); $("#bd_imgpopup").fadeIn(); } function ac_imgpopup_slide(imgno){ imgno_active = "#imgno_"+imgno; $(imgno_active).addClass( "active" ); $("#bd_imgpopup_slide").css("display", "block"); $("#bd_imgpopup_slide").fadeIn(); } </script> <div id="bd_imgpopup" class="bd_imgpopup fix-page text-center"> <img id="imgshowsrc" src="" class="img-fluid imgpopupshow"> <button type="button" id="btn_close_imgpopup" class="btn btn-danger mt-3 btn_close_imgpopupshow"><i class="fas fa-times-circle"></i> ปิดหน้าต่าง</button> </div> <div id="bd_imgpopup_slide" class="bd_imgpopup_slide fix-page h-100 text-center"> <?php $sql_pwimg_pu = "SELECT * FROM `data_filedoc_news` WHERE `id_tbdata_filedoc_news`='$id_new' AND `tbdata_filedoc_news`='$check_type' AND `cm_filedoc_news`='img' "; $qr_pwimg_pu = mysqli_query($con_db_administrator,$sql_pwimg_pu) or die( mysqli_error($con_db_administrator)); if($rs_cpwimg[0]>1){ echo '<div id="slidePU" class="carousel slide text-center div_imgpopupshow_slide w-100"> '; echo '<div class="carousel-inner ">'; $c_row_pu=0; while($rs_pwimg_pu = mysqli_fetch_array($qr_pwimg_pu)){ $c_row_pu++; echo '<div class="carousel-item text-center animated fadeIn del_active" id="imgno_'.$c_row_pu.'"> <img src="../../'.$rs_pwimg_pu['path_filedoc_news'].'" class="img-fluid " > </div>'; } echo ' </div> <button class="carousel-control-prev" type="button" data-bs-target="#slidePU" data-bs-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="visually-hidden">Previous</span> </button> <button class="carousel-control-next" type="button" data-bs-target="#slidePU" data-bs-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="visually-hidden">Next</span> </button> </div>'; }; ?> <button type="button" id="btn_close_imgpopup_slide" class="btn btn-danger btn_close_imgpopupshow"><i class="fas fa-times-circle"></i> ปิดหน้าต่าง</button> </div> <!-----------------------> <script> $('#uploadImg').change(function(){ if(this.files.length>10){ alert('อัพโหลดได้สูงสุดทีละ 10 ไฟล์ สามารถอัพโหลดเพิ่มภายหลังได้'); $("#uploadImg").val(null); return false; } }); $('#uploadFile').change(function(){ if(this.files.length>10){ alert('อัพโหลดได้สูงสุดทีละ 10 ไฟล์ สามารถอัพโหลดเพิ่มภายหลังได้'); $("#uploadFile").val(null); return false; } }); $('body').on('dragstart drop', function(e){ e.preventDefault(); return false; }); </script> <style> .ck-editor__editable { min-height: 250px; } </style> <script> ClassicEditor .create( document.querySelector( '#editor' ), { mediaEmbed: { previewsInData: true } } ) .then( editor => { window.editor = editor; } ) .catch( error => { console.error( error ); } ); </script> </div> </body> </html>