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


PHP Facilities::get_facility_name方法代码示例

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


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

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

示例2: facility_impact_report

 public function facility_impact_report()
 {
     $facility_code = $this->session->userdata('facility_id');
     $current_user = $this->session->userdata('user_id');
     $report = Facility_Impact_Evaluation::get_all($facility_code, $current_user);
     isset($report) ? $data['filled_report'] = $report : ($data['filled_report'] = NULL);
     $data['facilities'] = Facilities::get_facility_name($facility_code);
     $data['title'] = "Facility Impact Report";
     $data['content_view'] = "facility/facility_reports/facility_impact_evaluation";
     $data['banner_text'] = "Facility Evaluation Form";
     $this->load->view("shared_files/template/template", $data);
 }
开发者ID:HCMPKenya,项目名称:HCMP-ALPHA,代码行数:12,代码来源:reports.php

示例3: generate_malaria_report_pdf

 public function generate_malaria_report_pdf($report_name, $title, $html_data)
 {
     $current_year = date('Y');
     $current_month = date('F');
     $facility_code = $this->session->userdata('news');
     $facility_name_array = Facilities::get_facility_name($facility_code)->toArray();
     $facility_name = $facility_name_array['facility_name'];
     /********************************************setting the report title*********************/
     $html_title = "<div ALIGN=CENTER><img src='" . base_url() . "assets/img/coat_of_arms.png' height='70' width='70'style='vertical-align: top;' > </img></div>\n        <div style='text-align:center; font-family: arial,helvetica,clean,sans-serif; font-size: 14px; display: block; font-weight: bold; '>\n       Ministry of Public Health and Sanitation/Ministry of Medical Services</div>\n        <div style='text-align:center; font-family: arial,helvetica,clean,sans-serif;display: block; font-weight: bold;display: block; font-size: 13px;'>Health Commodities Management Platform</div>\n       <div style='text-align:center; font-family: arial,helvetica,clean,sans-serif; font-size: 12px; display: block; font-weight: bold;'>" . $current_month . " " . $current_year . "</h2>\n       <hr />   ";
     $css_path = base_url() . 'assets/css/style.css';
     /**********************************initializing the report **********************/
     $this->load->library('mpdf');
     $this->mpdf = new mPDF('', 'A4-L', 0, '', 15, 15, 16, 16, 9, 9, '');
     //$stylesheet = file_get_contents("$css_path");
     //$this->mpdf->WriteHTML($stylesheet,1);	// The parameter 1 tells that this is css/style only and no body/html/text
     $this->mpdf->SetTitle($title);
     $this->mpdf->WriteHTML($html_title);
     $this->mpdf->simpleTables = true;
     $this->mpdf->WriteHTML('<br/>');
     $this->mpdf->WriteHTML($html_data);
     $reportname = $report_name . ".pdf";
     $this->mpdf->Output($reportname, 'D');
 }
开发者ID:karsanrichard,项目名称:hcmp_test,代码行数:23,代码来源:divisional_reports.php

示例4: facility_order_

 public function facility_order_($facility_code = null)
 {
     // hack to ensure that when you are ordering for a facility that is not using hcmp they have all the items
     $checker = $this->session->userdata('facility_id') ? null : 1;
     if (isset($_FILES['file']) && $_FILES['file']['size'] > 0) {
         $more_data = $this->hcmp_functions->kemsa_excel_order_uploader($_FILES["file"]["tmp_name"]);
         $data['order_details'] = $data['facility_order'] = $more_data['row_data'];
         $facility_data = Facilities::get_facility_name($more_data['facility_code'])->toArray();
         $facility_code = $facility_data[0]['facility_code'];
         if (count($facility_data) == 0) {
             $this->session->set_flashdata('system_error_message', "Kindly upload a file with correct facility MFL code ");
             redirect("reports/order_listing/subcounty");
         }
         if ($facility_data[0]['using_hcmp'] == 1) {
             //$this -> session -> set_flashdata('system_error_message', "You cannot order for a" . " facility that is already using HCMP, they need to place their order using their accounts");
             //redirect("reports/order_listing/subcounty");
         }
     } else {
         $data['order_details'] = $data['facility_order'] = Facility_Transaction_Table::get_commodities_for_ordering($facility_code, $checker);
         $facility_data = Facilities::get_facility_name($facility_code)->toArray();
     }
     $data['content_view'] = "facility/facility_orders/facility_order_from_kemsa_v";
     $data['title'] = "Facility New Order";
     $data['system_error_message'] = "You are ordering for " . $facility_data[0]['facility_name'];
     $data['facility_code'] = $facility_code;
     $data['banner_text'] = "Facility New Order";
     $data['drawing_rights'] = $facility_data[0]['drawing_rights'];
     $data['facility_commodity_list'] = Commodities::get_all_from_supllier(1);
     $this->load->view('shared_files/template/template', $data);
 }
开发者ID:karsanrichard,项目名称:hcmp_demo,代码行数:30,代码来源:orders.php

