| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <include file="public@header"/>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li class="active"><a>用户列表</a></li>
- </ul>
- <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index')}">
- 用户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-default" href="{:url('user/adminIndex/index')}">清空</a>
- <a class="btn btn-warning" href="{:url('user/adminIndex/export')}">导出</a>
- <a class="btn btn-danger" onclick="doDelete()">批量删除</a>
- </form>
- <form method="post" class="js-ajax-form">
- <table class="table table-hover table-bordered">
- <thead>
- <tr>
- <th><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
- <th>ID</th>
- <th>账号</th>
- <th>{:lang('NICENAME')}</th>
- <th>真实姓名</th>
- <th>级别</th>
- <th>积分</th>
- <th>余额</th>
- <!--<th>微信号</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>{$vo['real_name']?$vo['real_name']:lang('NOT_FILLED')}</td>
- <!--<td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['id']))}"/></td>-->
- <!--<td>{$vo.user_email}</td>-->
- <td>v{$vo.level}</td>
- <td>{$vo.score}</td>
- <td>{$vo.balance}</td>
- <!--<td>v{$vo.wechat_account}</td>-->
- <td>{$vo.mobile}</td>
- <td>{:date('y-m-d H:i',$vo['create_time'])}</td>
- <td>{:date('y-m-d H:i',$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">已冻结</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>
- <a class="btn btn-xs btn-primary" href="{:url('adminIndex/edit',array('id'=>$vo['id']))}">编辑</a>
- <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="确认冻结该用户?">冻结</a>
- </empty>
- <else/>
- <a class="btn btn-xs btn-warning disabled">冻结</a>
- </neq>
- </td>
- </tr>
- </foreach>
- </tbody>
- </table>
- <div class="pagination">{$page}</div>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script>
- function reloadPage(win) {
- win.location.reload();
- }
- $(function () {
- setCookie("refersh_time", 3);
- Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
- //批量冻结
- $('#js-batch-delete').click(function (e) {
- var ids = [];
- $("input[name='ids[]']").each(function () {
- if ($(this).is(':checked')) {
- ids.push($(this).val());
- }
- });
- if (ids.length == 0) {
- return false;
- }
- ids = ids.join(',');
- /*art.dialog.open("/user/admin_index/del.html?ids="+ids, {
- title: "批量冻结",
- width: "300px",
- close : function () {
- art.dialog.open.origin.location.reload();
- }
- });*/
- });
- //end
- });
- });
- </script>
- <script>
- function doDelete() {
- // Wind.use('artDialog', function () {
- var ids = [];
- $(".js-check:checked").each(function () {
- var id = $(this).val();
- if (id > 0) {
- ids.push(id);
- }
- });
- if (ids.length <= 0) {
- showMsg('请先选择操作项');
- return false;
- }
- if(confirm('确定批量删除选择项?不可恢复')){
- $.post('/user/admin_index/del',{id:ids},function(res){
- if(res.code == 1){
- showMsg(res.msg);
- setTimeout(function () {
- location.reload();
- }, 800)
- }else{
- showMsg(res.msg);
- }
- },"json")
- }
- // });
- }
- /* function showMsg(msg, time){
- time = time? time : 1000;
- art.dialog({
- content: msg,
- icon: 'warning'
- });
- setTimeout(function () {
- }, time)
- }*/
- </script>
- </body>
- </html>
|