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


PHP Facilities::getTotalNumber方法代码示例

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


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

示例1: whole_list

 public function whole_list($offset = 0)
 {
     $items_per_page = 20;
     $number_of_facilities = Facilities::getTotalNumber();
     $facilities = Facilities::getPagedFacilities($offset, $items_per_page);
     if ($number_of_facilities > $items_per_page) {
         $config['base_url'] = base_url() . "facility_management/whole_list/";
         $config['total_rows'] = $number_of_facilities;
         $config['per_page'] = $items_per_page;
         $config['uri_segment'] = 3;
         $config['num_links'] = 5;
         $this->pagination->initialize($config);
         $data['pagination'] = $this->pagination->create_links();
     }
     $data['facilities'] = $facilities;
     $data['title'] = "Facility Management::All Facilities";
     $data['module_view'] = "view_facilities_view";
     $this->new_base_params($data);
 }
开发者ID:EuniceManyasi,项目名称:DVI,代码行数:19,代码来源:facility_management.php

示例2: district_list

 public function district_list($offset = 0)
 {
     $district = $this->session->userdata("district_province_id");
     $items_per_page = 20;
     $number_of_facilities = Facilities::getTotalNumber($district);
     $facilities = Facilities::getPagedFacilities($offset, $items_per_page, $district);
     if ($number_of_facilities > $items_per_page) {
         $config['base_url'] = base_url() . "facility_management/district_list/";
         $config['total_rows'] = $number_of_facilities;
         $config['per_page'] = $items_per_page;
         $config['uri_segment'] = 3;
         $config['num_links'] = 5;
         $this->pagination->initialize($config);
         $data['pagination'] = $this->pagination->create_links();
     }
     $data['facilities'] = $facilities;
     $data['title'] = "Facility Management::All Facilities";
     $data['content_view'] = "view_district_facilities";
     $data['link'] = "facility_management/district_list";
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:21,代码来源:facility_management.php

示例3: updateFacilties

 public function updateFacilties()
 {
     $total = Facilities::getTotalNumber();
     $message = "";
     if ($total < 9800) {
         $this->load->library('PHPExcel');
         $inputFileType = 'Excel5';
         $inputFileName = $_SERVER['DOCUMENT_ROOT'] . '/ADT/assets/facility_list.xls';
         $objReader = PHPExcel_IOFactory::createReader($inputFileType);
         $objPHPExcel = $objReader->load($inputFileName);
         $highestColumm = $objPHPExcel->setActiveSheetIndex(0)->getHighestColumn();
         $highestRow = $objPHPExcel->setActiveSheetIndex(0)->getHighestRow();
         $arr = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
         $facilities = array();
         $facility_code = $this->session->userdata("facility");
         $lists = Facilities::getParentandSatellites($facility_code);
         for ($row = 2; $row < $highestRow; $row++) {
             $facility_id = $arr[$row]['A'];
             $facility_name = $arr[$row]['B'];
             $facility_type_name = str_replace(array("'"), "", $arr[$row]['G']);
             $facility_type_id = Facility_Types::getTypeID($facility_type_name);
             $district_name = str_replace(array("'"), "", $arr[$row]['E']);
             $district_id = District::getID($district_name);
             $county_name = str_replace(array("'"), "", $arr[$row]['D']);
             $county_id = Counties::getID($county_name);
             $email = $arr[$row]['T'];
             $phone = $arr[$row]['R'];
             $adult_age = 15;
             $weekday_max = '';
             $weekend_max = '';
             $supported_by = '';
             $service_art = 0;
             if (strtolower($arr[$row]['AD']) == "y") {
                 $service_art = 1;
             }
             $service_pmtct = 0;
             if (strtolower($arr[$row]['AR']) == "y") {
                 $service_pmtct = 1;
             }
             $service_pep = 0;
             $supplied_by = '';
             $parent = '';
             $map = 0;
             //if is this facility or satellite of this facility
             if (in_array($facility_id, $lists)) {
                 $details = Facilities::getCurrentFacility($facility_id);
                 if ($details) {
                     $parent = $details[0]['parent'];
                     $supported_by = $details[0]['supported_by'];
                     $supplied_by = $details[0]['supplied_by'];
                     $service_pep = $details[0]['service_pep'];
                     $weekday_max = $details[0]['weekday_max'];
                     $weekend_max = $details[0]['weekend_max'];
                     $map = $details[0]['map'];
                 }
             }
             //append to facilities data array
             $facilities[$row] = array('facilitycode' => $facility_id, 'name' => $facility_name, 'facilitytype' => $facility_type_id, 'district' => $district_id, 'county' => $county_id, 'email' => $email, 'phone' => $phone, 'adult_age' => $adult_age, 'weekday_max' => $weekday_max, 'weekend_max' => $weekend_max, 'supported_by' => $supported_by, 'service_art' => $service_art, 'service_pmtct' => $service_pmtct, 'service_pep' => $service_pep, 'supplied_by' => $supplied_by, 'parent' => $parent, 'map' => $map);
         }
         $sql = "TRUNCATE facilities";
         $this->db->query($sql);
         $this->db->insert_batch('facilities', $facilities);
         $counter = count($facilities);
         $message = $counter . " facilities have been added!<br/>";
     }
     return $message;
 }
开发者ID:webadtmtrh,项目名称:ADT,代码行数:67,代码来源:auto_management.php


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