forked from allenshih1/database
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_user.php
More file actions
33 lines (33 loc) · 808 Bytes
/
add_user.php
File metadata and controls
33 lines (33 loc) · 808 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
<?php require_once("header.php"); ?>
<?php
if(isset($_SESSION['isAuth']) && $_SESSION['isAdmin'])
{
?>
<table style="width:500px">
<tr>
<td> account </td>
<td> password </td>
<td> identity </td>
</tr>
<tr>
<form action="add_user_func.php" method="post">
<td> <input type="text" name="account"> </td>
<td> <input type="password" name="password"> </td>
<td> <INPUT TYPE="checkbox" name="is_admin" value="TRUE">admin</td>
<td> <button type="submit">新增</button> </td>
<td> <a href="account_management.php"><button type="button">取消</button></a> </td>
</form>
</tr>
</table>
<?php
} else if(isset($_SESSION['isAuth'])){
?>
permission denied
<?php
} else {
?>
please login first
<?php
}
?>
<?php require_once("footer.php"); ?>