-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistAdmin.php
61 lines (61 loc) · 1.72 KB
/
listAdmin.php
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
<?php
require_once '../include.php';
$rows=getAllAdmin();
if(!$rows){
alertMes("No admin.","addAdmin.php");
exit;
}
?>
<!--表格-->
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>管理员列表</title>
<link rel="stylesheet" href="style/backstage.css">
</head>
<body>
<div class="details">
<div class="details_operation clearfix">
<p3>管理员列表</p3>
</div>
<table class="table" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th width="20%">序号</th>
<th width="30%">管理员名称</th>
<th width="50%">操作</th>
</tr>
</thead>
<tbody>
<?php $i=1; foreach ($rows as $row): ?>
<tr>
<!-- loop -->
<td align="center">
<label for="c1" class="label"><?php echo $i; ?></label>
</td>
<td align="center">
<?php echo $row['admin_username']; ?>
</td>
<td align="center">
<input type="button" value="修改" class="btn" onclick="editAdmin('<?php echo $row['admin_username']; ?>')" />
<input type="button" value="删除" class="btn" onclick="deleteAdmin('<?php echo $row['admin_username']; ?>')" />
</td>
<?php $i++; ?>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</body>
<script type="text/javascript">
function editAdmin(username){
window.location="editAdmin.php?username="+username;
}
function deleteAdmin(username){
if(window.confirm("不可逆的操作,继续吗?")){
window.location="doAdminAction.php?act=deleteAdmin&username="+username;
}
}
</script>
</html>