示例5: send_order_approval_sms

 public function send_order_approval_sms($facility_code, $status)
 {
     //get the facility_name
     $name = Facilities::get_facility_name($facility_code);
     $facility_name = $name[0]['facility_name'];
     $message = $status == 1 ? $facility_name . " order has been rejected. HCMP" : $facility_name . " order has been approved. HCMP";
     $data = Users::getUsers($facility_code)->toArray();
     $phone = $this->get_facility_phone_numbers($facility_code);
     $phone .= $this->get_ddp_phone_numbers($data[0]['district']);
     $spam_sms = '254728778002+254707463571' . $phone;
     $phone_numbers = explode("+", $spam_sms);
     foreach ($phone_numbers as $key => $user_no) {
         file("http://41.57.109.242:13000/cgi-bin/sendsms?username=clinton&password=ch41sms&to={$user_no}&text={$message}");
     }
 }
开发者ID:HCMPKenya,项目名称:hcmp_demo,代码行数:15,代码来源:sms.php

示例6: generate_pdf

    public function generate_pdf($r_name, $title, $data, $display_type)
    {
        $facility_code = $this->session->userdata('news');
        $facility_name_array = Facilities::get_facility_name($facility_code)->toArray();
        $facility_name = $facility_name_array['facility_name'];
        if ($display_type == "Download PDF") {
            /********************************************setting the report title*********************/
            $html_title = "<div ALIGN=CENTER><img src='" . base_url() . "Images/coat_of_arms.png' height='70' width='70'style='vertical-align: top;' > </img></div>\n      <div style='text-align:center; font-size: 14px;display: block;font-weight: bold;'>{$title}</div>\n       <div style='text-align:center; font-family: arial,helvetica,clean,sans-serif;display: block; font-weight: bold; font-size: 14px;'>\n       Ministry of Public Health and Sanitation/Ministry of Medical Services</div>\n        <div style='text-align:center; font-family: arial,helvetica,clean,sans-serif;display: block; font-weight: bold;display: block; font-size: 13px;'>Health Commodities Management Platform</div><hr /> \n        <span><p style='font-weight: bold;'>MFL CODE: " . $facility_code . "</p><p style='font-weight: bold;'> FACILITY NAME: " . $facility_name . "</p>\n          ";
            /**********************************initializing the report **********************/
            $this->load->library('mpdf');
            $this->mpdf = new mPDF('', 'A4-L', 0, '', 15, 15, 16, 16, 9, 9, '');
            $this->mpdf->SetTitle($title);
            $this->mpdf->WriteHTML($html_title);
            $this->mpdf->simpleTables = true;
            $this->mpdf->WriteHTML('<br/>');
            $this->mpdf->WriteHTML($data);
            $report_name = $r_name . ".pdf";
            $this->mpdf->Output($report_name, 'D');
        } else {
            if ($display_type == "View Report") {
                $html_title = '<link href="' . base_url() . 'CSS/style.css" type="text/css" rel="stylesheet"/> 
		<div class="logo"><a class="logo" ></a> </div>
		 <div id="system_title">
		<span style="display: block; font-weight: bold; font-size: 14px; margin:2px;">Public Health and Sanitation/Ministry of Medical Services</span>
		<span style="display: block; font-size: 12px;">Health Commodities Management Platform</span>
		</div>
		</div>
		<span style="display: block; font-size: 12px;">Health Commodities Management Platform</span><span style="text-align:center;" ><hr /> 
        <span><p style="font-weight: bold;">MFL CODE: ' . $facility_code . '</p><p style="font-weight: bold;"> FACILITY NAME: ' . $facility_name . '</p>';
                echo $html_title . $data;
            }
        }
    }
开发者ID:HCMPKenya,项目名称:RTK_TEST,代码行数:33,代码来源:report_management.php

