• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Facilities类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: 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);
 }
开发者ID:HCMPKenya,项目名称:RTK_TEST,代码行数:65,代码来源:user.php


示例17: pdfreport

    public function pdfreport($report_type, $facility_code)
    {
        $facility_information = $report_data = $heading = $report_title = $data = '';
        $facility_name = Facilities::get_facility_name2($facility_code);
        $facility_obj = Facilities::get_facility_district_county_level($facility_code);
        $facility_information = '<table class = "data-table"><thead><tr><th>Facility Code</th><th>Facility Name</th><th>County</th><th>District</th><th>Type</th></tr></thead>
		<tbody><tr><td>' . $facility_code . '</td><td>' . $facility_name . '</td><td>' . $facility_obj['county'] . '</td><td>' . $facility_obj['district'] . '</td><td>' . $facility_obj['type'] . '</td></tr></tbody>';
        $facility_information .= '</table>';
        switch ($report_type) {
            case 'malaria':
                $heading = '<th>Drug Name</th>';
                $report_title = 'Malaria Program Report For: ' . $facility_name;
                $file_name = $facility_name . ' Malaria Report';
                $data = $this->createmalariareport($facility_code);
                break;
            case 'rh':
                $heading = '<th>Contraceptive</th>';
                $report_title = 'Reproductive Health Program Report For: ' . $facility_name;
                $file_name = $facility_name . ' RH Report';
                $data = $this->createrhreport($facility_code);
                break;
            default:
                break;
        }
        $report_table = '<table class = "data-table">
	<thead>
		<tr>' . $heading . '
			<th>Unit Size</th>
			<th>Unit Cost (Ksh)</th>
			<th>Opening Balance (Units)</th>
			<th>Total Receipts (Units)</th>
		    <th>Total issues (Units)</th>
		    <th>Adjustments(-ve) (Units)</th>
		    <th>Adjustments(+ve) (Units)</th>
		    <th>Losses (Units)</th>
		    <th>No days out of stock</th>
		    <th>Closing Stock(Units)</th>					    
		</tr>
	</thead>';
        if (!$data) {
            $data = '<tr><td colspan = "11"><center>There is no report for this facility</center></td></tr>';
        }
        $report_table .= $data;
        $report_table .= '</table>';
        $pdf_data['pdf_title'] = $report_title;
        $pdf_data['file_name'] = $file_name;
        $pdf_data['pdf_html_body'] = $facility_information . $report_table;
        $this->hcmp_functions->create_pdf($pdf_data);
    }
开发者ID:karsanrichard,项目名称:hcmp_test,代码行数:49,代码来源:divisional_reports.php


