From e1739209e38d5ff2034f74d384433105b892874f Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Tue, 19 Nov 2019 11:27:10 +0800 Subject: [PATCH] 1 --- .../Controller/IndexController.class.php | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/IndexController.class.php b/Application/Admin/Controller/IndexController.class.php index 869416cf5..30f0498e5 100644 --- a/Application/Admin/Controller/IndexController.class.php +++ b/Application/Admin/Controller/IndexController.class.php @@ -29,8 +29,36 @@ class IndexController extends AdminController { * @author cz * */ - public function index(Type $var = null) + public function index() { + if(session('user_auth.uid')){ + $data=M('Member') + ->field('uid,nickname,username,us.last_login_time,us.last_login_ip,login') + ->join('sys_ucenter_member as us on sys_member.uid = us.id') + ->where(array('uid'=>session('user_auth.uid'))) + ->find(); + header("Content-type: text/html; charset=utf-8"); + if(is_administrator()){ + $data['group']='超级管理员'; + }else{ + $data['group'] = get_auth_group_name($data['uid']); + } + } + $this->assign('data',$data); + $this->indextt(); + + $this->meta_title = '管理首页'; + + // 日历 + $this->calendar(); + + $tm = strtotime("-1 day"); + dump(); + $allcount = M("IndexChart","tab_")->field("all_count")->where("`date` = '{$tm}'")->find(); + dump($allcount); + + //累计统计 + # code... }