index.php
3.85 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
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
$this->title = "账号管理";
$this->params['breadcrumbs'][] = '系统管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-md-12" style="padding:0px 5px 10px 0px;">
<form action="" method="get" class="filter-form">
<table>
<tr>
<td width="5%">
<a href="<?php echo Url::toRoute('/system/account/create'); ?>" class="btn btn-success">新建账号</a>
</td>
<td width="1%">
</td>
<td width="40%">
<div class="input-group">
<input type="text" class="form-control" name="keyword" value="<?= $get['keyword'] ?>" placeholder="输入用户名/真实姓名" style="width:300px">
<button type="submit" class="btn btn-primary" >搜索</button>
<a href="<?php echo Url::toRoute('/system/account/index'); ?>" class="btn btn-default">重置</a>
</div>
</td>
<td width="53%"> </td>
</tr>
</table>
</form>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th width="10%">用户名</th>
<th width="20%">角色</th>
<th width="15%">邮箱</th>
<th width="10%">姓名</th>
<th width="10%">手机</th>
<th width="5%">是否启用</th>
<th width="15%">操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $user) : ?>
<tr>
<td style="padding:12px;">
<?= $user['username'] ?>
</td>
<td style="padding:12px;">
<?= $user['roles'] ?>
</td>
<td style="padding:12px;">
<?= $user['email'] ?>
</td>
<td style="padding:12px;">
<?= $user['realname'] ?>
</td>
<td style="padding:12px;">
<?= $user['mobile'] ?>
</td>
<td style="padding:12px;">
<?= $user['is_enable_label'] ?>
</td>
<td style="padding:12px;">
<?php if('admin' != $user['username'] ) {?><a href="<?php echo Url::toRoute(['/system/account/set-role', 'id' => $user['id']]) ?>"><span class="btn btn-success" style="padding:8px;">设置角色</span></a> <?php }?>
<a href="<?php echo Url::toRoute(['/system/account/update', 'id' => $user['id']]) ?>"><span class="btn btn-primary" style="padding:8px;">编辑</span></a>
<?php if('admin' != $user['username'] ) {?> <a href="<?php echo Url::toRoute(['/system/account/enable', 'id' => $user['id']]) ?>"><span class="btn btn-danger" style="padding:8px;"><?php echo $user['is_enable_opt'] ?></span></a><?php }?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="panel-footer">
<div class="hqy-panel-pager">
<?= LinkPager::widget([
'pagination' => $pages,
]); ?>
<div class="clearfix"></div>
</div>
</div>
</div>