⚝
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
/
wixi.com.ng
/
public
/
assets
/
admin
/
js
/
View File Name :
slider-image.js
Dropzone.options.sliderDropzone = { paramName: 'slider_image', url: imgUpUrl, method: 'post', success: function (file, response) { // remove error message if exist $('#err_slider_image').text(''); $('#slider-image-id').append(`
`); // create remove button const rmvBtn = Dropzone.createElement("
"); // capture the dropzone instance as closure let _this = this; // bind an event to the remove button rmvBtn.addEventListener('click', function (event) { // make sure the button click event doesn't submit the form event.preventDefault(); event.stopPropagation(); // remove image from dropzone preview _this.removeFile(file); // remove image from storage rmvImg(response.uniqueName); }); // add the remove button to the file preview element file.previewElement.appendChild(rmvBtn); }, error: function (file, message) { $('#err_slider_image').text(message.error.slider_image[0]); // create remove button const rmvBtn = Dropzone.createElement("
"); // capture the dropzone instance as closure let _this = this; // bind an event to the remove button rmvBtn.addEventListener('click', function (event) { // make sure the button click event doesn't submit the form event.preventDefault(); event.stopPropagation(); // remove video from dropzone preview _this.removeFile(file); }); // add the remove button to the file preview element file.previewElement.appendChild(rmvBtn); } }; function rmvImg(unqName) { $.ajax({ url: imgRmvUrl, type: 'POST', data: { 'imageName': unqName }, success: function (response) { const image = $(`#img-${unqName}`); image.remove(); }, error: function (response) { console.log(response.error); } }); } function rmvStoredImg(id, key) { $.ajax({ url: imgDetachUrl, type: 'POST', data: { 'id': id, 'key': key }, success: function (response) { $(`#slider-image-${key}`).remove(); let content = {}; content.message = response.message; content.title = 'Success'; content.icon = 'fas fa-check-circle'; $.notify(content, { type: 'success', placement: { from: 'top', align: 'right' }, showProgressbar: true, time: 1000, delay: 4000 }); $('#reload-slider-div').load(location.href + ' #reload-slider-div'); }, error: function (response) { let content = {}; content.message = response.responseJSON.message; content.title = 'Error'; content.icon = 'fas fa-times-circle'; $.notify(content, { type: 'danger', placement: { from: 'top', align: 'right' }, showProgressbar: true, time: 1000, delay: 4000 }); } }); }