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


PHP System_helper::Get_Bng_to_Eng方法代码示例

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


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

示例1: upload_excel_file

 public function upload_excel_file()
 {
     $user = User_helper::get_user();
     if ($_FILES["file"]['name'] != "") {
         $arr = explode(".", $_FILES["file"]['name']);
         $ext = $arr[sizeof($arr) - 1];
     }
     $size = $_FILES["file"]['size'];
     $this->load->library('upload');
     $fileName = 'template_' . $user->id . '_' . date('Ymdhis');
     if ($ext == 'xls' || $ext == 'xlsx') {
         System_helper::upload_excel_file($fileName, $save_dir = "uploads/excel", $max_size = 60000, $types = 'xls|xlsx');
         if ($ext == 'xls') {
             $path = "uploads/excel/" . $fileName . '.xls';
         } else {
             $path = "uploads/excel/" . $fileName . '.xlsx';
         }
         if ($size < 60000) {
             $i = 0;
             $totalcount = 0;
             $objPHPExcel = PHPExcel_IOFactory::load($path);
             foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
                 $worksheetTitle = $worksheet->getTitle();
                 $highestRow = $worksheet->getHighestRow();
                 $highestColumn = $worksheet->getHighestColumn();
                 $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
                 $nrColumns = ord($highestColumn) - 64;
                 for ($row = 1; $row <= $highestRow; ++$row) {
                     for ($col = 0; $col < $highestColumnIndex; ++$col) {
                         $cell = $worksheet->getCellByColumnAndRow($col, $row);
                         $val = $cell->getValue();
                         $dataType = PHPExcel_Cell_DataType::dataTypeForValue($val);
                     }
                 }
             }
             $total_men = 0;
             $total_women = 0;
             $total_tribe = 0;
             $total_disability = 0;
             $total_services = 0;
             $total_income = 0;
             $check_income = false;
             for ($row = 3; $row <= $highestRow; ++$row) {
                 $val = array();
                 for ($col = 0; $col < $highestColumnIndex; ++$col) {
                     $cell = $worksheet->getCellByColumnAndRow($col, $row);
                     $val[] = $cell->getValue();
                 }
                 if ($val[3] != "" && $val[3] != null) {
                     $serial[$i] = System_helper::Get_Bng_to_Eng($val[0]);
                     $customer_name[$i] = $val[1];
                     $gender[$i] = $val[2];
                     $service_name[$i] = $val[3];
                     $amount[$i] = System_helper::Get_Bng_to_Eng(abs($val[4]));
                     if (strlen($amount[$i]) > 6) {
                         $check_income = true;
                     }
                     if ($this->Service_template_model->check_uisc_service_existence($service_name[$i])) {
                         $totalcount = $totalcount + $i;
                         $total_services++;
                         $total_income = $total_income + System_helper::Get_Bng_to_Eng($amount[$i]);
                         if ($gender[$i] == $this->lang->line('MALE_VAL')) {
                             $total_men++;
                         } elseif ($gender[$i] == $this->lang->line('FEMALE_VAL')) {
                             $total_women++;
                         } elseif ($gender[$i] == $this->lang->line('TRIBE_VAL')) {
                             $total_tribe++;
                         } elseif ($gender[$i] == $this->lang->line('DISABILITY_VAL')) {
                             $total_disability++;
                         }
                     }
                     ++$i;
                 }
             }
             $DateCell = $worksheet->getCellByColumnAndRow('1', '1');
             $invDateRaw = $DateCell->getValue();
             if (is_float($invDateRaw)) {
                 $newDate = System_helper::ExcelToPHPDate($invDateRaw);
                 $invDate = date('Y-m-d', $newDate);
             } else {
                 $invDate = $invDateRaw;
             }
             if ($this->Service_template_model->chk_existing_uploded_excel_file($invDate) < 2) {
                 $invoice_data = array();
                 $zilla_invoice_data = array();
                 $invoice_details_data = array();
                 $zilla_invoice_details_data = array();
                 $user_zilla = $user->zilla;
                 $zilla_table_invoice = str_pad($user_zilla, 2, "0", STR_PAD_LEFT) . '_invoices';
                 $zilla_table_invoice_details = str_pad($user_zilla, 2, "0", STR_PAD_LEFT) . '_invoice_details';
                 $uisc_id = $user->uisc_id;
                 $user_group_id = $user->user_group_id;
                 $division = $user->division;
                 $zilla = $user->zilla;
                 $upazila = $user->upazila;
                 $unioun = $user->unioun;
                 $citycorporation = $user->citycorporation;
                 //$citycorporationward = $user->citycorporationward;
                 $municipal = $user->municipal;
                 //$municipalward = $user->municipalward;
//.........这里部分代码省略.........
开发者ID:marajmmc,项目名称:asset,代码行数:101,代码来源:Service_template.php

示例2: dcms_save

 private function dcms_save()
 {
     $time = time();
     $user_data = array();
     $secretary_data = array();
     $entrepreneur_data = array();
     $device_data = array();
     $resource_data = array();
     $investment_data = array();
     $training_data = array();
     $electricity_data = array();
     $location_data = array();
     $academic_data = array();
     if (!$this->check_validation()) {
         $ajax['status'] = false;
         $ajax['system_message'] = $this->message;
         $this->jsonReturn($ajax);
     } else {
         $user_data['uisc_type'] = $this->input->post('entrepreneur_type');
         $user_data['user_group_id'] = $this->config->item('UISC_GROUP_ID');
         $user_data['uisc_id'] = $this->input->post('uisc_name');
         $user_data['division'] = $this->input->post('division');
         $user_data['zilla'] = $this->input->post('zilla');
         $user_data['status'] = 0;
         $user_data['name_bn'] = $this->input->post('entrepreneur_name');
         if ($this->input->post('entrepreneur_type') == $this->config->item('ONLINE_UNION_GROUP_ID')) {
             $user_data['upazila'] = $this->input->post('upazilla');
             $user_data['unioun'] = $this->input->post('union');
             $uisc_serial = $this->User_registration_model->get_uisc_serial($this->input->post('uisc_name'));
             $user_serial = $this->User_registration_model->get_user_serial($this->input->post('uisc_name'));
             $user_data['username'] = $user_data['zilla'] . '-' . $user_data['upazila'] . '-' . $user_data['unioun'] . '-' . str_pad($uisc_serial, 2, "0", STR_PAD_LEFT) . '-' . str_pad($user_serial, 2, "0", STR_PAD_LEFT);
             $user_data['password'] = md5(md5($user_data['username']));
         } elseif ($this->input->post('entrepreneur_type') == $this->config->item('ONLINE_CITY_CORPORATION_WORD_GROUP_ID')) {
             $user_data['citycorporation'] = $this->input->post('citycorporation');
             $user_data['citycorporationward'] = $this->input->post('citycorporationward');
             $uisc_serial = $this->User_registration_model->get_uisc_serial($this->input->post('uisc_name'));
             $user_serial = $this->User_registration_model->get_user_serial($this->input->post('uisc_name'));
             $user_data['username'] = $user_data['zilla'] . '-' . $user_data['citycorporation'] . '-' . $user_data['citycorporationward'] . '-' . str_pad($uisc_serial, 2, "0", STR_PAD_LEFT) . '-' . str_pad($user_serial, 2, "0", STR_PAD_LEFT);
             $user_data['password'] = md5(md5($user_data['username']));
         } elseif ($this->input->post('entrepreneur_type') == $this->config->item('ONLINE_MUNICIPAL_WORD_GROUP_ID')) {
             $user_data['municipal'] = $this->input->post('municipal');
             $user_data['municipalward'] = $this->input->post('municipalward');
             $uisc_serial = $this->User_registration_model->get_uisc_serial($this->input->post('uisc_name'));
             $user_serial = $this->User_registration_model->get_user_serial($this->input->post('uisc_name'));
             $user_data['username'] = $user_data['zilla'] . '-' . $user_data['municipal'] . '-' . $user_data['municipalward'] . '-' . str_pad($uisc_serial, 2, "0", STR_PAD_LEFT) . '-' . str_pad($user_serial, 2, "0", STR_PAD_LEFT);
             $user_data['password'] = md5(md5($user_data['username']));
         }
         $user_data['email'] = $this->input->post('uisc_email');
         $user_data['mobile'] = $this->input->post('uisc_mobile_no');
         $user_data['ques_id'] = $this->input->post('ques_id');
         $user_data['ques_ans'] = $this->input->post('ques_ans');
         $dir = $this->config->item("dcms_upload");
         $uploaded = System_helper::upload_file($dir['entrepreneur'], 10240, 'gif|jpg|png');
         if (array_key_exists('profile_image', $uploaded)) {
             if ($uploaded['profile_image']['status']) {
                 $user_data['picture_name'] = $uploaded['profile_image']['info']['file_name'];
             } else {
                 $ajax['status'] = false;
                 $ajax['system_message'] = $this->message .= $uploaded['profile_image']['message'] . '<br>';
                 $this->jsonReturn($ajax);
             }
         }
         $user_data['create_by'] = '000000';
         $user_data['create_date'] = $time;
         $entrepreneur_data['user_id'] = $user_data['username'];
         $entrepreneur_data['entrepreneur_type'] = $this->input->post('entrepreneur_exp_type');
         $entrepreneur_data['entrepreneur_name'] = $this->input->post('entrepreneur_name');
         $entrepreneur_data['entrepreneur_father_name'] = $this->input->post('entrepreneur_father_name');
         $entrepreneur_data['entrepreneur_mother_name'] = $this->input->post('entrepreneur_mother_name');
         $entrepreneur_data['entrepreneur_qualification'] = $this->input->post('entrepreneur_qualification');
         $entrepreneur_data['entrepreneur_mobile'] = $this->input->post('entrepreneur_mobile');
         $entrepreneur_data['entrepreneur_email'] = $this->input->post('entrepreneur_email');
         $entrepreneur_data['entrepreneur_sex'] = $this->input->post('entrepreneur_sex');
         $entrepreneur_data['entrepreneur_address'] = $this->input->post('entrepreneur_address');
         $entrepreneur_data['entrepreneur_nid'] = $this->input->post('entrepreneur_nid');
         $entrepreneur_data['entrepreneur_bank_name'] = $this->input->post('entrepreneur_bank_name');
         $entrepreneur_data['entrepreneur_bank_account_no'] = $this->input->post('entrepreneur_bank_account_no');
         $entrepreneur_data['entrepreneur_bank_holder_name'] = $this->input->post('entrepreneur_bank_holder_name');
         $entrepreneur_data['entrepreneur_blog_member'] = $this->input->post('entrepreneur_blog_member');
         $entrepreneur_data['entrepreneur_fb_group_member'] = $this->input->post('entrepreneur_fb_group_member');
         $device_data['connection_type'] = $this->input->post('connection_type');
         $device_data['ip_address'] = $this->input->post('ip_address');
         $device_data['modem'] = $this->input->post('modem');
         $investment_data['self_investment'] = System_helper::Get_Bng_to_Eng(trim($this->input->post('self_investment')));
         $investment_data['invest_debt'] = System_helper::Get_Bng_to_Eng(trim($this->input->post('invest_debt')));
         $investment_data['invested_money'] = System_helper::Get_Bng_to_Eng(trim($this->input->post('self_investment'))) + trim(System_helper::Get_Bng_to_Eng($this->input->post('invest_debt')));
         //System_helper::Get_Bng_to_Eng($this->input->post('invested_money'));
         $investment_data['invest_sector'] = $this->input->post('invest_sector');
         $electricity_data['electricity'] = $this->input->post('electricity');
         $electricity_data['solar'] = $this->input->post('solar');
         $electricity_data['ips'] = $this->input->post('ips');
         $location_data['center_type'] = $this->input->post('center_location');
         $academic_data['latest_education'] = $this->input->post('latest_education');
         $academic_data['passing_year'] = $this->input->post('passing_year');
         $coursePost = $this->input->post('training_course');
         $institutePost = $this->input->post('training_institute');
         $timePost = $this->input->post('training_time');
         $resPost = $this->input->post('res_id');
         $res_detailPost = $this->input->post('res_detail');
         $quantityPost = $this->input->post('quantity');
//.........这里部分代码省略.........
开发者ID:saj696,项目名称:dcms_new,代码行数:101,代码来源:User_registration.php

示例3: details

 private function details($user_id)
 {
     if ($this->permissions['view']) {
         if (is_array($user_id)) {
             $user_id = System_helper::Get_Bng_to_Eng($user_id[0]);
         }
         $this->current_action = 'batch_details';
         $ajax['status'] = true;
         $data = array();
         $data['title'] = $this->lang->line("VIEW_DETAILS_TICKET_ASSIGN");
         $data['ticket'] = Query_helper::get_info($this->config->item('table_ticket_assign'), '*', array('user_id =' . $user_id), 1);
         //, 'status ='.$this->config->item('STATUS_INACTIVE')
         $data['users'] = Query_helper::get_info($this->config->item('table_users'), array('id value', 'name_bn text'), array('status = ' . $this->config->item('STATUS_ACTIVE'), "id = " . $user_id));
         $data['ticket_issues'] = $this->ticket_assign_model->get_ticket_assign($user_id);
         $ajax['system_content'][] = array("id" => "#system_wrapper", "html" => $this->load_view("ticket_management/ticket_assign/details", $data, true));
         if ($this->message) {
             $ajax['system_message'] = $this->message;
         }
         $ajax['system_page_url'] = $this->get_encoded_url('ticket_management/ticket_assign/index/batch_details/' . $user_id);
         $this->jsonReturn($ajax);
     } else {
         $ajax['status'] = true;
         $ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS");
         $this->jsonReturn($ajax);
     }
 }
开发者ID:mazba,项目名称:ams,代码行数:26,代码来源:Ticket_assign.php

示例4: system_save


//.........这里部分代码省略.........
             $education_info['latest_education'] = $this->input->post('latest_education');
             $education_info['passing_year'] = $this->input->post('passing_year');
             if ($this->input->post('education_id') > 0) {
                 Query_helper::update($this->config->item('table_entrepreneur_education'), $education_info, array("id = " . $this->input->post('education_id')));
             } else {
                 Query_helper::add($this->config->item('table_entrepreneur_education'), $education_info);
             }
             //////// END EDUCATION_RELATED_INFO ////////
             //////// START ENTREPRENEUR_TRAINING_RELATED_INFO ////////
             $training_info['update_by'] = $user->id;
             $training_info['update_date'] = $time;
             $training_info['user_id'] = $user_id;
             $training_info['uisc_id'] = $uisc_id;
             $training_id = $this->input->post('training_id');
             $course_name = $this->input->post('training_course');
             $institute_name = $this->input->post('training_institute');
             $timespan = $this->input->post('training_time');
             for ($noc = 0; $noc < sizeof($training_id); $noc++) {
                 $training_info['course_name'] = $course_name[$noc];
                 $training_info['institute_name'] = $institute_name[$noc];
                 $training_info['timespan'] = $timespan[$noc];
                 if (empty($training_id[$noc])) {
                     Query_helper::add($this->config->item('table_training'), $training_info);
                 } else {
                     Query_helper::update($this->config->item('table_training'), $training_info, array("id = " . $training_id[$noc]));
                 }
             }
             //////// END ENTREPRENEUR_TRAINING_RELATED_INFO ////////
             //////// START INVESTMENT_RELATED_INFO ////////
             $investment_info['update_by'] = $user->id;
             $investment_info['update_date'] = $time;
             $investment_info['user_id'] = $user_id;
             $investment_info['uisc_id'] = $uisc_id;
             $investment_info['self_investment'] = System_helper::Get_Bng_to_Eng(trim($this->input->post('self_investment')));
             $investment_info['invest_debt'] = System_helper::Get_Bng_to_Eng(trim($this->input->post('invest_debt')));
             $investment_info['invested_money'] = System_helper::Get_Bng_to_Eng(trim($this->input->post('self_investment'))) + System_helper::Get_Bng_to_Eng(trim($this->input->post('invest_debt')));
             //System_helper::Get_Bng_to_Eng(trim($this->input->post('invested_money')));
             $investment_info['invest_sector'] = $this->input->post('invest_sector');
             if ($this->input->post('investment_id') > 0) {
                 Query_helper::update($this->config->item('table_investment'), $investment_info, array("id = " . $this->input->post('investment_id')));
             } else {
                 Query_helper::add($this->config->item('table_investment'), $investment_info);
             }
             //////// END INVESTMENT_RELATED_INFO ////////
             //////// START CENTER_LOCATION_RELATED_INFO ////////
             $location_info['update_by'] = $user->id;
             $location_info['update_date'] = $time;
             $location_info['user_id'] = $user_id;
             $location_info['uisc_id'] = $uisc_id;
             $location_info['center_type'] = $this->input->post('center_location');
             if ($this->input->post('location_id') > 0) {
                 Query_helper::update($this->config->item('table_center_location'), $location_info, array("id = " . $this->input->post('location_id')));
             } else {
                 Query_helper::add($this->config->item('table_center_location'), $location_info);
             }
             //////// END CENTER_LOCATION_RELATED_INFO ////////
             //////// START EQUIPMENT ////////
             $resources_info['update_by'] = $user->id;
             $resources_info['update_date'] = $time;
             $resources_info['user_id'] = $user_id;
             $resources_info['uisc_id'] = $uisc_id;
             $resources_id = $this->input->post('resources_id');
             $res_id = $this->input->post('res_id');
             $res_detail = $this->input->post('res_detail');
             $quantity = $this->input->post('quantity');
             $status = $this->input->post('status');
开发者ID:marajmmc,项目名称:asset,代码行数:67,代码来源:User_profile_update.php


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