当前位置: 首页>>代码示例>>PHP>>正文


PHP Facilities类代码示例

本文整理汇总了PHP中Facilities的典型用法代码示例。如果您正苦于以下问题:PHP Facilities类的具体用法?PHP Facilities怎么用?PHP Facilities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Facilities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Header

 public function Header()
 {
     // Logo
     $siteLogo = site_path . '/logo.png';
     $image_file = file_exists($siteLogo) ? $siteLogo : ROOT . '/resources/images/gaiaehr_small_white.png';
     $y = 16;
     $x = 70;
     $f = new Facilities();
     $facility = $f->getCurrentFacility(true);
     $address1 = $facility['address'];
     $address2 = $facility['address_cont'];
     $address3 = $facility['city'] . ', ' . $facility['state'] . ' ' . $facility['postal_code'];
     $phone1 = '';
     $phone2 = 'Tel. ' . $facility['phone'];
     $phone3 = 'Fax ' . $facility['fax'];
     // Logo
     $this->Image($image_file, 10, 13, '', '', 'PNG', '', 'T', false, 1200, '', false, false, 0, false, false, false);
     // Address
     $this->SetFont('helvetica', '', 9);
     $this->SetY($y);
     $this->SetX($x);
     if ($address1 != '') {
         $this->Cell(95, 0, $address1, '', false, 'L', 0, '', 0, false, 'M', 'M');
     }
     $this->SetY($y + 4);
     $this->SetX($x);
     if ($address2 != '') {
         $this->Cell(95, 0, $address2, '', false, 'L', 0, '', 0, false, 'M', 'M');
     }
     $this->SetY($y + 8);
     $this->SetX($x);
     if ($address3 != '') {
         $this->Cell(95, 0, $address3, '', false, 'L', 0, '', 0, false, 'M', 'M');
     }
     // set phones
     $this->SetY($y);
     $this->SetX(165);
     if ($phone1 != '') {
         $this->Cell(0, 0, $phone1, '', false, 'R', 0, '', 0, false, 'M', 'M');
     }
     $this->SetY($y + 4);
     $this->SetX(165);
     if ($phone2 != '') {
         $this->Cell(0, 0, $phone2, '', false, 'R', 0, '', 0, false, 'M', 'M');
     }
     $this->SetY($y + 8);
     $this->SetX(165);
     if ($phone3 != '') {
         $this->Cell(0, 0, $phone3, '', false, 'R', 0, '', 0, false, 'M', 'M');
     }
     $this->Line(10, 30, 200, 30, array('color' => array(0, 0, 0)));
 }
开发者ID:igez,项目名称:gaiaehr,代码行数:52,代码来源:DocumentPDF.php

示例2: new_disbursement

 public function new_disbursement($id = null)
 {
     if ($id != null) {
         $disbursement = Disbursements::getDisbursement($id);
         $data['disbursement'] = $disbursement[0];
         $data['edit'] = true;
         $data['id'] = $id;
     }
     $districts = new Districts();
     $regions = new Regions();
     $facilities = new Facilities();
     $additional_facilities = new Additional_Facilities();
     $data['vaccines'] = Vaccines::getAll_Minified();
     $archive_date = date('U');
     $data['stock_balance'] = array();
     $district_or_region = $this->session->userdata('district_province_id');
     //Retrieve the user identifier from the session
     $identifier = $this->session->userdata('user_identifier');
     //Check if it's a provincial officer
     if ($identifier == 'provincial_officer') {
         foreach ($data['vaccines'] as $vaccine) {
             $data['stock_balance'][$vaccine->id] = Disbursements::getRegionalPeriodBalance($district_or_region, $vaccine->id, $archive_date);
         }
         $data['districts'] = $districts->getAllDistricts();
         $data['regions'] = $regions->getAllRegions();
     } else {
         if ($identifier == 'district_officer') {
             foreach ($data['vaccines'] as $vaccine) {
                 $data['stock_balance'][$vaccine->id] = Disbursements::getDistrictPeriodBalance($district_or_region, $vaccine->id, $archive_date);
             }
             $district_province = $districts->getDistrictProvince($district_or_region);
             $data['districts'] = $districts->getProvinceDistricts($district_province['province']);
             $data['facilities'] = $facilities->getDistrictFacilities($district_or_region);
             $data['additional_facilities'] = $additional_facilities->getExtraFacilities($district_or_region);
         } else {
             if ($identifier == 'national_officer') {
                 foreach ($data['vaccines'] as $vaccine) {
                     $data['stock_balance'][$vaccine->id] = Disbursements::getNationalPeriodBalance($vaccine->id, $archive_date);
                 }
                 $data['districts'] = $districts->getAllDistricts();
                 $data['regions'] = $regions->getAllRegions();
             }
         }
     }
     $data['title'] = "Disbursement Management::Disburse Vaccines";
     $data['content_view'] = "add_disbursement_view";
     $data['quick_link'] = "new_disbursement";
     $this->base_params($data);
 }
