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


PHP Province::getAll方法代码示例

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


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

示例1: edit_district

 public function edit_district($code)
 {
     $district = District::getDistrict($code);
     $data['district'] = $district[0];
     $data['title'] = "District Management::Edit " . $district->name . " District";
     $data['module_view'] = "add_district_view";
     $data['quick_link'] = "new_district";
     $data['provinces'] = Province::getAll();
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:10,代码来源:district_management.php

示例2: edit_user

 public function edit_user($id)
 {
     $user = Users::getUser($id);
     $data['user'] = $user;
     $data['title'] = "User Management::Edit " . $user->Name . "'s Details";
     $data['title'] = "User Management::Add New User";
     $data['module_view'] = "add_user_view";
     $data['levels'] = Access_Level::getAll();
     $data['districts'] = District::getAll();
     $data['provinces'] = Province::getAll();
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:12,代码来源:user_management.php

示例3: view_list

 public function view_list()
 {
     $year = $this->input->post("year");
     $epiweek = $this->input->post("epiweek");
     $dnr_districts = District::getDNRDistricts($year, $epiweek);
     $provinces = Province::getAll();
     $data['provinces'] = $provinces;
     $data['dnr_districts'] = $dnr_districts;
     $data['report_view'] = "dnr_districts_v";
     $data['small_title'] = "DNR Districts in " . $year . " Epiweek " . $epiweek;
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:12,代码来源:dnr_districts.php

示例4: edit_weekly_data

 public function edit_weekly_data($epiweek, $reporting_year, $district)
 {
     $provinces = Province::getAll();
     $districts = District::getAll();
     $diseases = Disease::getAllObjects();
     $data['provinces'] = $provinces;
     $data['districts'] = $districts;
     $data['diseases'] = $diseases;
     $data['prediction'] = Surveillance::getPrediction();
     $data['surveillance_data'] = Surveillance::getSurveillanceData($epiweek, $reporting_year, $district);
     $data['lab_data'] = Lab_Weekly::getWeeklyDistrictLabData($epiweek, $reporting_year, $district);
     $data['editing'] = true;
     $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,代码行数:16,代码来源:weekly_data_management.php

示例5: 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

示例6: edit_duplicate

 public function edit_duplicate($number_of_diseases, $first_surveillance_id, $malaria_data_id)
 {
     $last_surveillance_id = $first_surveillance_id + $number_of_diseases - 1;
     $provinces = Province::getAll();
     $districts = District::getAll();
     $diseases = Disease::getAllObjects();
     $data['provinces'] = $provinces;
     $data['districts'] = $districts;
     $data['diseases'] = $diseases;
     $data['prediction'] = Surveillance::getPrediction();
     $data['surveillance_data'] = Surveillance::getSurveillanceDataRange($first_surveillance_id, $last_surveillance_id);
     $data['lab_data'] = Lab_Weekly::getLabObjects($malaria_data_id);
     $data['editing'] = true;
     $data['scripts'] = array("special_date_picker.js", "validationEngine-en.js", "validator.js");
     $data["styles"] = array("validator.css");
     $data['title'] = "Duplicate Data Editing";
     $data['content_view'] = "weekly_data_add_v";
     $data['banner_text'] = "Weekly Data Correction";
     $data['link'] = "data_quality_management";
     $this->load->view("template", $data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:21,代码来源:data_duplication.php

示例7: provincialDetails

 public function provincialDetails($epiweek, $diseaseId)
 {
     $currentyear = date('Y');
     $submissions = Surveillance::getLastEpiweek($currentyear);
     $provinces = Province::getAll();
     $years = Surveillance::getYears();
     $data['selected_epiweek'] = $submissions->epiweek;
     $data['provinces'] = $provinces;
     $data['years'] = $years;
     $data['values'] = $this->getAllProvinces($epiweek, $diseaseId, $provinces);
     $name = Disease::getName($diseaseId);
     $data['diseaseName'] = $name->Name;
     $data['content_view'] = 'submissions_prov_v';
     $this->base_params($data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:15,代码来源:submissions_management.php

示例8: dave

 function dave()
 {
     $year = $_POST['year'];
     $disease = $_POST['disease'];
     $province = $_POST['province'];
     $epiweek = $_POST['epiweek'];
     $values = array($year, $disease, $province, $epiweek);
     $currentyear = date('Y');
     $rights = User_Right::getRights($this->session->userdata('access_level'));
     $menu_data = array();
     $menus = array();
     $counter = 0;
     foreach ($rights as $right) {
         $menu_data['menus'][$right->Menu] = $right->Access_Type;
         $menus['menu_items'][$counter]['url'] = $right->Menu_Item->Menu_Url;
         $menus['menu_items'][$counter]['text'] = $right->Menu_Item->Menu_Text;
         $counter++;
     }
     $this->session->set_userdata($menu_data);
     $this->session->set_userdata($menus);
     $provinces = Province::getAll();
     $epiweeks = Surveillance::getEpiweek();
     $years = Surveillance::getYears();
     $diseases = Diseases::getAllObjects();
     $this->load->database();
     $sql = 'select Districts.name as District, Lmcase,Gmcase,Lfcase,Gfcase from Surveillance,Districts,Diseases where Epiweek = ? and Disease = ? and Reporting_Year = ? and abs(Lmcase) != 0 and abs(Gmcase) != 0 and abs(Lfcase) != 0 and ABS(Gfcase) != 0  and surveillance.disease=diseases.id and surveillance.district=districts.id';
     $query = $this->db->query($sql, array($epiweek, $disease, $year));
     $data['epidemiks'] = $query->result_array();
     $data['epiweeks'] = $epiweeks;
     $data['provinces'] = $provinces;
     $data['years'] = $years;
     $data['diseases'] = $diseases;
     $data['values'] = $values;
     $data['scripts'] = array("FusionCharts/FusionCharts.js");
     $data['title'] = "System Home";
     $data['content_view'] = "home_v";
     $data['banner_text'] = "System Home";
     $data['link'] = "home";
     $this->load->view("template", $data);
 }
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:40,代码来源:home_controller.php

示例9: generate

 public function generate()
 {
     $bata_buffer = "";
     $year = $this->input->post('year_from');
     $epiweek = $this->input->post('epiweek_to');
     $province = $this->input->post('province');
     $district = $this->input->post('district');
     $display_type = $this->input->post('display_type');
     $weekending = Surveillance::getWeekEnding($year, $epiweek);
     $provinces = array();
     $districts = array();
     //Check if a province has been specified
     if ($province > 0) {
         //if so, retrieve it's details from the database
         $provinces = Province::getProvince($province);
     } else {
         //if not, retrieve all provinces
         $provinces = Province::getAll();
     }
     //Check if a district has been specified
     if ($district > 0) {
         //if so, retrieve it's details from the database
         $districts = District::getDistrict($district);
         //also, retrieve the province details for this district
         $provinces = Province::getProvince($districts[0]['Province']);
     } else {
         //if not, empty the array
         $districts = array();
     }
     //Start displaying the header of the table
     $bata_buffer .= " <table class='data-table'>\n            <tr style='background: #F5D2AE;'>\n                <th rowspan=2>Province</th>\n                <th rowspan=2>District</th>\n                <th rowspan=2>Reports Expected</th>\n                <th rowspan=2>Reports Received</th>\n                <th rowspan=2>%RR</th>";
     $diseases["reports"] = "reports";
     $diseases["submitted"] = "submitted";
     $diseases["percentage"] = "percentage";
     $disease_array = Disease::getAll();
     foreach ($disease_array as $disease) {
         if ($disease['Name'] == 'Malaria') {
             $diseases[$disease['id']] = $disease['Name'];
             $diseases["tested"] = "tested";
             $diseases["positive"] = "positive";
             $bata_buffer .= "<th rowspan=2>" . $disease['Name'] . "</th>";
             $bata_buffer .= "<th  colspan=2 style='color:green;'>" . $disease['Name'] . " Indicators</th>";
         } else {
             $diseases[$disease['id']] = $disease['Name'];
             $bata_buffer .= "<th rowspan=2>" . $disease['Name'] . "</th>";
         }
     }
     //Finish Displaying the Header
     $bata_buffer .= " </tr>\n            <tr style='background: #F5D2AE'>\n                 <th >Tested</th><th >Positive</th>\n            </tr>\n\t\t";
     //Start retrieving all the rows for the data
     foreach ($provinces as $province_object) {
         $bata_buffer .= "<tr class='even'><td style='font-weight:bold; font-size:14px'>" . $province_object->Name . "</td></tr>";
         $province_districts = array();
         //check if a district was specified
         if (count($districts) > 0) {
             $province_districts = $districts;
         } else {
             //Get all the districts for this province
             $province_districts = district::getProvinceDistrict($province_object->id);
         }
         //loop through all the districts to get their data
         foreach ($province_districts as $province_district) {
             $available_data = array();
             $surveillance_counter = 2;
             $bata_buffer .= "<tr class='even' style='background:#C4E8B7'><td></td><td>" . $province_district['Name'] . "</td>";
             $surveillance_data = Surveillance::getWeeklySummaries($year, $epiweek, $province_district['id']);
             //Check if any surveillance data exists
             if (isset($surveillance_data[0])) {
                 $available_data['reports'] = $surveillance_data[0]['Expected'];
                 $available_data['submitted'] = $surveillance_data[0]['Submitted'];
                 //Calculate the reporting
                 $available_data['percentage'] = floor($available_data['submitted'] / $available_data['reports'] * 100);
                 //Display these Parameters
                 $bata_buffer .= "<td>" . $available_data['reports'] . "</td><td>" . $available_data['submitted'] . "</td><td>" . $available_data['percentage'] . "</td>";
             } else {
                 $bata_buffer .= "<td>DNR</td><td>DNR</td><td>0</td>";
             }
             //Check if there is any surveillance data
             if (isset($surveillance_data[0])) {
                 //Loop through all the surveillance data returned
                 foreach ($surveillance_data as $disease_data) {
                     $bata_buffer .= "<td>" . $disease_data['Cases'] . "(" . $disease_data['Deaths'] . ")</td>";
                     //Check if the disease is malaria and if so, get the lab data and display it
                     if ($disease_data['Disease'] == 1) {
                         //Get malaria data
                         $lab_weekly_data = Lab_Weekly::getWeeklyLabData($year, $epiweek, $province_district['id']);
                         //Check if any data exists
                         if (isset($lab_weekly_data)) {
                             $bata_buffer .= "<td>" . $lab_weekly_data['Tested'] . "</td><td>" . $lab_weekly_data['Positive'] . "</td>";
                         } else {
                             $bata_buffer .= "<td>DNR</td><td>DNR</td>";
                         }
                     }
                 }
             } else {
                 $total_diseases = count($disease_array);
                 $total_elements = $total_diseases + 1;
                 for ($x = 0; $x <= $total_elements; $x++) {
                     $bata_buffer .= "<td>DNR</td>";
                 }
//.........这里部分代码省略.........
开发者ID:bamcod,项目名称:Disease-Surveillance,代码行数:101,代码来源:weekly_report.php


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