2024-08-31 01:03:37 +08:00

55 lines
1.7 KiB
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
class adminAnalysis extends Controller{
function __construct() {
parent::__construct();
$this->model = Model('Analysis');
}
public function option(){
$list = array('user', 'file', 'access', 'server');
$type = Input::get('type','in',null,$list);
$result = $this->model->option($type);
show_json($result);
}
public function chart(){
$data = Input::getArray(array(
'userID' => array("check"=>"int","default"=>null),
'groupID' => array("check"=>"int","default"=>null),
));
$result = $this->model->fileChart($data);
show_json($result);
}
// 计划任务写入记录regist、store
public function record(){
$type = Input::get('type','in',null,array('regist', 'store'));
$result = $this->model->record($type);
$msg = !!$result ? LNG('explorer.success') : LNG('explorer.error');
show_json($msg,!!$result);
}
// 列表:用户空间、部门空间
public function table(){
$type = Input::get('type','in',null,array('user', 'group'));
$result = $this->model->listTable($type);
show_json($result);
}
/**
* 趋势userTrend、storeTrend
* userTrend: 每日增长regist,写计划任务、每日登录log
* storeTrend: 使用空间、时间使用——计划任务
* @return void
*/
public function trend(){
$data = Input::getArray(array(
'type' => array('check' => 'require', 'default' => 'user'), // user/store
'time' => array('check' => 'require', 'default' => 'day'), // day/week/month/year
));
$result = $this->model->trend($data['type'], $data['time']);
show_json($result);
}
}