diff --git a/.example.env b/.example.env index e7218c6b..79f7c718 100755 --- a/.example.env +++ b/.example.env @@ -1 +1 @@ -APP_DEBUG = false VERSION = 4.0.0 rootuid = 1 [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = {type} HOSTNAME = {hostname} DATABASE = {database} USERNAME = {username} PASSWORD = {password} HOSTPORT = {hostport} CHARSET = utf8 PREFIX = {prefix} DEBUG = true [LANG] default_lang = zh-cn [JWT] SECRET={secret} \ No newline at end of file +APP_DEBUG = false VERSION = 4.0.0 rootuid = 1 [APP] DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = {type} HOSTNAME = {hostname} DATABASE = {database} USERNAME = {username} PASSWORD = {password} HOSTPORT = {hostport} CHARSET = utf8 PREFIX = {prefix} DEBUG = false [LANG] default_lang = zh-cn [JWT] SECRET={secret} \ No newline at end of file diff --git a/addons/sitestat/Plugin.php b/addons/sitestat/Plugin.php index a18d6dc9..fa670bf8 100644 --- a/addons/sitestat/Plugin.php +++ b/addons/sitestat/Plugin.php @@ -17,37 +17,37 @@ use \think\facade\Db; class Plugin extends \sent\Addons{ - public $info = array( - 'name'=>'Sitestat', - 'title'=>'站点统计信息', - 'description'=>'统计站点的基础信息', - 'status'=>1, - 'author'=>'molong', - 'version'=>'0.2' - ); + public $info = array( + 'name'=>'Sitestat', + 'title'=>'站点统计信息', + 'description'=>'统计站点的基础信息', + 'status'=>1, + 'author'=>'molong', + 'version'=>'0.2' + ); - public function install(){ - return true; - } + public function install(){ + return true; + } - public function uninstall(){ - return true; - } + public function uninstall(){ + return true; + } - //实现的AdminIndex钩子方法 - public function AdminIndex($param){ - $config = $this->getConfig(); - $this->assign('addons_config', $config); + //实现的AdminIndex钩子方法 + public function AdminIndex($param){ + $config = $this->getConfig(); + $this->assign('addons_config', $config); $map['status'] = array('egt',0); $maps['is_read'] = array('eq',0); - if($config['display']){ - $info['users'] = Db::name('Member')->where($map)->count(); - $info['userall'] = Db::name('Member')->count(); - $info['action'] = Db::name('ActionLog')->where(array('create_time'=>array('gt',strtotime(date('Y-m-d')))))->count(); - $info['category'] = Db::name('Category')->count(); - $info['model'] = Db::name('Model')->count(); - $this->assign('info',$info); - return $this->fetch('index/info'); - } - } + if($config['display']){ + $info['users'] = Db::name('Member')->where($map)->count(); + $info['userall'] = Db::name('Member')->count(); + $info['form'] = Db::name('Form')->count(); + $info['category'] = Db::name('Category')->count(); + $info['model'] = Db::name('Model')->count(); + $this->assign('info',$info); + return $this->fetch('index/info'); + } + } } \ No newline at end of file diff --git a/addons/sitestat/view/index/info.html b/addons/sitestat/view/index/info.html index 6fe26beb..163fedee 100644 --- a/addons/sitestat/view/index/info.html +++ b/addons/sitestat/view/index/info.html @@ -40,8 +40,8 @@
-

{$info['action']}

-

操作日志

+

{$info['form']}

+

自定义表单数