本文整理匯總了PHP中Facilities::getFacilities方法的典型用法代碼示例。如果您正苦於以下問題:PHP Facilities::getFacilities方法的具體用法?PHP Facilities::getFacilities怎麽用?PHP Facilities::getFacilities使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Facilities
的用法示例。
在下文中一共展示了Facilities::getFacilities方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getFacilities
public function getFacilities()
{
//for ajax
$district = $_POST['district'];
$facilities = Facilities::getFacilities($district);
$list = "";
foreach ($facilities as $facilities) {
$list .= $facilities->facility_code;
$list .= "*";
$list .= $facilities->facility_name;
$list .= "_";
}
echo $list;
}
示例2: listing
public function listing()
{
$access_level = $this->session->userdata('user_indicator');
$data['access_level'] = $access_level;
$data['sites'] = Facilities::getFacilities();
$data['supporter'] = Supporter::getAll();
//get satellites
//$data['satellites'] = Facilities::getSatellites($this -> session -> userdata("facility"));
$district_query = $this->db->query("select * from district");
$data['districts'] = $district_query->result_array();
$county_query = $this->db->query("select * from counties");
$data['counties'] = $county_query->result_array();
$facility_type_query = $this->db->query("select * from facility_types");
$data['facility_types'] = $facility_type_query->result_array();
$data['title'] = "Facility Information";
$data['banner_text'] = "Facility Information";
$data['link'] = "facility";
$actions = array(0 => array('Edit', 'edit'), 1 => array('Disable', 'disable'));
$data['actions'] = $actions;
$this->base_params($data);
}
示例3: get_facilities
public function get_facilities()
{
$district = $_POST['district'];
$user_indicator = $this->session->userdata('user_indicator');
if ($user_indicator == 'facility' || $user_indicator == 'facility_admin') {
$facility_code = $this->session->userdata('facility_id');
$facilities = Facilities::getFacilities($district, $facility_code);
} else {
$facilities = Facilities::getFacilities($district);
}
$list = "";
foreach ($facilities as $facilities) {
$list .= $facilities->facility_code;
$list .= "*";
$list .= $facilities->facility_name;
$list .= "_";
}
echo $list;
}
示例4: user_create
public function user_create()
{
//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);
$data['facilities'] = Facilities::getFacilities($district);
$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';
$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'] = "User Management";
$data['user_types'] = Access_level::get_access_levels($permissions);
$data['banner_text'] = "User Management";
$data['content_view'] = "shared_files/user_creation_v";
$this->load->view($template, $data);
}
示例5: 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);
}
示例6: dist_manage
public function dist_manage($pop_up_msg = NULL)
{
$district = $this->session->userdata('district1');
$id = $this->session->userdata('user_db_id');
$data['user_type'] = Access_level::getAll1();
$data['facilities'] = Facilities::getFacilities($district);
$data['title'] = "User Management";
$data['content_view'] = "district/user_management/users_district_v";
$data['banner_text'] = "User Management";
$data['pop_up_msg'] = $pop_up_msg;
$data['result'] = User::getAll5($district, $id);
$data['counties'] = Counties::getAll();
$this->load->view("template", $data);
}
示例7: facility_data_stats
public function facility_data_stats()
{
$district = $this->session->userdata('district');
$data['facility_names'] = Facilities::getFacilities($district);
$this->load->view("district/ajax_view/facility_data_v", $data);
}
示例8: header
if (!empty($_POST['update'])) {
$data['update'] = $_POST['update'];
}
if (!empty($_POST['maintenancedesc'])) {
$data['maintenancedesc'] = $_POST['maintenancedesc'];
}
if (!empty($_POST['twitter'])) {
$data['twitter'] = $_POST['twitter'];
}
$status->newIncident($data);
}
header('Location: index.php');
}
}
$facilitiesclass = new Facilities();
$facilities = $facilitiesclass->getFacilities();
if (empty($facilities)) {
throw new Exception('Unexpected Error. No facilities in database.');
}
foreach ($facilities as $key => $value) {
$status = new Status();
$facilities[$key]['incidents'] = $status->getIncidents($value['id'], $config['days_to_report']);
$facilities[$key]['summary'] = $status->getSummary($value['id'], $config['days_to_report'], true);
$facilities[$key]['services'] = $status->getServices($value['id']);
$facilities[$key]['scheduled'] = $status->getScheduled($value['id']);
}
$smarty->assign('facilities', $facilities);
$smarty->assign('report_days', $config['days_to_report']);
$smarty->assign('twitter_handle', $config['twitter_handle']);
$smarty->display('_header.tpl');
$smarty->display('index.tpl');