示例18: decommission

    public function decommission()
    {
        //Change status of commodities to decommissioned
        $date = date('y-m-d');
        $facility_code = $this->session->userdata('facility_id');
        $user_id = $this->session->userdata('user_id');
        $facility_name_array = Facilities::get_facility_name_($facility_code)->toArray();
        $facility_name = $facility_name_array[0]['facility_name'];
        $myobj1 = Doctrine::getTable('Districts')->find($facility_name_array[0]['district']);
        $disto_name = $myobj1->district;
        $county = $myobj1->county;
        $myobj2 = Doctrine::getTable('Counties')->find($county);
        $county_name = $myobj2->county;
        $total = 0;
        //Create PDF of Expired Drugs that are to be decommisioned. check here
        $decom = Facility_stocks::get_facility_expired_stuff($facility_code);
        /*****************************setting up the report*******************************************/
        if (count($decom) > 0) {
            $body = '';
            $body .= "<style> table {\n    border-collapse: collapse;\n}td,th{\n\tpadding: 12px;\n\ttext-align:center;\n}\n\n*{margin:0;padding:0}*{font-family:'Helvetica Neue',Helvetica,Helvetica,Arial,sans-serif}img{max-width:100%}.collapse{padding:0}body{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%}a{color:#2BA6CB}.btn{text-decoration:none;color:#FFF;background-color:#666;padding:10px 16px;font-weight:700;margin-right:10px;text-align:center;cursor:pointer;display:inline-block}p.callout{padding:15px;background-color:#ECF8FF;margin-bottom:15px}.callout a{font-weight:700;color:#2BA6CB}table.social{background-color:#ebebeb}.social .soc-btn{padding:3px 7px;font-size:12px;margin-bottom:10px;text-decoration:none;color:#FFF;font-weight:700;display:block;text-align:center}a.fb{background-color:#3B5998!important}a.tw{background-color:#1daced!important}a.gp{background-color:#DB4A39!important}a.ms{background-color:#000!important}.sidebar .soc-btn{display:block;width:100%}table.head-wrap{width:100%}.header.container table td.logo{padding:15px}.header.container table td.label{padding:15px 15px 15px 0}table.body-wrap{width:100%}table.footer-wrap{width:100%;clear:both!important}.footer-wrap .container td.content p{border-top:1px solid #d7d7d7;padding-top:15px;font-size:9px;font-weight:500}h1,h2,h3,h4,h5,h6{font-family:HelveticaNeue-Light,'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;line-height:1.1;margin-bottom:15px;color:#000}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-size:60%;color:#6f6f6f;line-height:0;text-transform:none}h1{font-weight:200;font-size:44px}h2{font-weight:200;font-size:37px}h3{font-weight:500;font-size:27px}h4{font-weight:500;font-size:23px}h5{font-weight:900;font-size:17px}h6{font-weight:900;font-size:14px;text-transform:uppercase;color:#444}.collapse{margin:0!important}p,ul{margin-bottom:10px;font-weight:400;font-size:14px;line-height:1.6}p.lead{font-size:17px}p.last{margin-bottom:0}ul li{margin-left:5px;list-style-position:inside}ul.sidebar{background:#ebebeb;display:block;list-style-type:none}ul.sidebar li{display:block;margin:0}ul.sidebar li a{text-decoration:none;color:#666;padding:10px 16px;cursor:pointer;border-bottom:1px solid #777;border-top:1px solid #FFF;display:block;margin:0}ul.sidebar li a.last{border-bottom-width:0}ul.sidebar li a h1,ul.sidebar li a h2,ul.sidebar li a h3,ul.sidebar li a h4,ul.sidebar li a h5,ul.sidebar li a h6,ul.sidebar li a p{margin-bottom:0!important}.container{display:block!important;max-width:100%!important;margin:0 auto!important;clear:both!important}.content{padding:15px;max-width:80%px;margin:0 auto;display:block}.content table{width:100%}.column{width:300px;float:left}.column tr td{padding:15px}.column-wrap{padding:0!important;margin:0 auto;max-width:600px!important}.column table{width:100%}.social .column{width:280px;min-width:279px;float:left}.clear{display:block;clear:both}@media only screen and (max-width:600px){a[class=btn]{display:block!important;margin-bottom:10px!important;background-image:none!important;margin-right:0!important}div[class=column]{width:auto!important;float:none!important}table.social div[class=column]{width:auto!important}}</style>";
            $body .= "<table class='' style='background-color: #ECF8FF;' >\n<tr>\n<td>MFL No: <strong>{$facility_code}</strong> </td>\n<td>Health Facility Name: <strong>{$facility_name}</strong></td>\n<td>County: <strong>{$county_name}</strong></td>\n<td>Subcounty: <strong>{$disto_name}</strong></td>\n</tr>\n</table>" . '
<table class="" style="margin:8px;word-wrap: break-word;">
<thead style="font-size:12px">
			<tr><th><strong>Source</strong></th>
			<th><strong>Description</strong></th>
			<th><strong>Commodity Code</strong></th>

			<th><strong>Unit Cost(Ksh)</strong></th>
			<th><strong>Batch Affected</strong></th>
			<th><strong>Manufacturer</strong></th>
			<th><strong>Expiry Date</strong></th>
			<th><strong>Expiry Days</strong></th>
			<th><strong>Expired(Pack Size)</strong></th>
			<th><strong>Expired(Unit Size)</strong></th>
			<th><strong>Cost of Expired (Ksh)</strong></th>
</tr> </thead><tbody>';
            /*******************************begin adding data to the report*****************************************/
            foreach ($decom as $drug) {
                $commodity_id = $drug['commodity_id'];
                $batch = $drug['batch_no'];
                $mau = $drug['manufacture'];
                $commodity_name = $drug['commodity_name'];
                $commodity_code = $drug['commodity_code'];
                $unit_size = $drug['unit_size'];
                $unit_cost = str_replace(",", '', $drug['unit_cost']);
                $current_balance = $drug['current_balance'];
                $total_commodity_units = $drug['total_commodity_units'];
                $expiry_date = $drug['expiry_date'];
                $current_balance_pack = round($current_balance / $total_commodity_units, 1);
                $cost = $current_balance_pack * $unit_cost;
                $formatme = new DateTime($expiry_date);
                $newdate = $formatme->format('d M Y');
                $facility_stock_id = $drug['facility_stock_id'];
                $total = $total + $cost;
                $source = $drug['source_name'];
                //get the current balance of the commodity
                $facility_stock = Facility_Stocks::get_facility_commodity_total($facility, $commodity_id)->toArray();
                $mydata3 = array('facility_code' => $facility_code, 's11_No' => '(Loss) Expiry', 'commodity_id' => $commodity_id, 'batch_no' => $batch, 'expiry_date' => date('y-m-d', strtotime(str_replace(",", " ", $expiry_date))), 'balance_as_of' => $facility_stock[0]['commodity_balance'], 'date_issued' => date('y-m-d'), 'qty_issued' => 0, 'adjustmentnve' => $current_balance * -1, 'issued_to' => 'N/A', 'issued_by' => $this->session->userdata('user_id'));
                $seconds_diff = strtotime(date("y-m-d")) - strtotime($expiry_date);
                $date_diff = floor($seconds_diff / 3600 / 24);
                Facility_Issues::update_issues_table($mydata3);
                $inserttransaction = Doctrine_Manager::getInstance()->getCurrentConnection()->execute("UPDATE `facility_transaction_table` SET losses =losses+{$current_balance}, closing_stock=closing_stock-{$current_balance}\n              WHERE `commodity_id`= '{$commodity_id}' and status='1' and facility_code={$facility_code} ");
                /// update the facility issues and set the commodity to expired
                $inserttransaction = Doctrine_Manager::getInstance()->getCurrentConnection()->execute("UPDATE `facility_stocks` SET status =2 WHERE `id`= '{$facility_stock_id}'");
                if ($current_balance_pack > 0) {
                    $body .= '<tr style="font-size:12px;padding:4px"><td>' . $source . '</td>
							<td>' . $commodity_name . '</td>
							<td>' . $commodity_code . '</td>

							<td>' . $unit_cost . '(' . $unit_size . ')' . '</td>
							<td>' . $batch . '</td>
							<td>' . $mau . '</td>
							<td>' . $newdate . '</td>
							<td>' . $date_diff . '</td>
							<td>' . $current_balance_pack . '</td>
							<td>' . $current_balance . '</td>
							<td>' . number_format($cost, 2, '.', ',') . '</td>
							</tr>';
                }
            }
            $body .= '
		<tr>
		<td colspan="12">
		<b style="float: right; margin:1.0em;font-size:14px">TOTAL cost(Ksh) of Expiries: &nbsp; ' . number_format($total, 2, '.', ',') . '</b>
		</tr>
		</tbody>
		</table>';
            $html_body .= "<!-- BODY -->\n<table class='body-wrap'>\n\t<tr>\n\t\t<td></td>\n\t\t<td class='container' bgcolor='#FFFFFF'>\n\n\t\t\t<div class='content'>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<h3>Hello,</h3>\n\t\t\t\t\t\t<p class='lead'>Find attached decommissioned commodities for {$facility_name} ({$facility_code}).</p>\n\t\t\t\t\t\t<p>{$body}</p>\n\t\t\t\t\t\t<!-- Callout Panel -->\n\t\t\t\t\t\t<p class='callout'>\n\t\t\t\t\t\t\t<a href='health-cmp.or.ke'>Click here! &raquo;</a> to follow up.\n\t\t\t\t\t\t</p><!-- /Callout Panel -->\n\n\t\t\t\t\t\t<!-- social & contact -->\n\t\t\t\t\t\t< 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Factory类代码示例发布时间:2022-05-23
下一篇:
PHP Fachada类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap