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 include "globalVars.php"; include "header.php"; ?> <h2>Update your Details</h2> <div class="formContainer"> <div class="functionButtons"> <form action="userManagementDetails.html" method="post"> <input type="submit" class="functionSelected" name="updateDetails" value="Your Details" /> </form> <form action="userManagementDetails-Pass.html" method="post"> <input type="submit" name="updateDetails" value="Change Password" /> </form> </div> </div> <?php if (isset($_POST["saveDetailChanges"])) { $newUserName = cleanPost($_POST["adminUserName"], $conn); $newUserEmail = cleanPost($_POST["adminUserEmail"], $conn); mysqli_query($conn, "UPDATE admin SET adminName = '". addslashes($newUserName) ."', adminEmail = '". addslashes($newUserEmail) ."' WHERE id = '$adminID'"); $trackDate = date("Y-m-d H:i:s"); mysqli_query($conn, "INSERT INTO userActions (dateCreated, adminID, pageTracking, databaseUpdated, updateDetails) VALUES ('$trackDate', '$adminID', 'admin/userManagementDetails.html', 'admin', 'The User ". addslashes($adminName) ." <$adminEmail> updated their username to ". addslashes($newUserName) ." and email address to $newUserEmail')"); echo "<p><strong>Success!</strong> The changes have been saved.</p>"; } $editAdminQuery = mysqli_query($conn, "SELECT * FROM admin WHERE id = '$adminID'"); while ($eAQ = mysqli_fetch_array($editAdminQuery)) { $editAdminName = $eAQ["adminName"]; $editAdminEmail = $eAQ["adminEmail"]; } ?> <form action="userManagementDetails.html" method="post"> <div class="descStTab"> <div class="pFormRow"> <div class="pFormTitle">Your Name: <span class="infoButton"><img src="images/infoButton.png" width="14" height="14" alt="Help" title="Help" border="0" /><span>Simply for identification purposes</span></span></div> <div class="pFormInput"> <input type="text" name="adminUserName" size="50" value="<?php echo $editAdminName ?>" required /> <div class="pFormLabel"> <label class="labelName">Your Name:</label> </div> </div> </div> <div class="pFormRow"> <div class="pFormTitle">Your Email Address: <span class="infoButton"><img src="images/infoButton.png" width="14" height="14" alt="Help" title="Help" border="0" /><span>Used to access this admin and also for any correspondence such as password reminders</span></span></div> <div class="pFormInput"> <input type="email" name="adminUserEmail" size="50" value="<?php echo $editAdminEmail ?>" required /> <div class="pFormLabel"> <label class="labelName">Your Email Address:</label> </div> </div> </div> </div> <input type="submit" class="submitButton" name="saveDetailChanges" value="Save Changes" /> </form> <?php include "footer.php"; ?>