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($_POST["bgID"])) { $bgID = $_POST["bgID"]; $bgImageQuery = mysqli_query($conn, "SELECT bgImage FROM pageBG WHERE id = '$bgID'"); while ($bIQ = mysqli_fetch_array($bgImageQuery)) { $bgImage = $bIQ["bgImage"]; } $bgImageOrig = $SERVER_ROOT ."/images/pagesBG/". substr_replace($bgImage, "-original", "-4", 0); $bgImageTitle = $SERVER_ROOT ."/images/pagesBG/". substr_replace($bgImage, "-title", "-4", 0); $bgImageOrigURL = $Iurl ."pagesBG/". substr_replace($bgImage, "-original", "-4", 0); $bgImageHomeURL = $Iurl ."pagesBG/". $bgImage; $bgImageTitleURL = $Iurl ."pagesBG/". substr_replace($bgImage, "-title", "-4", 0); list($width, $height) = @getimagesize($bgImageOrig); $imgRatio = $width/$height; include "header.php"; ?> <h2>Upload a New Page Background - Other Pages Photo</h2> <?php if (isset($_POST["saveNewBG"])) { $x1 = $_POST["x1"]; $y1 = $_POST["y1"]; $x2 = $_POST["x2"]; $y2 = $_POST["y2"]; $imageCrop = ($x2 - $x1)."x". ($y2 - $y1) ."+". $x1 ."+". $y1; $newSize = "1920x360"; list($width, $height) = getimagesize($bgImageOrig); $imgRatio = $width/$height; if ($width != 1920) { exec("/usr/bin/convert -crop $imageCrop $bgImageOrig $bgImageTitle"); exec("/usr/bin/convert -auto-orient -resize $newSize -strip -quality 75 -limit thread 2 $bgImageTitle $bgImageTitle"); } mysqli_query($conn, "UPDATE pageBG SET pagesX1 = '$x1', pagesY1 = '$y1', pagesX2 = '$x2', pagesY2 = '$y2' WHERE id = '$bgID'"); $trackDate = date("Y-m-d H:i:s"); mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/pagesBGNew-2.html', 'pageBG', 'The User ". addslashes($adminName) ." <$adminEmail> added the new background title slide boundaries - Slide ID: $bgID')"); ?> <p>Success! The new header background has been saved.</p> <p><strong>Home Page:</strong><br> <img src="<?php echo $bgImageHomeURL ?>" width="960"></p> <p><strong>Other Pages:</strong><br> <img src="<?php echo $bgImageTitleURL ?>" width="960"></p> <a href="pagesBG.html" class="submitButton">View all Backgrounds</a> <?php } else { ?> <form action="pagesBGNew-2.html" method="post"> <input type="hidden" id="bgID" name="bgID" value="<?php echo $bgID ?>" /> <input type="hidden" id="x1" name="x1" value="-" /> <input type="hidden" id="y1" name="y1" value="-" /> <input type="hidden" id="x2" name="x2" value="-" /> <input type="hidden" id="y2" name="y2" value="-" /> <div class="descLogoBGTab"> <div id="areaSelectTPreviewContainer"> <div id="areaSelectTPreview"><img src="<?php echo $bgImageOrigURL ?>" width="<?php echo $width ?>"></div> </div> </div> <p>You can now crop the photo to the position you want to display on the other pages. Above is a preview of how the photo will look.<br><br><strong>If you cannot see all of the full size photo below, press CTRL + - (minus key) to zoom out. Press CTRL + 0 (zero key) to zoom back to normal size.</strong></p> <div class="descImgBGTab" id="uploadedPhoto"><img id="areaSelectPhoto" src="<?php echo $bgImageOrigURL ?>" width="<?php echo $width ?>"></div> <input type="submit" class="submitButton" name="saveNewBG" value="Save new background" /> </form> <?php } ?> <?php include "footer.php"; } else { header("Location:/admin/pagesBGNew-1.html"); } ?>