You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<?php
|
|
if (!defined('BASEPATH'))
|
|
exit('No direct script access allowed');
|
|
|
|
class Statistics extends CI_Controller
|
|
{
|
|
function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->permission->is_admin();
|
|
$this->load->model('Chinese_history_model');
|
|
}
|
|
|
|
public function Chinese_history_log()
|
|
{
|
|
$data['log_action'] = $this->input->post('log_action') ? $this->input->post('log_action') : 0;
|
|
$data['start_date'] = $this->input->post('start_date') ? $this->input->post('start_date') : date('Y-m-01');
|
|
$data['end_date'] = $this->input->post('end_date') ? $this->input->post('end_date') : date('Y-m-d',strtotime('+1 day'));
|
|
$order = $this->input->post('order') ? $this->input->post('order') : 'Created_On';
|
|
$order_field = " ORDER BY ".$order." DESC ";
|
|
|
|
$data['ret'] = $this->Chinese_history_model->get_log($data['log_action'],$data['start_date'],$data['end_date']);
|
|
foreach ($data['ret'] as $key => &$value) {
|
|
$value->action_text = $this->Chinese_history_log_type()[$value->LOG_Action];
|
|
}
|
|
$this->load->view('statistics/Chinese_history_log',$data);
|
|
}
|
|
public function Chinese_history_log_type()
|
|
{
|
|
return array(
|
|
0 => '',
|
|
1 => '进了封面的图片进入测试',
|
|
2 => '完成了前3题',
|
|
3 => '完成了10题拿到成绩单',
|
|
4 => '点击了try again!'
|
|
);
|
|
}
|
|
|
|
|
|
}
|