- Timestamp:
- Nov 11, 2014 5:22:15 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php
r462 r464 27 27 { 28 28 $data = array(); 29 $id=$this->uri->segment(3); 29 30 $admin_info = $this->session->userdata('adminInfo'); 30 31 if ($admin_info) { 31 $data['statistics'] = $this->getStatistics( );32 $data['content'] = $this->get Paidlogs();32 $data['statistics'] = $this->getStatistics($id); 33 $data['content'] = $this->getCollaboratorsUsers(array(),$id); 33 34 $this->load->view('reportAsistant/index', $data); 34 35 } else { … … 37 38 } 38 39 39 public function getStatistics( ) {40 public function getStatistics($id=false) { 40 41 $data = array(); 41 42 … … 43 44 44 45 $this->load->model('collabolator_model'); 45 $collaborators = $this->collabolator_model->getAllCollaboratorUser($this_year['start'] );46 $collaborators = $this->collabolator_model->getAllCollaboratorUser($this_year['start'],$id); 46 47 for ($i=1;$i<=12;$i++) 47 48 { … … 134 135 135 136 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 136 $data['total'] = 100; //$this->collabolator_model->countPaidlog($data);137 $data['total'] = $this->collabolator_model->countCountCollaboratorUser($data); 137 138 $data['paidlogs'] = $this->collabolator_model->getCountCollaboratorUser($data); 138 139 … … 145 146 } 146 147 return $this->load->view('reportAsistant/listview', $data, true); 148 } 149 150 public function getCollaboratorsUsers($filters = array(),$id=false) { 151 152 $this->load->helper('pagging'); 153 $this->load->model('collabolator_model'); 154 $data['current_page'] = $this->uri->segment(4, 1); 155 $data['itemsoptions'] = array(10, 25, 50, 100); 156 $data['perpage'] = 10; 157 $data['id']=$id; 158 $data['keyword'] = ""; 159 $data['sorting_order'] = "sorting_desc"; 160 $data['sorting_field'] = "id"; 161 162 if ($this->input->post('sorting_order')) { 163 if ($this->input->post('sorting_order') != "sorting") { 164 $data['sorting_order'] = $this->input->post('sorting_order'); 165 $data['sorting_field'] = $this->input->post('sorting_field'); 166 } 167 } 168 if ($this->input->post('items')) { 169 $data['perpage'] = $this->input->post('items'); 170 } 171 if ($this->input->post('keyword')) { 172 $data['search_field'] = ""; 173 $data['keyword'] = $this->input->post('keyword'); 174 175 if (preg_match("/[0-9]/", $data['keyword'])) { 176 $data['search_field'] = "cellphone"; 177 } 178 } 179 180 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 181 $data['total'] = $this->collabolator_model->countCountCollaboratorUsers($data); 182 $data['paidlogs'] = $this->collabolator_model->getCountCollaboratorUsers($data); 183 184 $data['paging_url'] = base_url() . "/admin/thong_ke_cong_tac_vien/trang/"; 185 $data['num_links'] = 2; 186 $data['paging'] = pagging($data); 187 188 if ($this->input->is_ajax_request()) { 189 return $this->load->view('reportAsistant/listview_user', $data); 190 } 191 return $this->load->view('reportAsistant/listview_user', $data, true); 147 192 } 148 193
Note: See TracChangeset
for help on using the changeset viewer.