⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
wix.com.ng
/
public
/
assets
/
user
/
js
/
View File Name :
dropzone-slider.js
"use strict"; // myDropzone is the configuration for the element that has an id attribute // with the value my-dropzone (or myDropzone) Dropzone.options.myDropzone = { acceptedFiles: '.png, .jpg, .jpeg', url: uploadSliderImage, success: function (file, response) { $("#sliders").append(`
`); // Create the remove button var removeButton = Dropzone.createElement("
"); // Capture the Dropzone instance as closure. var _this = this; // Listen to the click event removeButton.addEventListener("click", function (e) { // Make sure the button click doesn't submit the form: e.preventDefault(); e.stopPropagation(); _this.removeFile(file); rmvImg(response.file_id); }); // Add the button to the file preview element. file.previewElement.appendChild(removeButton); if (typeof response.error != 'undefined') { if (typeof response.file != 'undefined') { document.getElementById('errpreimg').innerHTML = response.file[0]; } } } }; function rmvImg(file_Id) { const csrf = document.querySelector('meta[name="csrf-token"]').content; $.ajax({ url: rmvSliderImage, type: 'POST', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, data: { 'value': file_Id, '_token': csrf }, success: function (data) { const ele = document.getElementById("slider" + file_Id); ele.remove(); }, error: function (e) { } }); } function rmvdbimg(key, id) { $(".request-loader").addClass("show"); $.ajax({ url: rmvDbSliderImage, type: 'POST', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, data: { key: key, id: id }, success: function (data) { $(".request-loader").removeClass("show"); var content = {}; if (data == 'success') { $("#trdb" + key).remove(); content.message = 'Slider image deleted successfully!'; content.title = 'Success'; var type = 'success'; } else { content.message = "You can't delete all images"; content.title = 'Success'; var type = 'warning'; } content.icon = 'fa fa-bell'; $.notify(content, { type: type, placement: { from: 'top', align: 'right' }, showProgressbar: true, time: 1000, delay: 4000, }); } }); }