-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin4a.php
More file actions
101 lines (94 loc) · 3.1 KB
/
Copy pathadmin4a.php
File metadata and controls
101 lines (94 loc) · 3.1 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php include('header.php') ?>
<!------- add page here -------->
<?php
$userid = $_POST["userid"];
$sql = "SELECT * FROM btglogin WHERE userid = $userid";
$result = $conn->query($sql);
// output data of each row
//while($row = $result->fetch_assoc())
while($result && $row = $result->fetch_assoc())
{
$newuser = $row['usernames'];
$newpass = $row['passwords'];
$newdistrict = $row['district'];
$access = $row['userlevel'];
$newuserid = $row['userid'];
}
?>
<center>
<font color="darkblue" size="4">Add a Local Administrator</font><br><br /><br />
<form action="admin4b.php" method="post" name="add1">
<table width="381" style="width:100px;">
<tr>
<td width="111" align="right">
Username:
</td>
<td align="left" colspan="2">
<INPUT name="newuser"
message="Please enter a username"
style="WIDTH: 100%; HEIGHT: 22px; background-color: white; color: darkblue;"
size=56
value="<?php echo $newuser;?>">
</td>
</tr>
<tr>
<td align="right" nowrap>
Password:
</td>
<td align="left" colspan="2">
<INPUT name="newpass"
message="Please enter a password"
required="yes"
style="WIDTH: 100%; HEIGHT: 22px; background-color: white; color: darkblue;"
size=56
value="<?php echo $newpass;?>">
</td>
</tr>
<tr>
<td align="right" nowrap>
District:
</td>
<td align="left" colspan="1">
<INPUT name="newdistrict"
message="Please enter the district"
required="yes"
style="WIDTH: 50px; HEIGHT: 22px; background-color: white; color: darkblue;"
size=56
value="<?php echo $newdistrict;?>">
</td>
<td align="right" nowrap>
Admin Level:
<?php if ($access == '1') { ?>
<select size="1"
name="newlevel"
style="WIDTH: 125px; HEIGHT: 22px; background-color: white; color: darkblue;">
<option value="1" selected="selected">local Coordinator</option>
<option value="2">System Admin</option>
</select>
<?php } else { ?>
<select size="1"
name="newlevel"
style="WIDTH: 125px; HEIGHT: 22px; background-color: white; color: darkblue;">
<option value="1">local Coordinator</option>
<option value="2" selected="selected">System Admin</option>
</select>
<?php } ?>
</td>
</tr>
<tr>
<td align="center" colspan="4">
For System Administrators Enter the District as 0 (zero)
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input type="hidden" name="newuserid" value="<?php echo $newuserid;?>">
<input type="Submit" value="Update Admin Coordinator" name="b2">
</td>
</tr>
</table>
</form>
</center>
<!------- end page here ------------>
</body>
</html>