[更新]修正文件上传后缀检查,同步更新后台UI

This commit is contained in:
Anyon 2017-09-27 16:22:16 +08:00
parent ac1d208534
commit 7530c06b6a
13 changed files with 803 additions and 821 deletions

View File

@ -70,9 +70,12 @@ class Auth extends BasicAdmin
$checked = Db::name('SystemAuthNode')->where(['auth' => $auth_id])->column('node');
foreach ($nodes as $key => &$node) {
$node['checked'] = in_array($node['node'], $checked);
if (empty($node['is_auth']) && substr_count($node['node'], '/') > 1) {
unset($nodes[$key]);
}
}
$all = $this->_apply_filter(ToolsService::arr2tree($nodes, 'node', 'pnode', '_sub_'));
$this->success('获取节点成功!', '', $all);
$allnode = $this->_apply_filter(ToolsService::arr2tree($nodes, 'node', 'pnode', '_sub_'));
$this->success('获取节点成功!', '', $allnode);
}
/**
@ -101,6 +104,8 @@ class Auth extends BasicAdmin
foreach ($nodes as $key => &$node) {
if (!empty($node['_sub_']) && is_array($node['_sub_'])) {
$node['_sub_'] = $this->_apply_filter($node['_sub_'], $level + 1);
} elseif ($level < 3) {
unset($nodes[$key]);
}
}
return $nodes;
@ -151,7 +156,7 @@ class Auth extends BasicAdmin
{
if (DataService::update($this->table)) {
$id = $this->request->post('id');
Db::name('SystemAuthNode')->where(['auth' => $id])->delete();
Db::name('SystemAuthNode')->where('auth', $id)->delete();
$this->success("权限删除成功!", '');
}
$this->error("权限删除失败,请稍候再试!");

View File

@ -60,7 +60,7 @@ class Config extends BasicAdmin
public function file()
{
$this->title = '文件存储配置';
$alert = ['type' => 'success', 'title' => '操作提示', 'content' => '文件引擎参数影响全局文件上传功能请勿随意修改!'];
$alert = ['type' => 'success', 'title' => '操作提示', 'content' => '文件引擎参数影响全局文件上传功能,请勿随意修改!'];
$this->assign('alert', $alert);
return $this->index();
}

View File

@ -63,7 +63,7 @@ class Index extends BasicAdmin
continue;
// 菜单链接不为空时,判断登录状态及权限验证
elseif ($menu['url'] !== '#') :
$node = join('/', array_slice(explode('/', preg_replace('/[\W]/', '/', $menu['url'])), 0, 3));
$node = join('/', array_slice(explode('/', preg_replace('/[\W^_]/', '/', $menu['url'])), 0, 3));
$menu['url'] = url($menu['url']);
// 节点需要验证验证,未登录时移除此菜单
if (isset($nodes[$node]) && $nodes[$node]['is_login'] && !session('user')) :

View File

@ -20,7 +20,7 @@ use think\Db;
/**
* 系统日志管理
* Class Log
* Class User
* @package app\admin\controller
* @author Anyon <zoujingli@qq.com>
* @date 2017/02/15 18:12

View File

@ -83,7 +83,7 @@ class Menu extends BasicAdmin
{
if ($this->request->isGet()) {
// 上级菜单处理
$_menus = Db::name($this->table)->where(['status' => '1'])->order('sort asc,id asc')->select();
$_menus = Db::name($this->table)->where('status', '1')->order('sort desc,id desc')->select();
$_menus[] = ['title' => '顶级菜单', 'id' => '0', 'pid' => '-1'];
$menus = ToolsService::arr2table($_menus);
foreach ($menus as $key => &$menu) {

View File

@ -16,6 +16,7 @@ namespace app\admin\controller;
use controller\BasicAdmin;
use service\FileService;
use think\Db;
/**
* 插件助手控制器

View File

@ -41,7 +41,7 @@ class User extends BasicAdmin
{
$this->title = '系统用户管理';
$get = $this->request->get();
$db = Db::name($this->table)->where(['is_deleted' => '0']);
$db = Db::name($this->table)->where(['is_deleted' => '0', 'type' => '系统用户']);
foreach (['username', 'phone'] as $key) {
if (isset($get[$key]) && $get[$key] !== '') {
$db->where($key, 'like', "%{$get[$key]}%");
@ -64,7 +64,7 @@ class User extends BasicAdmin
*/
public function add()
{
return $this->_form($this->table, 'form');
return $this->_form($this->table, 'form', 'id', [], ['type' => '系统用户']);
}
/**
@ -72,7 +72,7 @@ class User extends BasicAdmin
*/
public function edit()
{
return $this->_form($this->table, 'form');
return $this->_form($this->table, 'form', 'id', [], ['type' => '系统用户']);
}
/**

View File

@ -2,89 +2,81 @@
{block name="button"}
<div class="nowrap pull-right" style="margin-top:10px">
<button data-modal='{:url("$classuri/add")}' data-title="添加权限" class='layui-btn layui-btn-small'>
<i class='fa fa-plus'></i> 添加权限
</button>
<button data-update data-field='delete' data-action='{:url("$classuri/del")}'
class='layui-btn layui-btn-small layui-btn-danger'>
<i class='fa fa-remove'></i> 删除权限
</button>
<button data-modal='{:url("$classuri/add")}' data-title="添加权限" class='layui-btn layui-btn-small'><i class='fa fa-plus'></i> 添加权限</button>
<button data-update data-field='delete' data-action='{:url("$classuri/del")}' class='layui-btn layui-btn-small layui-btn-danger'><i class='fa fa-remove'></i> 删除权限</button>
</div>
{/block}
{block name="content"}
<form onsubmit="return false;" data-auto="true" method="post">
{if empty($list)}
<p class="help-block text-center well"> 哦!</p>
{else}
{if !empty($list)}
<input type="hidden" value="resort" name="action"/>
<table class="layui-table" lay-skin="line" lay-size="sm">
<table class="table table-hover">
<thead>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='list-table-sort-td'>
<button type="submit" class="layui-btn layui-btn-normal layui-btn-mini"> </button>
</th>
<th class='text-center'>权限名称</th>
<th class='text-center'>权限描述</th>
<th class='text-center'>状态</th>
<th class='text-center'>操作</th>
</tr>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='list-table-sort-td'>
<button type="submit" class="layui-btn layui-btn-normal layui-btn-mini"> </button>
</th>
<th class='text-center'>权限名称</th>
<th class='text-center'>权限描述</th>
<th class='text-center'>状态</th>
<th class='text-center'>操作</th>
</tr>
</thead>
<tbody>
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'/>
</td>
<td class='list-table-sort-td'>
<input name="_{$vo.id}" value="{$vo.sort}" class="list-sort-input"/>
</td>
<td class='text-center'>{$vo.title}</td>
<td class='text-center'>{$vo.desc|default="<span style='color:#ccc'>没有写描述哦!</span>"}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'/>
</td>
<td class='list-table-sort-td'>
<input name="_{$vo.id}" value="{$vo.sort}" class="list-sort-input"/>
</td>
<td class='text-center'>{$vo.title}</td>
<td class='text-center'>{$vo.desc|default="<span style='color:#ccc'>没有写描述哦!</span>"}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{if auth("$classuri/edit")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
{/if}
{if auth("$classuri/edit")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
{/if}
{if auth("$classuri/apply")}
<span class="text-explode">|</span>
<a data-open='{:url("$classuri/apply")}?id={$vo.id}' href="javascript:void(0)">授权</a>
{/if}
{if auth("$classuri/apply")}
<span class="text-explode">|</span>
<a data-open='{:url("$classuri/apply")}?id={$vo.id}' href="javascript:void(0)">授权</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='0' data-action='{:url("$classuri/forbid")}'
href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}'
href="javascript:void(0)">启用</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='0'data-action='{:url("$classuri/forbid")}' href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}' href="javascript:void(0)">启用</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='delete' data-action='{:url("$classuri/del")}'
href="javascript:void(0)">删除</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='delete' data-action='{:url("$classuri/del")}' href="javascript:void(0)">删除</a>
{/if}
</td>
</tr>
{/foreach}
</td>
</tr>
{/foreach}
</tbody>
</table>
{if isset($page)}<p>{$page}</p>{/if}
{else}
<p class="help-blok">暂时无记录</p>
{/if}
</form>
{/block}

View File

@ -3,8 +3,7 @@
{block name="button"}
<div class="nowrap pull-right" style="margin-top:10px">
{if auth("$classuri/del")}
<button data-update data-field='delete' data-action='{:url("$classuri/del")}'
class='layui-btn layui-btn-small layui-btn-danger'>
<button data-update data-field='delete' data-action='{:url("$classuri/del")}' class='layui-btn layui-btn-small layui-btn-danger'>
<i class='fa fa-remove'></i> 删除日志
</button>
{/if}
@ -14,78 +13,77 @@
{block name="content"}
<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width:auto">操作者</label>
<div class="layui-input-inline">
<input name="username" value="{$Think.get.username|default=''}" placeholder="请输入操作者" class="layui-input">
</div>
</div>
<form class="animated form-search" action="__SELF__" onsubmit="return false" method="get">
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width:auto">操作行为</label>
<div class="layui-input-inline">
<select name='action' class='layui-select' lay-search="">
<option value=''> - 所有记录 -</option>
<!--{foreach $actions as $action}-->
<!--{if $action===$Think.get.action}-->
<option selected="selected" value='{$action}'>{$action}</option>
<!--{else}-->
<option value='{$action}'>{$action}</option>
<!--{/if}-->
<!--{/foreach}-->
</select>
<div class="row">
<div class="col-xs-3">
<div class="form-group">
<input type="text" name="username" value="{$Think.get.username|default=''}" placeholder="操作者" class="input-sm form-control">
</div>
</div>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width:auto">操作内容</label>
<div class="layui-input-inline">
<input name="content" value="{$Think.get.content|default=''}" placeholder="请输入操作内容" class="layui-input">
<div class="col-xs-3">
<div class="form-group">
<select name='action' class='input-sm form-control'>
<option value=''> - 行为 - </option>
<!--{foreach $actions as $action}-->
<!--{if $action===$Think.get.action}-->
<option selected="selected" value='{$action}'>{$action}</option>
<!--{else}-->
<option value='{$action}'>{$action}</option>
<!--{/if}-->
<!--{/foreach}-->
</select>
</div>
</div>
</div>
<div class="layui-form-item layui-inline">
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
<div class="col-xs-3">
<div class="form-group">
<input type="text" name="content" value="{$Think.get.content|default=''}" placeholder="操作内容" class="input-sm form-control">
</div>
</div>
<div class="col-xs-1">
<div class="form-group">
<button type="submit" class="btn btn-sm btn-white"><i class="fa fa-search"></i> 搜索</button>
</div>
</div>
</div>
</form>
<!-- 表单搜索 结束 -->
<form onsubmit="return false;" data-auto="" method="POST">
<input type="hidden" value="resort" name="action"/>
<table class="layui-table" lay-skin="line" lay-size="sm">
<table class="table table-hover">
<thead>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='text-center'>操作者</th>
<th class='text-left'>节点</th>
<th class='text-left'>行为</th>
<th class='text-left'>操作内容</th>
<th class='text-left'>操作位置</th>
<th class='text-left'>操作时间</th>
</tr>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='text-center'>操作者</th>
<th class='text-left'>节点</th>
<th class='text-left'>行为</th>
<th class='text-left'>操作内容</th>
<th class='text-left'>操作位置</th>
<th class='text-left'>操作时间</th>
</tr>
</thead>
<tbody>
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'/>
</td>
<td class='text-center'>{$vo.username}</td>
<td class='text-left'>{$vo.node}</td>
<td class='text-left'>{$vo.action}</td>
<td class='text-left'>{$vo.content}</td>
<td class='text-left'>{$vo.isp|default=$vo.ip}</td>
<td class='text-left'>{$vo.create_at}</td>
</tr>
{/foreach}
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'/>
</td>
<td class='text-center'>{$vo.username}</td>
<td class='text-left'>{$vo.node}</td>
<td class='text-left'>{$vo.action}</td>
<td class='text-left'>{$vo.content}</td>
<td class='text-left'>{$vo.isp|default=$vo.ip}</td>
<td class='text-left'>{$vo.create_at}</td>
</tr>
{/foreach}
</tbody>
</table>
{if isset($page)}<p>{$page}</p>{/if}
<script>
window.form.render();
</script>
</form>
{/block}

View File

@ -19,10 +19,12 @@
欢迎登录 {:sysconf('app_name')} 后台管理 <sup>{:sysconf('app_version')}</sup>
</span>
<ul>
<!--<li class="notselect"><a href="javascript:void(0)" target="_blank">帮助</a></li>-->
<li class="notselect">
<a href="javascript:void(0)" target="_blank">帮助</a>
</li>
<li class="notselect">
<a href="http://sw.bos.baidu.com/sw-search-sp/software/4bcf5e4f1835b/ChromeStandalone_54.0.2840.99_Setup.exe">
<b>推荐使用谷歌浏览器</b>
<b>推荐谷歌浏览器</b>
</a>
</li>
</ul>
@ -41,13 +43,13 @@
<ul>
<li>
<input name='username' class="hide"/>
<input required="required" pattern="^\S{4,}$" value="admin" name="username"
<input required="required" pattern="^\S{4,}$" value="" name="username"
autofocus="autofocus" autocomplete="off" class="login-input username"
title="请输入4位及以上的字符" placeholder="请输入用户名/手机号码"/>
</li>
<li>
<input name='password' class="hide"/>
<input required="required" pattern="^\S{4,}$" value="admin" name="password"
<input required="required" pattern="^\S{4,}$" value="" name="password"
type="password" autocomplete="off" class="login-input password"
title="请输入4位及以上的字符" placeholder="请输入密码"/>
</li>
@ -62,7 +64,7 @@
<!-- 底部版权信息 开始 -->
{if sysconf('site_copy')}
<div class="footer notselect">{:sysconf('site_copy')}</div>
<div class="footer animated fadeInUp notselect">{:sysconf('site_copy')}</div>
{/if}
<!-- 底部版本信息 结束 -->

View File

@ -2,12 +2,8 @@
{block name="button"}
<div class="nowrap pull-right" style="margin-top:10px">
<button data-modal='{:url("$classuri/add")}' data-title="添加菜单" class='layui-btn layui-btn-small'><i
class='fa fa-plus'></i> 添加菜单
</button>
<button data-update data-field='delete' data-action='{:url("$classuri/del")}'
class='layui-btn layui-btn-small layui-btn-danger'><i class='fa fa-remove'></i> 删除菜单
</button>
<button data-modal='{:url("$classuri/add")}' data-title="添加菜单" class='layui-btn layui-btn-small'><i class='fa fa-plus'></i> 添加菜单</button>
<button data-update data-field='delete' data-action='{:url("$classuri/del")}' class='layui-btn layui-btn-small layui-btn-danger'><i class='fa fa-remove'></i> 删除菜单</button>
</div>
{/block}
@ -15,65 +11,62 @@
<form onsubmit="return false;" data-auto="true" method="post">
<input type="hidden" value="resort" name="action"/>
<table class="layui-table" lay-skin="line" lay-size="sm">
<table class="table table-hover">
<thead>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='list-table-sort-td'>
<button type="submit" class="layui-btn layui-btn-normal layui-btn-mini"> </button>
</th>
<th class='text-center'></th>
<th>菜单名称</th>
<th class='visible-lg'>菜单链接</th>
<th class='text-center'>状态</th>
<th class='text-center'>操作</th>
</tr>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='list-table-sort-td'>
<button type="submit" class="layui-btn layui-btn-normal layui-btn-mini"> </button>
</th>
<th class='text-center'></th>
<th>菜单名称</th>
<th class='visible-lg'>菜单链接</th>
<th class='text-center'>状态</th>
<th class='text-center'>操作</th>
</tr>
</thead>
<tbody>
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.ids}' type='checkbox'/>
</td>
<td class='list-table-sort-td'>
<input name="_{$vo.id}" value="{$vo.sort}" class="list-sort-input"/>
</td>
<td class='text-center'>
<i style="font-size:18px;" class="{$vo.icon}"></i>
</td>
<td>{$vo.spl}{$vo.title}</td>
<td class='visible-lg'>{$vo.url}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{if auth("$classuri/edit")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.ids}" data-field='status' data-value='0' data-action='{:url("$classuri/forbid")}'
href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.ids}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}'
href="javascript:void(0)">启用</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.ids}" data-field='delete' data-action='{:url("$classuri/del")}'
href="javascript:void(0)">删除</a>
{/if}
</td>
</tr>
{/foreach}
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.ids}' type='checkbox'/>
</td>
<td class='list-table-sort-td'>
<input name="_{$vo.id}" value="{$vo.sort}" class="list-sort-input"/>
</td>
<td class='text-center'>
<i style="font-size:18px;" class="{$vo.icon}"></i>
</td>
<td>{$vo.spl}{$vo.title}</td>
<td class='visible-lg'>{$vo.url}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{if auth("$classuri/edit")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.ids}" data-field='status' data-value='0'data-action='{:url("$classuri/forbid")}' href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.ids}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}' href="javascript:void(0)">启用</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.ids}" data-field='delete' data-action='{:url("$classuri/del")}' href="javascript:void(0)">删除</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</form>

File diff suppressed because it is too large Load Diff

View File

@ -14,98 +14,97 @@
{block name="content"}
<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width:auto">用户名</label>
<div class="layui-input-inline">
<input name="username" value="{$Think.get.username|default=''}" placeholder="请输入用户名" class="layui-input">
</div>
</div>
<form class="animated form-search" action="__SELF__" onsubmit="return false" method="get">
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width:auto">手机号</label>
<div class="layui-input-inline">
<input name="phone" value="{$Think.get.phone|default=''}" placeholder="请输入手机号" class="layui-input">
<div class="row">
<div class="col-xs-3">
<div class="form-group">
<input type="text" name="username" value="{$Think.get.username|default=''}" placeholder="用户名" class="input-sm form-control">
</div>
</div>
</div>
<div class="layui-form-item layui-inline">
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
<div class="col-xs-3">
<div class="form-group">
<input type="text" name="phone" value="{$Think.get.phone|default=''}" placeholder="手机号" class="input-sm form-control">
</div>
</div>
<div class="col-xs-1">
<div class="form-group">
<button type="submit" class="btn btn-sm btn-white"><i class="fa fa-search"></i> 搜索</button>
</div>
</div>
</div>
</form>
<!-- 表单搜索 结束 -->
<form onsubmit="return false;" data-auto="true" method="post">
{if empty($list)}
<p class="help-block text-center well"> 哦!</p>
{else}
<form onsubmit="return false;" data-auto="" method="POST">
<input type="hidden" value="resort" name="action"/>
<table class="layui-table" lay-skin="line" lay-size="sm">
<table class="table table-hover">
<thead>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='text-center'>用户账号</th>
<th class='text-center'>手机号</th>
<th class='text-center'>电子邮箱</th>
<th class='text-center'>登录次数</th>
<th class='text-center'>最后登录</th>
<th class='text-center'>状态</th>
<th class='text-center'>操作</th>
</tr>
<tr>
<th class='list-table-check-td'>
<input data-none-auto="" data-check-target='.list-check-box' type='checkbox'/>
</th>
<th class='text-center'>用户账号</th>
<th class='text-center'>手机号</th>
<th class='text-center'>电子邮箱</th>
<th class='text-center'>登录次数</th>
<th class='text-center'>最后登录</th>
<th class='text-center'>状态</th>
<th class='text-center'>操作</th>
</tr>
</thead>
<tbody>
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'/>
</td>
<td class='text-center'>{$vo.username}</td>
<td class='text-center'>{$vo.phone|default="<span style='color:#ccc'>还没有设置手机号</span>"}</td>
<td class='text-center'>{$vo.mail|default="<span style='color:#ccc'>还没有设置邮箱</span>"}</td>
<td class='text-center'>{$vo.login_num|default="<span style='color:#ccc'>从未登录</span>"}</td>
<td class='text-center'>{$vo.login_at|default="<span style='color:#ccc'>从未登录</span>"}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{if auth("$classuri/edit")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
{/if}
{if auth("$classuri/auth")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/auth")}?id={$vo.id}' href="javascript:void(0)">授权</a>
{/if}
{if auth("$classuri/pass")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/pass")}?id={$vo.id}' href="javascript:void(0)">密码</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='0' data-action='{:url("$classuri/forbid")}'
href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}'
href="javascript:void(0)">启用</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='delete' data-action='{:url("$classuri/del")}'
href="javascript:void(0)">删除</a>
{/if}
</td>
</tr>
{/foreach}
{foreach $list as $key=>$vo}
<tr>
<td class='list-table-check-td'>
<input class="list-check-box" value='{$vo.id}' type='checkbox'/>
</td>
<td class='text-center'>{$vo.username}</td>
<td class='text-center'>{$vo.phone|default="<span style='color:#ccc'>还没有设置手机号</span>"}</td>
<td class='text-center'>{$vo.mail|default="<span style='color:#ccc'>还没有设置邮箱</span>"}</td>
<td class='text-center'>{$vo.login_num|default="<span style='color:#ccc'>从未登录</span>"}</td>
<td class='text-center'>{$vo.login_at|default="<span style='color:#ccc'>从未登录</span>"}</td>
<td class='text-center'>
{if $vo.status eq 0}
<span>已禁用</span>
{elseif $vo.status eq 1}
<span style="color:#090">使用中</span>
{/if}
</td>
<td class='text-center nowrap'>
{if auth("$classuri/edit")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/edit")}?id={$vo.id}' href="javascript:void(0)">编辑</a>
{/if}
{if auth("$classuri/auth")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/auth")}?id={$vo.id}' href="javascript:void(0)">授权</a>
{/if}
{if auth("$classuri/pass")}
<span class="text-explode">|</span>
<a data-modal='{:url("$classuri/pass")}?id={$vo.id}' href="javascript:void(0)">密码</a>
{/if}
{if $vo.status eq 1 and auth("$classuri/forbid")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='0' data-action='{:url("$classuri/forbid")}'
href="javascript:void(0)">禁用</a>
{elseif auth("$classuri/resume")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='status' data-value='1' data-action='{:url("$classuri/resume")}'
href="javascript:void(0)">启用</a>
{/if}
{if auth("$classuri/del")}
<span class="text-explode">|</span>
<a data-update="{$vo.id}" data-field='delete' data-action='{:url("$classuri/del")}'
href="javascript:void(0)">删除</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{if isset($page)}<p>{$page}</p>{/if}
{/if}
</form>
{/block}