當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Sanitizer::EmployeeMeta方法代碼示例

本文整理匯總了PHP中Sanitizer::EmployeeMeta方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sanitizer::EmployeeMeta方法的具體用法?PHP Sanitizer::EmployeeMeta怎麽用?PHP Sanitizer::EmployeeMeta使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sanitizer的用法示例。


在下文中一共展示了Sanitizer::EmployeeMeta方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: report

 function report()
 {
     //load our new PHPExcel library
     $this->load->library('excel');
     $this->load->library('Sanitizer');
     $EmployeeMeta = new Sanitizer($EmpId);
     $employee = $this->uri->segment(3);
     $from = date('Y-m-d', strtotime($this->input->post('FromDate')));
     $to = date('Y-m-d', strtotime($this->input->post('endDate')));
     $this->db->select('*');
     $this->db->from('ecc_calls_call');
     //$this->db->join('ecc_employees_emp', 'idemp_call = id_emp', 'inner');
     $this->db->join('ecc_company_co', 'idco_call = id_co', 'inner');
     $this->db->where('status_call', 'active');
     $this->db->where('callStatus_call', 'done');
     $this->db->where('idemp_call', $employee);
     $this->db->where('inDate_call >=', $from);
     $this->db->where('inDate_call <=', $to);
     $getCalls = $this->db->get();
     $cell = 9;
     $meta = $EmployeeMeta->EmployeeMeta($employee);
     $callNumber = 1;
     foreach ($getCalls->result() as $row) {
         $cell = $cell + 4;
         $this->db->select('*');
         $this->db->from('ecc_companyCategory_cocat');
         $getCat = $this->db->get();
         $this->db->select('*');
         $this->db->from('ecc_feedback_feed');
         $this->db->where('idcall_feed', $row->id_call);
         $getFeed = $this->db->get();
         //call meta
         $this->db->SELECT('*');
         $this->db->FROM('ecc_call_cmeta');
         $this->db->WHERE('idcall_cmeta', $row->id_call);
         $metaCall = $this->db->GET();
         $thisMetaCall = array();
         foreach ($metaCall->result() as $row2) {
             $thisMetaCall[$row2->metaKey_cmeta] = $row2->metaValue_cmeta;
         }
         //meta
         $MetaCall = array('reason' => $thisMetaCall['reason'], 'contact' => $thisMetaCall['contact']);
         //call meta
         $this->db->SELECT('*');
         $this->db->FROM('ecc_call_cmeta');
         $this->db->WHERE('idcall_cmeta', $row->id_call);
         $this->db->WHERE('metaKey_cmeta', 'contact');
         $metaContact = $this->db->GET();
         $name = $meta['first_name'] . " " . $meta['last_name'];
         $position = $meta['position'];
         $totalCalls = $getCalls->num_rows();
         $company = $row->name_co;
         $date = $row->date_call;
         $doneDate = $row->inDate_call;
         $objective = $MetaCall['reason'];
         //$feedback = $MetaCall['feedback'];
         $status = $row->callStatus_call;
         //$logo = imagecreatefromjpeg(base_url() . "assets/bofficr/images/ecc_report_logo.png");
         $author = $this->name;
         //date
         $format = 'DATE_RFC1036';
         $time = time();
         $creationDate = standard_date($format, $time);
         //activate worksheet number 1
         $this->excel->setActiveSheetIndex(0);
         //name the worksheet
         $this->excel->getActiveSheet()->setTitle($name . ' Calls Report');
         $this->excel->getActiveSheet()->setCellValue('A1', $name);
         $this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(20);
         $this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->mergeCells('A1:G1');
         $this->excel->getActiveSheet()->setCellValue('A2', $position);
         $this->excel->getActiveSheet()->getStyle('A2')->getFont()->setSize(12);
         $this->excel->getActiveSheet()->mergeCells('A2:G2');
         $this->excel->getActiveSheet()->setCellValue('A4', 'Total Calls');
         $this->excel->getActiveSheet()->getStyle('A4')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('A4')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->mergeCells('A4:C4');
         $this->excel->getActiveSheet()->setCellValue('E4', 'From');
         $this->excel->getActiveSheet()->getStyle('E4')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('E4')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->setCellValue('H4', 'To');
         $this->excel->getActiveSheet()->getStyle('H4')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('H4')->getFont()->setBold(true);
         //$this->excel->getActiveSheet()->setCellValue('A5', 'Companies');
         $this->excel->getActiveSheet()->getStyle('A5')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('A5')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->mergeCells('A5:C5');
         $this->excel->getActiveSheet()->setCellValue('A7', 'Company to call');
         $this->excel->getActiveSheet()->getStyle('A7')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('A7')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->mergeCells('A7:D11');
         $this->excel->getActiveSheet()->setCellValue('E7', 'Created in');
         $this->excel->getActiveSheet()->getStyle('E7')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('E7')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->mergeCells('E7:G11');
         $this->excel->getActiveSheet()->setCellValue('H7', 'Done in date');
         $this->excel->getActiveSheet()->getStyle('H7')->getFont()->setSize(16);
         $this->excel->getActiveSheet()->getStyle('H7')->getFont()->setBold(true);
         $this->excel->getActiveSheet()->mergeCells('H7:I11');
//.........這裏部分代碼省略.........
開發者ID:sirfsonuji,項目名稱:SAM-API,代碼行數:101,代碼來源:boffice.php


注:本文中的Sanitizer::EmployeeMeta方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。