function __construct() { parent::__construct(); /* * 请求的时间格式为 YYYY-mm-dd hh:mm:ss * 使用strtotime转换为unix timestamp * 如果没有设置开始时间,则默认为当天 */ if (isset($this->req->data->time)) { $this->req->data->time = strtotime($this->req->data->time); } else { $this->req->data->time = time(); } $this->year = date("Y", $this->req->data->time); $this->mon = date("m", $this->req->data->time); $this->mday = date("d", $this->req->data->time); }
function __construct() { parent::__construct(); $this->db = Database::instance(); /* * 请求的时间格式为 YYYY-mm-dd hh:mm:ss * 使用strtotime转换为unix timestamp * 如果没有设置起止时间,则默认结束时间为当前时间,开始时间为当前时间前3小时 */ if (isset($this->req->data->startTime) && isset($this->req->data->endTime)) { $this->req->data->startTime = strtotime($this->req->data->startTime); $this->req->data->endTime = strtotime($this->req->data->endTime); } else { $this->req->data->endTime = time(); $this->req->data->startTime = $this->req->data->endTime - 60 * 60 * 3; } }
function __construct() { parent::__construct(); $this->max_query_number = 65000; /* * 请求的时间格式为 YYYY-mm-dd hh:mm:ss * 使用strtotime转换为unix timestamp * 如果没有设置起止时间,则默认结束时间为当前时间,开始时间为当前时间前3小时 */ if (isset($this->req->data->startTime) && isset($this->req->data->endTime)) { $this->req->data->startTime = strtotime($this->req->data->startTime); $this->req->data->endTime = strtotime($this->req->data->endTime); } if (isset($this->req->data->time)) { $this->req->data->time = strtotime($this->req->data->time); } }
function __construct() { parent::__construct(); if (isset($this->req->data->startTime)) { $this->startTime = strtotime($this->req->data->startTime); } if (isset($this->req->data->endTime)) { $this->endTime = strtotime($this->req->data->endTime); } if (isset($this->req->data->time_type)) { $this->time_type = $this->req->data->time_type; } if (isset($this->req->data->service_id)) { $this->service_id = $this->req->data->service_id; } if (isset($this->req->data->criticality)) { $this->criticality = $this->req->data->criticality; } else { $this->criticality = FALSE; } if (isset($this->req->data->client_ip)) { $this->client_ip = $this->req->data->client_ip; } else { $this->client_ip = FALSE; } if (isset($this->req->data->user_name)) { $this->user_name = $this->req->data->user_name; } else { $this->user_name = FALSE; } if (isset($this->req->data->operation)) { $this->operation = $this->req->data->operation; } else { $this->operation = FALSE; } if (isset($this->req->data->service_id)) { $this->service_id = $this->req->data->service_id; } else { $this->service_id = FALSE; } }
function __construct() { parent::__construct(); include Kohana::find_file('helpers', 'ofc/open-flash-chart'); }