开发者ID:EuniceManyasi,项目名称:DVI,代码行数:49,代码来源:disbursement_management.php

示例3: facility_dash

 public function facility_dash()
 {
     $identifier = $this->session->userdata('user_indicator');
     $user_type_id = $this->session->userdata('user_type_id');
     $district = $this->session->userdata('district_id');
     // echo $identifier;exit;
     $county = $this->session->userdata('county_id');
     // $data['facilities'] = isset($district) ? Facilities::get_facility_details($district) : Facilities::get_facilities_per_county($county);
     if ($identifier == "district") {
         $data['facilities'] = Facilities::get_facility_details($district);
         $data['identifier'] = $identifier;
     } elseif ($identifier == "county") {
         $data['facilities'] = Facilities::get_facility_details(NULL, $county);
         $data['identifier'] = $identifier;
         $data['district_info'] = Districts::get_districts($county);
         // echo "<pre>";print_r($districts);echo "</pre>";exit;
     }
     $permissions = 'district_permissions';
     // $data['facilities']=Facilities::get_facility_details($district);
     // $data['facilities']=Facilities::get_facilities_per_county($county);
     // echo "<pre>";print_r($data['facilities']);echo "</pre>";exit;
     $data['title'] = "Facility Management";
     $data['banner_text'] = "Facility Management";
     $template = 'shared_files/template/template';
     // $data['sidebar'] = "shared_files/report_templates/side_bar_sub_county_v";
     $data['active_panel'] = 'system_usage';
     // $data['report_view'] = "shared_files/Facility_activation_v";
     $data['content_view'] = "shared_files/facility_activation_v";
     $this->load->view($template, $data);
 }
开发者ID:Kone132,项目名称:HCMP-1,代码行数:30,代码来源:facility_activation.php

示例4: search

	public function search() {
		$search_term = $this -> input -> post('search');
		$data['facilities'] = Facilities::search($search_term);
		$data['search_term'] = $search_term;
		$data['title'] = "Facility Management::Click on a Facility";
		$data['content_view'] = "search_facilities_result_view";
		$this -> base_params($data);
	}
开发者ID:EuniceManyasi,项目名称:DVI,代码行数:8,代码来源:facility_management.php

示例5: show

 public function show($id)
 {
     $facility = Facilities::where('ID_Facility', '=', $id)->firstOrFail();
     $faciList = Facilities::where('Status', '=', 'Active')->get();
     $data['room'] = Rooms::select('roomtype.RoomType_Name', 'roomtype.ID_RoomType', 'roomtype_pic.Picture')->join('roomtype_pic', 'roomtype.ID_RoomType', '=', 'roomtype_pic.ID_RoomType')->where('roomtype_pic.Main_Pic', '=', 'YES')->where('roomtype.Status', '=', 'Active')->take(40)->get()->all();
     $data['offer'] = Offer::where('Status', '=', 'Active')->take(40)->get()->all();
     $data['about'] = About::get()->all();
     return View::make('Facilities.show', compact('facility', 'listFaci'))->with('faci_active', 'active')->with('faciList', $faciList)->with('data', $data);
 }
开发者ID:hilmysyarif,项目名称:hotel-application-laravel,代码行数:9,代码来源:FacilitiesController.php

示例6: get_facility_stock_details

 public function get_facility_stock_details($facility_code)
 {
     $facility_name = Facilities::get_facility_name($facility_code);
     $msg = "Stock levels for :" . $facility_name['facility_name'] . " as of " . date("d M, Y");
     $data['msg'] = $msg;
     $data['facility_order'] = Facility_Transaction_Table::get_all($facility_code);
     $data['content_view'] = "district/district_report/facility_stock_level_v";
     $data['quick_link'] = "actions";
     $data['banner_text'] = "Stock Level";
     $data['title'] = "Stock Level ";
     $this->load->view("template", $data);
 }
