Server IP : 149.202.105.228 / Your IP : 216.73.216.18 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/atfycaf/www/admin/ |
Upload File : |
<?php include 'globalVars.php'; if (isset($_GET["galleryID"])) { $photoID = $_GET["photoID"]; $galleryID = $_GET["galleryID"]; $imageFolderQuery = mysqli_query($conn, "SELECT pageURL FROM photoGalleryCats WHERE id = '$galleryID'"); while ($iFQ = mysqli_fetch_array($imageFolderQuery)) { $photoAlbum = $iFQ["pageURL"]; } $getPhotosQuery = mysqli_query($conn, "SELECT * FROM photoGallery WHERE id = '$photoID'"); while ($gPQ = mysqli_fetch_array($getPhotosQuery)) { $currentGallery = $gPQ["galleryID"]; $imageURL = $gPQ["imageURL"]; } if ($currentGallery == 9999) { $currentAlbum = "archive"; } else { $currentFolderQuery = mysqli_query($conn, "SELECT pageURL FROM photoGalleryCats WHERE id = '$currentGallery'"); while ($cFQ = mysqli_fetch_array($currentFolderQuery)) { $currentAlbum = $cFQ["pageURL"]; } } $imageRoot = $SERVER_ROOT ."/images/gallery/". $imageURL; $headerRoot = substr_replace($imageRoot, "-title", "-4", 0); $thumbRoot = substr_replace($imageRoot, "-thumb", "-4", 0); $newImageURL = str_replace($currentAlbum ."/", $photoAlbum ."/", $imageURL); $newImageRoot = $SERVER_ROOT ."/images/gallery/". $newImageURL; $newHeaderRoot = substr_replace($newImageRoot, "-title", "-4", 0); $newThumbRoot = substr_replace($newImageRoot, "-thumb", "-4", 0); rename($imageRoot, $newImageRoot); rename($headerRoot, $newHeaderRoot); rename($thumbRoot, $newThumbRoot); mysqli_query($conn, "UPDATE photoGallery SET galleryID = '$galleryID', imageURL = '$newImageURL' WHERE id = '$photoID'"); $trackDate = date("Y-m-d H:i:s"); mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/galleryPhotosMove.php', 'photoGallery', 'The User ". addslashes($adminName) ." <$adminEmail> moved the photo /images/gallery/". $imageURL ." to <a href=\"/images/gallery/". $newImageURL ."\" target=\"_blank\">/images/gallery/". $newImageURL ."</a> in the photo gallery')"); } ?>