12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
- namespace Manage\Src;
- use Dever;
- class Console
- {
- # 获取控制台左侧第一个数据内容
- public function system()
- {
- $project = count(Dever::load('manage/project')->get());
- $table = count(scandir(Dever::data() . 'database/' . DEVER_PROJECT . '/')) - 2;
- $api = Dever::db('manage/api')->total();
- $log = Dever::db('manage/log')->total();
- $manage = Dever::db('manage/admin')->total();
- $sql = Dever::db('manage/opt')->total();
- $opt = Dever::db('manage/opt')->total(array('status' => 2));
- $cron = Dever::db('manage/cron')->total();
- $data[] = array
- (
- 'name' => '组件数',
- 'num' => $project,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => '数据表',
- 'num' => $table,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => '接口数',
- 'num' => $api,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => '日志数',
- 'num' => $log,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => '管理员',
- 'num' => $manage,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => '计划任务',
- 'num' => $cron,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => 'SQL语句',
- 'num' => $sql,
- 'href' => '#',
- );
- $data[] = array
- (
- 'name' => '索引数',
- 'num' => $opt,
- 'href' => '#',
- );
- return $data;
- }
- # 此处要开发插件来接管 plugin/
- public function data()
- {
- $data = array();
- return $data;
- }
- }
|