本文整理汇总了PHP中Facilities::getFacilities_from_facility_code方法的典型用法代码示例。如果您正苦于以下问题:PHP Facilities::getFacilities_from_facility_code方法的具体用法?PHP Facilities::getFacilities_from_facility_code怎么用?PHP Facilities::getFacilities_from_facility_code使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facilities
的用法示例。
在下文中一共展示了Facilities::getFacilities_from_facility_code方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: user_create_multiple
public function user_create_multiple($facility_code = null)
{
//get user details in session
$identifier = $this->session->userdata('user_indicator');
$user_type_id = $this->session->userdata('user_type_id');
$district = $this->session->userdata('district_id');
$county = $this->session->userdata('county_id');
$facility = $this->session->userdata('facility_id');
//query to get user listing by type of user
switch ($identifier) {
case 'moh':
$permissions = 'moh_permissions';
$template = 'shared_files/template/dashboard_template_v';
break;
case 'facility_admin':
$permissions = 'facilityadmin_permissions';
$data['listing'] = Users::get_user_list_facility($facility);
$template = 'shared_files/template/template';
break;
case 'district':
$permissions = 'district_permissions';
$data['listing'] = Users::get_user_list_district($district);
if ($facility_code == 0) {
$data['facilities'] = Facilities::getFacilities($district);
$facility_name = null;
$facility_banner_text = null;
$no_of_facilities = 0;
} else {
$data['facilities'] = Facilities::getFacilities_from_facility_code($facility_code);
$facility_banner_text = ' to: ' . $data['facilities'][0]['facility_name'];
$facility_name = $data['facilities'][0]['facility_name'];
$no_of_facilities = 1;
}
$data['counts'] = Users::get_users_district($district);
$template = 'shared_files/template/template';
break;
case 'moh_user':
$data['listing'] = Users::get_user_list($user_type_id);
$template = 'shared_files/template/dashboard_template_v';
break;
case 'district_tech':
$data['listing'] = Users::get_user_list($user_type_id);
$template = 'shared_files/template/template';
break;
case 'rtk_manager':
$data['listing'] = Users::get_user_list($user_type_id);
$template = 'shared_files/template/template';
break;
case 'super_admin':
$permissions = 'super_permissions';
$data['title'] = "Users";
$data['content_view'] = "Admin/users_v";
$data['listing'] = Users::get_user_list_all();
$data['counts'] = Users::get_users_count();
$data['counties'] = Counties::getAll();
$template = 'shared_files/template/dashboard_v';
break;
case 'allocation_committee':
$data['listing'] = Users::get_user_list($user_type_id);
$template = 'shared_files/template/template';
break;
case 'county':
$permissions = 'county_permissions';
if ($facility_code == 0) {
$data['facilities'] = Facilities::getFacilities($district);
$facility_name = null;
$facility_banner_text = null;
$district_name = null;
$district_id = null;
$no_of_facilities = 0;
} else {
$data['facilities'] = Facilities::getFacilities_from_facility_code($facility_code);
$facility_banner_text = ' to: ' . $data['facilities'][0]['facility_name'];
$facility_name = $data['facilities'][0]['facility_name'];
$district_id = $data['facilities'][0]['district'];
$district_data = Districts::get_district_name($district_id);
$district_name = $district_data[0]['district'];
$no_of_facilities = 1;
}
$data['listing'] = Users::get_user_list_county($county);
$data['district_data'] = districts::getDistrict($county);
$data['counts'] = Users::get_users_county($county);
$template = 'shared_files/template/template';
break;
}
$data['title'] = "Add Multiple Users";
$data['user_types'] = Access_level::get_access_levels($permissions);
$data['banner_text'] = "Multiple User Addition";
$data['facility_name'] = $facility_name;
$data['facility_code'] = $facility_code;
$data['facility_banner_text'] = $facility_banner_text;
$data['district_name'] = $district_name;
$data['district_id'] = $district_id;
$data['no_of_facilities'] = $no_of_facilities;
$data['content_view'] = "shared_files/add_users_multiple";
$this->load->view($template, $data);
}