Server IP : 149.202.105.228 / Your IP : 216.73.216.134 Web Server : Apache System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : atfycaf ( 116275) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/a/t/f/atfycaf/www/admin/js/jsF/ |
Upload File : |
$(document).ready(function(){ $(document).on("click", ".delPhoto", function() { var photoToDelete = $(this).attr("id"); photoToDelete = photoToDelete.replace("del", ""); var confirmDelete = confirm("Are you sure you want to delete this photo?"); if (confirmDelete > 0) { deletePhoto(photoToDelete); } else { return false; } }); $(document).on("keyup", ".galleryPhotoTitle", function() { var thisID = $(this).attr("id"); var thisTitle = $(this).val(); var titleLen = parseInt(thisTitle.length); if (titleLen > 0) { $("#" + thisID + "Save").prop("disabled", false); } else { $("#" + thisID + "Save").prop("disabled", true); } }); $(".pGalleryID").selectmenu({ change: function( event, data ) { var gID = $("#galleryID").val(); var pID = $(this).siblings(".pid").val(); var thisSelect = $(this); var newGalleryID = data.item.value; var newGallery = data.item.label; if (confirm("Are you sure you want to move this photo to " + newGallery + "?")) { $.ajax({ type: "GET", url: "galleryPhotosMove.php", data: 'photoID=' + pID + '&galleryID=' + newGalleryID, success: function(dataResult) { $("#galleryLayout").html(""); $.ajax({ type: "GET", url: "galleryPhotosReset.php", data: 'galleryID=' + gID, success: function(dataResult) { $("#galleryLayout").html(dataResult); $("#searchLoadingBG").delay(600).fadeOut("fast"); } }); } }); } else { thisSelect.val(""); thisSelect.selectmenu("refresh"); return false; } } }); $(document).on("click", ".galleryLayoutSave", function() { var thisPID = $(this).data("pid"); var thisTitle = $("#photoTitle" + thisPID).val(); $.ajax({ type: "GET", url: "galleryPhotosTitle.php", data: 'pID=' + thisPID + "&tT=" + encodeURIComponent(thisTitle), success: function(dataResult) { $("#photoTitle" + thisPID + "Save").prop("disabled", true); $("#photoTitle" + thisPID + "Save").html(dataResult); setTimeout(function() { $("#photoTitle" + thisPID + "Save").html("Save"); }, 3000); } }); }); resetSelects(); function resetSelects() { $(".pGalleryID").selectmenu({ change: function( event, data ) { var gID = $("#galleryID").val(); var pID = $(this).siblings(".pid").val(); var thisSelect = $(this); var newGalleryID = data.item.value; var newGallery = data.item.label; if (confirm("Are you sure you want to move this photo to " + newGallery + "?")) { $.ajax({ type: "GET", url: "galleryPhotosMove.php", data: 'photoID=' + pID + '&galleryID=' + newGalleryID, success: function(dataResult) { $("#galleryLayout").html(""); $.ajax({ type: "GET", url: "galleryPhotosReset.php", data: 'galleryID=' + gID, success: function(dataResult) { $("#galleryLayout").html(dataResult); resetSelects(); $("#searchLoadingBG").delay(600).fadeOut("fast"); } }); } }); } else { thisSelect.val(""); thisSelect.selectmenu("refresh"); return false; } } }); } function deletePhoto(photoID) { var uploadVar = $("#uploadVar").val(); var gID = $("#galleryID").val(); $("#searchLoadingBG").fadeIn("fast"); $.ajax({ type: "GET", url: "galleryPhotosDelete.php", data: 'photoID=' + photoID, success: function(dataResult) { $("#galleryLayout").html(""); $.ajax({ type: "GET", url: "galleryPhotosReset.php", data: 'galleryID=' + gID, success: function(dataResult) { $("#galleryLayout").html(dataResult); $("#searchLoadingBG").delay(600).fadeOut("fast"); } }); } }); } });