示例7: InsertExt

 public function InsertExt()
 {
     #solves error code fac#35 changing issuing to use commodity id that batchno
     $commodity_id = $_POST['commodity_id'];
     #///////////////////////////////////////
     $Available = $_POST['commodity_balance'];
     $ids = $_POST['drug_id'];
     $mfl = $_POST['mfl'];
     $batchN = $_POST['batchNo'];
     $Expiry = $_POST['expiry_date'];
     $qty = $_POST['Qtyissued'];
     $thedate = $_POST['date_issue'];
     $j = sizeof($ids);
     $count = 0;
     $facilityCode = $facility_c = $this->session->userdata('news');
     $usernow = $this->session->userdata('identity');
     //loop through all th donated commodities and process
     for ($me = 0; $me < $j; $me++) {
         if ($qty[$me] > 0) {
             ///update the donating facility details
             $facility_name = Facilities::get_facility_name($mfl[$me])->toArray();
             $facility_details = "inter-facility donation: MFL NO " . $mfl[$me];
             $sNo = "(-ve Adj) Stock Deduction";
             $count++;
             $issues = $qty[$me] * -1;
             ////checking if the facilility receiving the commodities is using HCMP
             $users_array = user::getUsers($mfl[$me]);
             $user_in_donated_facility = count($users_array);
             //inserting in the facility issues
             $mydata = array('facility_code' => $facilityCode, 'kemsa_code' => $ids[$me], 's11_No' => $sNo, 'batch_no' => $batchN[$me], 'expiry_date' => date('y-m-d', strtotime($Expiry[$me])), 'qty_issued' => $qty[$me], 'balanceAsof' => $Available[$me], 'date_issued' => date('y-m-d', strtotime($thedate[$me])), 'issued_to' => $facility_details, 'issued_by' => $usernow, 'receipts' => $issues);
             $u = new Facility_Issues();
             $u->fromArray($mydata);
             $u->save();
             //updating the facility stock
             $a = Doctrine_Manager::getInstance()->getCurrentConnection();
             $a->execute("UPDATE `Facility_Stock` SET `balance` = `balance`-{$qty[$me]} where id='{$commodity_id[$me]}'");
             ///updating the trascation_table
             $inserttransaction_1 = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAll("select  `adj` from `facility_transaction_table`WHERE `kemsa_code`= '{$ids[$me]}' and availability='1' and facility_code={$facility_c}; ");
             $inserttransaction_2 = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAll("SELECT (SUM(qty_issued)*-1) as update_ FROM facility_issues \n\t\t\tWHERE kemsa_code = '{$ids[$me]}' and issued_to='{$facility_details}' and availability='1'");
             $new_value = $inserttransaction_1[0]['adj'] + $inserttransaction_2[0]['update_'];
             $inserttransaction = Doctrine_Manager::getInstance()->getCurrentConnection();
             $inserttransaction->execute("UPDATE `facility_transaction_table` SET adj ={$new_value} \n                                          WHERE `kemsa_code`= '{$ids[$me]}' and availability='1' and facility_code={$facilityCode}; ");
             $inserttransaction1 = Doctrine_Manager::getInstance()->getCurrentConnection();
             $inserttransaction1->execute("UPDATE `facility_transaction_table` SET closing_stock = (SELECT SUM(balance) FROM facility_stock WHERE kemsa_code = '{$ids[$me]}'\n\t\t\tand availability='1' and facility_code='{$facilityCode}' and availability='1')\n                                          WHERE`kemsa_code`= '{$ids[$me]}' and availability='1' and facility_code={$facilityCode}; ; ");
             ///updating the receiving facility records if they are using the system
             if ($user_in_donated_facility > 0) {
                 //getting the name of the mauf of the given drug
                 $mauf = facility_stock::get_batch_details($batchN[$me], $ids[$me]);
                 $mydata = array('facility_code' => $mfl[$me], 'kemsa_code' => $ids[$me], 'batch_no' => $batchN[$me], 'manufacture' => $mauf['manufacture'], 'expiry_date' => date('y-m-d', strtotime($Expiry[$me])), 'balance' => $qty[$me], 'quantity' => $qty[$me], 'stock_date' => date('y-m-d'));
                 Facility_Stock::update_facility_stock($mydata);
                 ///checking if the receiving_facility_has_this_drug  //kemsa_code facility code
                 $receiving_facility_has_this_drug = Facility_Transaction_Table::get_if_drug_is_in_table($mfl[$me], $ids[$me]);
                 if (count($receiving_facility_has_this_drug) > 0) {
                     //if yes update their records
                     $inserttransaction = Doctrine_Manager::getInstance()->getCurrentConnection();
                     $inserttransaction->execute("UPDATE `facility_transaction_table` SET \n\t\t\tadj = (SELECT SUM(qty_issued) FROM facility_issues WHERE kemsa_code = '{$ids[$me]}' and issued_to='{$facility_details}' and availability='1')\n            WHERE `kemsa_code`= '{$ids[$me]}' and availability='1' and facility_code={$mfl[$me]}; ");
                     $inserttransaction1 = Doctrine_Manager::getInstance()->getCurrentConnection();
                     $inserttransaction1->execute("UPDATE `facility_transaction_table` \n\t\t\tSET closing_stock = (SELECT SUM(qty_issued) FROM facility_issues WHERE kemsa_code = '{$ids[$me]}' and issued_to='{$facility_details}' and availability='1')\n            WHERE`kemsa_code`= '{$ids[$me]}' and availability='1' and facility_code={$mfl[$me]};");
                 } else {
                     //if no insert the record in the transaction table
                     $mydata2 = array('Facility_Code' => $mfl[$me], 'Kemsa_Code' => $ids[$me], 'Opening_Balance' => 0, 'Total_Issues' => 0, 'Total_Receipts' => 0, 'Adj' => $qty[$me], 'Closing_Stock' => $qty[$me], 'availability' => 1);
                     Facility_Transaction_Table::update_facility_table($mydata2);
                 }
             } else {
                 //do nothing
             }
         }
     }
     $this->send_stock_donate_sms();
     $this->session->set_flashdata('system_success_message', "You have Donated {$count} item(s)");
     redirect('issues_main');
 }
开发者ID:HCMPKenya,项目名称:HCMP-ALPHA,代码行数:72,代码来源:issues_main.php


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