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/ |
Upload File : |
<?php $thisCheckID = 27; include "globalVars.php"; include "header.php"; ?> <h2>Delete a Local Club</h2> <?php if (isset($_POST["deleteClub"])) { $clubID = cleanPost($_POST["clubID"], $conn); $clubName = cleanPost($_POST["clubName"], $conn); $localClubsQuery = mysqli_query($conn, "SELECT clubBadge FROM localClubs WHERE id = '$clubID'"); while ($lCQ = mysqli_fetch_array($localClubsQuery)) { $clubBadge = $lCQ["clubBadge"]; } mysqli_query($conn, "DELETE FROM localClubs WHERE id = '$clubID'") or die (mysqli_error($conn)); if (trim($clubBadge) != "") { $logoImgRoot = $SERVER_ROOT ."/images/clubs/$clubBadge"; if (file_exists($logoImgRoot)) { if (is_file($logoImgRoot)) { unlink($logoImgRoot); } } } $trackDate = date("Y-m-d H:i:s"); mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/localClubsDel.html', 'localClubs', 'The User ". addslashes($adminName) ." <$adminEmail> deleted the local club ". addslashes($clubName) ."')"); echo "<p><strong>Success!</strong> $clubName has been deleted.</p>"; } elseif (isset($_POST["getClub"])) { $clubID = $_POST["clubID"]; $localClubsQuery = mysqli_query($conn, "SELECT * FROM localClubs WHERE id = '$clubID'"); while ($lCQ = mysqli_fetch_array($localClubsQuery)) { $clubName = $lCQ["clubName"]; $clubRep = $lCQ["clubRep"]; $clubWebsite = $lCQ["clubWebsite"]; $clubBadge = $lCQ["clubBadge"]; } ?> <form action="localClubsDel.html" method="post"> <input type="hidden" name="clubID" value="<?php echo $clubID ?>"> <div class="descStTab"> <div class="pFormRow"> <div class="pFormTitle">Club name:</div> <div class="pFormInput"> <input type="text" name="clubName" size="50" value="<?php echo $clubName ?>" readonly /> <div class="pFormLabel"> <label class="labelName">Club name:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Club Representative:</div> <div class="pFormInput"> <input type="text" name="clubRep" size="50" value="<?php echo $clubRep ?>" readonly /> <div class="pFormLabel"> <label class="labelName">Club Representative:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Club Website:</div> <div class="pFormInput"> <input type="url" name="clubWebsite" size="50" placeholder="https://www.example.com" value="<?php echo $clubWebsite ?>" readonly/> <div class="pFormLabel"> <label class="labelName">Club Website:</label> </div> </div> </div> <?php if (trim($clubBadge) != "") { ?> <div class="pFormRow"> <div class="pFormTitle">Existing Club badge:</div> <div class="pFormInput" style="text-align:center;"> <img src="<?php echo $Iurl ?>clubs/<?php echo $clubBadge ?>" height="75"> <div class="pFormLabel"> <label class="labelName">Existing Club badge:</label> </div> </div> </div> <?php } ?> </div> <p style="float:left; width:100%; text-align:center; font-weight:600;">Are you sure you want to delete <span style="color:#B0222A;"><?php echo $clubName ?></span> from the website? This process cannot be undone.</p> <input type="submit" class="submitButton" name="deleteClub" value="Delete this Club" /> </form> <?php } else { header("Location: localClubsEdit.html"); } ?> <?php include "footer.php"; ?>