app/admin/controller/System.php
(开头部分) 21KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 人人站CMS
* ============================================================================
* 版权所有 2015-2030 山东康程信息科技有限公司,并保留所有权利。
* 网站地址: http://www.rrzcms.com
* ----------------------------------------------------------------------------
* 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷.
* ============================================================================
*/
namespace app\admin\controller;
use \think\facade\Db;
class System extends Base
{
function index() {
$this->pagedata['tabs'] = [
['name' => '管理员列表',],
];
$this->pagedata['actions'] = [
['label' => '添加管理员', 'target' => 'dialog', 'href' => U('System/addAdmin'), 'options' => '{title:"添加管理员",area:["400px"]}',],
];
$this->pagedata['columns'] = [
['field' => 'id', 'title' => 'ID', 'width' => '100',],
['field' => 'head_pic', 'title' => '', 'width' => '50', 'callback' => function ($item) {
return '<img width="40" height="40" src="' . ($item['head_pic'] ?: '/static/images/dfboy.png') . '"/>';
},],
['field' => 'user_name', 'title' => '用户名', 'width' => '100', 'align' => 'left',],
['field' => 'true_name', 'title' => '真实姓名', 'width' => '100',],
['field' => 'mobile', 'title' => '手机号码', 'width' => '150',],
['field' => 'last_login', 'title' => '最后登录时间', 'width' => '150', 'type' => 'time',],
['field' => 'cz', 'title' => '操作', 'width' => '100', 'callback' => function ($item) {
$html = '<a href="' . U('System/addAdmin', ['id' => $item['id'],]) . '" options="{title:\'编辑管理员\',area:[\'400px\']}" target="dialog" class="layui-btn layui-btn-xs">编辑</a>';
if ($item['id'] != 1) {
$html .= '<a href="' . U('System/delAdmin', ['id' => $item['id'],]) . '" msg="确定要删除吗?" target="confirm" class="layui-btn layui-btn-danger layui-btn-xs">删除</a>';
}
return $html;
}],
];
$this->pagedata['model'] = M('admin')->where('status', 1);
$this->pagedata['fixedColumn'] = true;
return $this->grid_fetch();
}
/**
* 删除管理员账号
*/
function delAdmin() {
$id = I('get.id');
$rs = M('admin')->where('id', $id)->delete();
$rs or $this->error('删除失败!');
$this->success('删除成功!', true);
}
/**
* 添加管理员账号
*/
function addAdmin() {
后面还有 418 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。