Changeset 478 for pro-violet-viettel/sourcecode/application/modules
- Timestamp:
- Nov 12, 2014 9:28:43 AM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/reportAsistant.php
r464 r478 27 27 { 28 28 $data = array(); 29 $id=$this->uri->segment(3);29 30 30 $admin_info = $this->session->userdata('adminInfo'); 31 31 if ($admin_info) { 32 $id=$this->uri->segment(3); 33 $data['id']=$id; 32 34 $data['statistics'] = $this->getStatistics($id); 33 35 $data['content'] = $this->getCollaboratorsUsers(array(),$id); 34 $this->load->view('reportAsistant/index ', $data);36 $this->load->view('reportAsistant/indexCollaborator', $data); 35 37 } else { 36 38 $this->load->view('login'); … … 149 151 150 152 public function getCollaboratorsUsers($filters = array(),$id=false) { 151 153 152 154 $this->load->helper('pagging'); 153 155 $this->load->model('collabolator_model'); 154 $data['current_page'] = $this->uri->segment(4, 1); 156 $data['current_page'] = $this->uri->segment(5, 1); 157 155 158 $data['itemsoptions'] = array(10, 25, 50, 100); 156 159 $data['perpage'] = 10; 160 if (!$id) 161 { 162 $data['id']= $this->uri->segment(4, 1); 163 } 164 else { 157 165 $data['id']=$id; 166 } 167 158 168 $data['keyword'] = ""; 159 169 $data['sorting_order'] = "sorting_desc"; … … 182 192 $data['paidlogs'] = $this->collabolator_model->getCountCollaboratorUsers($data); 183 193 184 $data['paging_url'] = base_url() . "/admin/thong_ke_cong_tac_vien/trang /";194 $data['paging_url'] = base_url() . "/admin/thong_ke_cong_tac_vien/trang_ctv/".$data['id']; 185 195 $data['num_links'] = 2; 186 196 $data['paging'] = pagging($data); … … 197 207 $this->load->model('user_model'); 198 208 $data = $this->user_model->get_user_info($src, $us_id, $token); 209 199 210 if (strlen($data) > 0) { 200 211 $arr_users = explode("&", $data); -
pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php
r464 r478 123 123 if ($data['keyword']) { 124 124 if ($data['search_field'] == "cellphone") { 125 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%')"; 126 } else { 127 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 125 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%')"; 128 126 } 129 127 } … … 153 151 if ($data['keyword']) { 154 152 if ($data['search_field'] == "cellphone") { 155 $where.=" WHERE (tblcollaborator.cellphone LIKE '%" . $data['keyword'] . "%')"; 156 } else { 157 $where.=" WHERE (full_name LIKE '%" . $data['keyword'] . "%' OR login_name LIKE '%" . $data['keyword'] . "%') "; 158 } 153 $where.=" WHERE (tbluser.cellphone LIKE '%" . $data['keyword'] . "%')"; 154 } 159 155 } 160 156 // $from = date("Y-m-d 00:00:00",$from); 161 157 $sql="SELECT *,tblcollaborator.created_time as collaborator_created_time,tbluser.cellphone as user_cellphone,tblcollaborator.cellphone as collaborator_cellphone, tbluser.created_time as user_created_time FROM ".$this->table_name." INNER JOIN tbluser ON tbluser.collaborator = tblcollaborator.id ".$where." AND tbluser.collaborator = ".$data['id']." ".$order." LIMIT " . $data['start'] . ", " . $data['perpage'] . " "; 162 163 158 $result = $this->db->query($sql)->result_array(); 164 159 foreach ($result as $index=>$paidlog)
Note: See TracChangeset
for help on using the changeset viewer.