开发者ID:HCMPKenya,项目名称:HCMP-ALPHA,代码行数:12,代码来源:dp_facility_list.php

示例7: get_ClinicTokensData

 private function get_ClinicTokensData($allNeededInfo, $tokens)
 {
     $facilityInfo = $this->facility->getActiveFacilitiesById($_SESSION['facilities']['id']);
     $clinicInformation = array('[FACILITY_NAME]' => $facilityInfo['name'], '[FACILITY_PHONE]' => $facilityInfo['phone'], '[FACILITY_FAX]' => $facilityInfo['fax'], '[FACILITY_STREET]' => $facilityInfo['street'], '[FACILITY_CITY]' => $facilityInfo['city'], '[FACILITY_STATE]' => $facilityInfo['state'], '[FACILITY_POSTALCODE]' => $facilityInfo['postal_code'], '[FACILITY_COUNTRYCODE]' => $facilityInfo['country_code'], '[FACILITY_FEDERAL_EIN]' => $facilityInfo['federal_ein'], '[FACILITY_SERVICE_LOCATION]' => $facilityInfo['service_location'], '[FACILITY_BILLING_LOCATION]' => $facilityInfo['billing_location'], '[FACILITY_FACILITY_NPI]' => $facilityInfo['facility_npi']);
     $pos = 0;
     foreach ($tokens as $tok) {
         if ($allNeededInfo[$pos] == '' || $allNeededInfo[$pos] == null) {
             $allNeededInfo[$pos] = $clinicInformation[$tok];
         }
         $pos = $pos + 1;
     }
     return $allNeededInfo;
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:13,代码来源:Documents.php

示例8: manage_users

 public function manage_users()
 {
     $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();
     $data['facilities'] = Facilities::getAll();
     $data['sub_counties'] = Districts::getAll();
     $data['user_types'] = Access_level::get_access_levels($permissions);
     $this->load->view("shared_files/template/dashboard_v", $data);
 }
开发者ID:HCMPKenya,项目名称:RTK_TEST,代码行数:13,代码来源:admin.php

示例9: get_facility_user_data

 public function get_facility_user_data($facility_code)
 {
     // $facility_code = $_POST['facility_code'];
     $facility_data = Facilities::get_facilities_user_activation_data($facility_code);
     // echo "<pre>";print_r($facility_data);echo "</pre>";exit;
     foreach ($facility_data as $key => $value) {
         $name = $value['fname'] . ' ' . $value['lname'];
         $created_at = $value['created_at'];
         $last_login = $value['end_time_of_event'];
         $created = date('d F Y', strtotime($created_at));
         $last_login = date('d F Y', strtotime($last_login));
         $output[] = array($name, $created, $last_login);
     }
     echo json_encode($output);
 }
开发者ID:HCMPKenya,项目名称:HCMP-ALPHA,代码行数:15,代码来源:facility_activation.php

示例10: addSatellite

 public function addSatellite()
 {
     $results = Facilities::getSatellites($this->session->userdata("facility"));
     $dyn_table = "<table border='1' id='patient_listing'  cellpadding='5' class='dataTables'>";
     $dyn_table .= "<thead><tr><th>Facility Code</th><th>Facility Name</th><th>Options</th></tr></thead><tbody>";
     if ($results) {
         foreach ($results as $result) {
             $option = "<a href='" . base_url() . "admin_management/remove/" . $result['facilitycode'] . "'' class='red'>Remove</a>";
             $dyn_table .= "<tr><td>" . $result['facilitycode'] . "</td><td>" . $result['name'] . "</td><td>" . $option . "</td></tr>";
         }
     }
     $dyn_table .= "</tbody></table>";
     $data['label'] = 'Satellite';
     $data['table'] = 'facilities';
     $data['actual_page'] = 'View Satellites';
     $data['dyn_table'] = $dyn_table;
     $this->base_params($data);
 }
开发者ID:OmondiKevin,项目名称:ADT_MTRH,代码行数:18,代码来源:admin_management.php

示例11: add

 public function add($data = array())
 {
     $access_level = $this->session->userdata('user_indicator');
     if ($access_level == "district_clerk") {
         $district = $this->session->userdata('district_province_id');
         $data['facilities'] = Facilities::getDistrictFacilities($district);
     }
     $provinces = Province::getAll();
     $districts = District::getAll();
     $diseases = Disease::getAllObjects();
     $data['provinces'] = $provinces;
     $data['districts'] = $districts;
     $data['diseases'] = $diseases;
     $data['editing'] = false;
     $data['prediction'] = Surveillance::getPrediction();
     $data['scripts'] = array("special_date_picker.js", "validationEngine-en.js", "validator.js");
     $data["styles"] = array("validator.css");
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:19,代码来源:weekly_data_management.php

示例12: add

 public function add()
 {
     $provinces = Province::getAll();
     $districts = District::getAll();
     $facilities = Facilities::getAll();
     $diseases = Disease::getAllObjects();
     $data['provinces'] = $provinces;
     $data['districts'] = $districts;
     $data['facilities'] = $facilities;
     $data['diseases'] = $diseases;
     $data['scripts'] = array("jquery.ui.core.js", "jquery.ui.datepicker.js", "jquery.ui.widget.js");
     $data['styles'] = array("jquery.ui.all.css");
     $data['title'] = "Line List Data";
     $data['content_view'] = "linelist_data_add_v";
     $data['banner_text'] = "Linelist Data";
     $data['link'] = "submissions_management";
     $data['quick_link'] = "linelisted_data_management";
     $this->base_params($data);
     //$this -> load -> view("template", $data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:20,代码来源:linelisted_data_management.php

示例13: create_order_delivery_color_coded_table

    public function create_order_delivery_color_coded_table($order_id)
    {
        // get the order and order details here
        $detail_list = facility_order_details::get_order_details($order_id, true);
        $dates = facility_orders::get_order_($order_id)->toArray();
        $facility_name = Facilities::get_facility_name_($dates[0]['facility_code'])->toArray();
        $facility_name = $facility_name[0]['facility_name'];
        //set up the details
        $table_body = "";
        $total_fill_rate = 0;
        $order_value = 0;
        //get the lead time
        $ts1 = strtotime(date($dates[0]["order_date"]));
        $ts2 = strtotime(date($dates[0]["deliver_date"]));
        $seconds_diff = $ts2 - $ts1;
        //strtotime($a_date) ? date('d M, Y', strtotime($a_date)) : "N/A";
        $date_diff = strtotime($dates[0]["deliver_date"]) ? floor($seconds_diff / 3600 / 24) : "N/A";
        $order_date = strtotime($dates[0]["order_date"]) ? date('D j M, Y', $ts1) : "N/A";
        $deliver_date = strtotime($dates[0]["deliver_date"]) ? date('D j M, Y', $ts2) : "N/A";
        $kemsa_order_no = $dates[0]['kemsa_order_id'];
        $order_total = number_format($dates[0]['order_total'], 2, '.', ',');
        $actual_order_total = number_format($date[0]['deliver_total'], 2, '.', ',');
        $tester = count($detail_list);
        if ($tester == 0) {
        } else {
            foreach ($detail_list as $rows) {
                //setting the values to display
                $received = $rows['quantity_recieved'];
                $price = $rows['unit_cost'];
                $ordered = $rows['quantity_ordered_unit'];
                $code = $rows['commodity_id'];
                $drug_name = $rows['commodity_name'];
                $kemsa_code = $rows['commodity_code'];
                $unit_size = $rows['unit_size'];
                $total_units = $rows['total_commodity_units'];
                $cat_name = $rows['sub_category_name'];
                $received = round(@$received / $total_units);
                $fill_rate = round(@($received / $ordered) * 100);
                $total = $price * $ordered;
                $total_ = $price * $received;
                $total_fill_rate = $total_fill_rate + $fill_rate;
                switch (true) {
                    case $fill_rate == 0:
                        $table_body .= "<tr style='background-color: #FBBBB9;'>";
                        $table_body .= "<td>{$cat_name}</td>";
                        $table_body .= '<td>' . $drug_name . '</td><td>' . $kemsa_code . '</td>' . '<td>' . $unit_size . '</td>';
                        $table_body .= '<td>' . $price . '</td>';
                        $table_body .= '<td>' . $ordered . '</td>';
                        $table_body .= '<td>' . number_format($total, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $received . '</td>';
                        $table_body .= '<td>' . number_format($total_, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $fill_rate . '% ' . '</td>';
                        $table_body .= '</tr>';
                        break;
                    case $fill_rate <= 60:
                        $table_body .= "<tr style=' background-color: #FAF8CC;'>";
                        $table_body .= "<td>{$cat_name}</td>";
                        $table_body .= '<td>' . $drug_name . '</td><td>' . $kemsa_code . '</td>' . '<td>' . $unit_size . '</td>';
                        $table_body .= '<td>' . $price . '</td>';
                        $table_body .= '<td>' . $ordered . '</td>';
                        $table_body .= '<td>' . number_format($total, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $received . '</td>';
                        $table_body .= '<td>' . number_format($total_, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $fill_rate . '% ' . '</td>';
                        $table_body .= '</tr>';
                        break;
                    case $fill_rate > 100.01:
                    case $fill_rate == 100.01:
                        $table_body .= "<tr style='background-color: #ea1e17'>";
                        $table_body .= "<td>{$cat_name}</td>";
                        $table_body .= '<td>' . $drug_name . '</td><td>' . $kemsa_code . '</td>' . '<td>' . $unit_size . '</td>';
                        $table_body .= '<td>' . $price . '</td>';
                        $table_body .= '<td>' . $ordered . '</td>';
                        $table_body .= '<td>' . number_format($total, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $received . '</td>';
                        $table_body .= '<td>' . number_format($total_, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $fill_rate . '% ' . '</td>';
                        $table_body .= '</tr>';
                        break;
                    case $fill_rate == 100:
                        $table_body .= "<tr style=' background-color: #C3FDB8;'>";
                        $table_body .= "<td>{$cat_name}</td>";
                        $table_body .= '<td>' . $drug_name . '</td><td>' . $kemsa_code . '</td>' . '<td>' . $unit_size . '</td>';
                        $table_body .= '<td>' . $price . '</td>';
                        $table_body .= '<td>' . $ordered . '</td>';
                        $table_body .= '<td>' . number_format($total, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $received . '</td>';
                        $table_body .= '<td>' . number_format($total_, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $fill_rate . '% ' . '</td>';
                        $table_body .= '</tr>';
                        break;
                    default:
                        $table_body .= "<tr>";
                        $table_body .= "<td>{$cat_name}</td>";
                        $table_body .= '<td>' . $drug_name . '</td><td>' . $kemsa_code . '</td>' . '<td>' . $unit_size . '</td>';
                        $table_body .= '<td>' . $price . '</td>';
                        $table_body .= '<td>' . $ordered . '</td>';
                        $table_body .= '<td>' . number_format($total, 2, '.', ',') . '</td>';
                        $table_body .= '<td>' . $received . '</td>';
                        $table_body .= '<td>' . number_format($total_, 2, '.', ',') . '</td>';
//.........这里部分代码省略.........
开发者ID:HCMPKenya,项目名称:HCMP-ALPHA,代码行数:101,代码来源:Hcmp_functions_new.php

示例14: save_details

 public function save_details()
 {
     $district = $this->session->userdata("district_province_id");
     $facility_id = $this->input->post('facility_id');
     //Check if we are in editing mode first; if so, retrieve the edited record. if not, create a new one!
     if (strlen($facility_id) > 0) {
         $facility = Facilities::getFacility($facility_id);
         //Retrieve the fridges for this facility
         $fridges = Facility_Fridges::getFacilityFridges($facility_id);
         //Delete all these existing facility-fridge combinations
         foreach ($fridges as $fridge) {
             $fridge->delete();
         }
     } else {
         $facility = new Facilities();
     }
     $facility->facilitycode = $this->input->post('facilitycode');
     $facility->name = $this->input->post('name');
     $facility->facilitytype = $this->input->post('type');
     $facility->district = $district;
     $facility->email = $this->input->post('email');
     $facility->phone = $this->input->post('phone');
     $facility->save();
     $facility_id = $facility->id;
     $fridges = $this->input->post('fridges');
     $counter = 0;
     foreach ($fridges as $fridge) {
         if ($fridge > 0) {
             $facility_fridge = new Facility_Fridges();
             $facility_fridge->Facility = $facility_id;
             $facility_fridge->Fridge = $fridge;
             $facility_fridge->Timestamp = date('U');
             $facility_fridge->save();
             $counter++;
         } else {
             $counter++;
             continue;
         }
     }
     redirect("facility_management/district_list");
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:41,代码来源:facility_management.php

示例15: 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);
 }
开发者ID:HCMPKenya,项目名称:HCMP-ALPHA,代码行数:14,代码来源:user_management.php


注:本文中的Facilities类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。