{include file='ebcms@common/header' /}
{php} $grades = \ebcms\Config::get('user.base.grade'); $currency = \ebcms\Config::get('user.base.currency'); $where = []; if($q = input('q')){ if(0 === stripos($q,'id:')){ $where['id'] = ['eq',mb_substr($q,3)]; }else{ $where['nickname|email'] = ['like','%'.$q.'%']; } } if(input('?status') && input('status')!=''){ $where['status'] = input('status'); } if(input('?grade') && input('grade')!=''){ $where['grade'] = input('grade'); } $order = []; if(input('order') && input('sort')){ $order[input('order')] = (input('sort')=='desc')?'desc':'asc'; } $data = \app\user\model\User::with('currency') -> where($where) -> order($order) -> paginate(10,false,['query'=>input('get.')]); $currency = \ebcms\Config::get('user.base.currency'); {/php}

### 用户管理

id | 操作 | 状态 | 昵称 | 邮箱 | 会员组 | 财富 | 登陆次数 | 最后登陆时间 | 注册时间
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
{foreach name='data' item='vo'}
{$vo.id} | {if condition="check_auth('currency')"} {/if} {if condition="check_auth('msg')"} {/if} {if condition="check_auth('edit')"} {/if} | {if condition="check_auth('status')"} {switch name='vo.status'} {case value='99'} {/case} {case value='1'} {/case} {default/} {/switch} {/if} | {$vo.nickname} | {$vo.email} | {$grades[$vo['grade']]|default="未定义"} | {foreach name='currency' item='v' key='k'} {$v}：{$vo['currency'][$k]}， {/foreach} | {$vo.login_times} | {$vo.login_time|date='Y-m-d H:i:s',###} | {$vo.create_time|date='Y-m-d H:i:s',###}
{/foreach}
选择 |

{$data -> render()}
{include file='ebcms@common/footer' /}