本文整理汇总了PHP中Facilities::get_facilities_logged_in_month方法的典型用法代码示例。如果您正苦于以下问题:PHP Facilities::get_facilities_logged_in_month方法的具体用法?PHP Facilities::get_facilities_logged_in_month怎么用?PHP Facilities::get_facilities_logged_in_month使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facilities
的用法示例。
在下文中一共展示了Facilities::get_facilities_logged_in_month方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: new_weekly_usage
public function new_weekly_usage($year = null, $month = null)
{
if (!isset($month)) {
$month = date('m');
}
if (!isset($year)) {
$year = date('Y');
}
$full_date = $year . '-' . $month . '-01';
$month_text = date('F', strtotime($full_date));
$data['year'] = $year;
$data['month'] = $month;
$data['month_text'] = $month_text;
$data['title'] = "System Usage";
$data['content_view'] = "Admin/new_log_summary_v";
$data['banner_text'] = "System Usage";
$start_date = $year . '-' . $month . '-01';
$end_date = $year . '-' . $month . '-31';
$logged_within_month = Facilities::get_facilities_logged_in_month($start_date, $end_date);
$issued_within_month = Facilities::get_facilities_issued_in_month($start_date, $end_date);
$not_logged_within_month = Facilities::get_facilities_not_in_month($start_date, $end_date);
$not_issued_within_month = Facilities::get_facilities_not_in_month($start_date, $end_date, null, null, 'issued');
$logged_within_month_4 = Facilities::get_facilities_count($start_date, $end_date, 4);
$issued_within_month_4 = Facilities::get_facilities_count($start_date, $end_date, 4, null, null, 'issued');
$data['monthly_logs'] = array('logged_in' => $logged_within_month, 'not_logged_in' => $not_logged_within_month, 'logged_in_count' => $logged_within_month_4, 'issued_within_month' => $issued_within_month, 'issued_count' => $issued_within_month_4, 'not_issued' => $not_issued_within_month);
$this->load->view("shared_files/template/dashboard_v", $data);
}
示例2: new_system_usage_temp
public function new_system_usage_temp($year = null, $month = null, $ajax = null)
{
$identifier = $this->session->userdata('user_indicator');
$district_id = null;
$county_id = null;
if ($identifier == 'district') {
$district_id = $this->session->userdata('district_id');
}
if ($identifier == 'county') {
$county_id = $this->session->userdata('county_id');
}
// echo "$identifier";die;
if (!isset($month)) {
$month = date('m');
}
if (!isset($year)) {
$year = date('Y');
}
$full_date = $year . '-' . $month . '-01';
$month_text = date('F', strtotime($full_date));
$data['year'] = $year;
$data['month'] = $month;
$data['month_text'] = $month_text;
$data['title'] = " System Usage";
$data['banner_text'] = "System Use Statistics";
$data['content_view'] = "subcounty/ajax/new_system_usage_temporary";
$start_date = $year . '-' . $month . '-01';
$end_date = $year . '-' . $month . '-31';
$logged_within_month = Facilities::get_facilities_logged_in_month($start_date, $end_date, null, $county_id, $district_id);
$issued_within_month = Facilities::get_facilities_issued_in_month($start_date, $end_date, null, $county_id, $district_id);
$not_logged_within_month = Facilities::get_facilities_not_logged_in_month($start_date, $end_date, $county_id, $district_id);
$not_issued_within_month = Facilities::get_facilities_not_issued_in_month($start_date, $end_date, $county_id, $district_id);
$logged_within_month_4 = Facilities::get_facilities_count($start_date, $end_date, 4);
// $logged_within_month_4 = Facilities::get_facilities_logged_in_count($start_date,$end_date,4,$county_id,$district_id);
$issued_within_month_4 = Facilities::get_facilities_issued_in_count($start_date, $end_date, 4, $county_id, $district_id);
$facilities_offline = Facilities::get_offline_facilities($county_id, $district_id);
$data['monthly_logs'] = array('logged_in' => $logged_within_month, 'not_logged_in' => $not_logged_within_month, 'logged_in_count' => $logged_within_month_4, 'issued_within_month' => $issued_within_month, 'issued_count' => $issued_within_month_4, 'not_issued' => $not_issued_within_month, 'facilities_offline' => $facilities_offline);
$view = null;
if ($ajax != null) {
$view = "subcounty/ajax/system_usage_filtered_ajax";
} else {
$view = "subcounty/ajax/new_system_usage_temporary";
}
return $this->load->view($view, $data);
}