-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathresetadminpassword.php
More file actions
44 lines (23 loc) · 838 Bytes
/
resetadminpassword.php
File metadata and controls
44 lines (23 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
include("_setup.php");
include_once("classes/member.php");
$member = new Member($mysqli);
if($_POST['submit']) {
if($member->select($_POST['adminaccount']) && $member->set_password($_POST['newpassword'])) {
echo "New Admin Password Set!<br><br>";
}
}
$result = $mysqli->query("SELECT * FROM ".$dbprefix."members WHERE rank_id = '1'");
while($row = $result->fetch_assoc()) {
$options .= "<option value='".$row['member_id']."'>".$row['username']."</option>";
}
echo "
<form action='resetadminpassword.php' method='post'>
Admin Account: <select name='adminaccount'>".$options."</select><br>
Set New Password: <input type='text' name='newpassword'><br>
<input type='submit' name='submit' value='Change Password'>
</form>
<br><br>
<a href='deleteadminaccount.php'>Delete an Admin Account</a>
";
?>