index.html
5.8 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a>{:lang('USER_INDEXADMIN_INDEX')}</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index')}" style="width:42%;float:left;">
用户ID:
<input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
placeholder="请输入用户ID">
关键字:
<input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
placeholder="用户名/昵称/邮箱/手机">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
</form>
<form id="form1" class="well form-inline margin-top-20" method="post" action="{:url('user/AdminIndex/export')}" style="width:48%;float:left;">
<input type="hidden" id="export_value" value="0" name="ids">
<button class="btn btn-success" id="export">导出数据</button>
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="15">
<label>
<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
</label>
</th>
<th>ID</th>
<!--<th>{:lang('USERNAME')}</th>-->
<th>{:lang('NICENAME')}</th>
<th>{:lang('AVATAR')}</th>
<!--<th>{:lang('EMAIL')}</th>-->
<th>手机号</th>
<th>{:lang('REGISTRATION_TIME')}</th>
<th>{:lang('LAST_LOGIN_TIME')}</th>
<th>{:lang('LAST_LOGIN_IP')}</th>
<th>{:lang('STATUS')}</th>
<th>{:lang('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<php>
$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
</php>
<foreach name="list" item="vo">
<tr>
<td>
<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
value="{$vo.id}" title="ID:{$vo.id}">
</td>
<td>{$vo.id}</td>
<!--<td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}-->
</td>
<td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
<td>
<notempty name="vo.avatar">
<img width="25" height="25" src="{:cmf_get_image_url($vo.avatar)}"/>
<else/>
<img width="25" height="25" src="__TMPL__/public/assets/images/headicon.png"/>
</notempty>
</td>
<!--<td>{$vo.user_email}</td>-->
<td>{$vo.mobile}</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
<td>{$vo.last_login_ip}</td>
<td>
<switch name="vo.user_status">
<case value="0">
<span class="label label-danger">{$user_statuses[$vo['user_status']]}</span>
</case>
<case value="1">
<span class="label label-success">{$user_statuses[$vo['user_status']]}</span>
</case>
<case value="2">
<span class="label label-warning">{$user_statuses[$vo['user_status']]}</span>
</case>
</switch>
</td>
<td>
<neq name="vo.id" value="1">
<empty name="vo.user_status">
<a class="btn btn-xs btn-success js-ajax-dialog-btn"
href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
<else/>
<a class="btn btn-xs btn-warning js-ajax-dialog-btn"
href="{:url('adminIndex/ban',array('id'=>$vo['id']))}"
data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
</empty>
<else/>
<a class="btn btn-xs btn-warning disabled">{:lang('BLOCK_USER')}</a>
</neq>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
<script>
$(function(){
$('#export').click(function(){
var check = $('.js-check:checked');
if(check.length < 1){
alert('请选择要导出的数据');
return false;
}
var chk_value =[];
$.each(check,function(){
chk_value.push($(this).val());
});
var val = chk_value.join(',');
$('#export_value').val(val);
$('#from1').submit();
});
});
</script>