- Timestamp:
- Nov 19, 2014 2:08:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r568 r574 27 27 $data['packages'] = $this->servicepackage_model->getAllPackages(); 28 28 $data['is_viettel'] = $user_info['is_viettel']; 29 $paidlogs = $this->user_model->getPaidlog($us_id);29 //$paidlogs = $this->user_model->getPaidlog($us_id); 30 30 31 $data['paidlogs'] = $paidlogs;31 //$data['paidlogs'] = $paidlogs; 32 32 parse_str($user, $info); 33 33 $data = array_merge($data, $u); … … 287 287 } 288 288 } 289 290 public function trade_history() 291 { 292 $this->load->helper('pagging'); 293 $us_id = $this->uri->segment(4); 294 $user_info = $this->session->userdata('userInfo'); 295 if ($user_info) 296 { 297 298 $data['us_id'] = $us_id; 299 $data['perpage'] = 10; 300 $data['current_page'] = $this->uri->segment(6, 1); 301 $data['start'] = ($data['current_page'] - 1) * $data['perpage']; 302 $this->load->model('user_model'); 303 $result = $this->user_model->getPaidlog($data); 304 $data['total'] = $this->user_model->countPaiglogs($us_id); 305 $data['num_links'] = 2; 306 $data['paging_url'] = base_url() . "frontend/user/trade_history/".$us_id."/page/"; 307 $data['paging'] = pagging($data); 308 $paidlogs = array(); 309 foreach ($result as $paidlog): 310 $paidlog['amount'] = number_format($paidlog['amount'], 0); 311 $paidlog['paid_time'] = date('d-m-Y H:i:s', strtotime($paidlog['paid_time'])); 312 array_push($paidlogs, $paidlog); 313 endforeach; 314 $data['paidlogs'] = $paidlogs; 315 echo json_encode($data); 316 }else { 317 redirect('frontend/home'); 318 } 319 } 289 320 290 321 }
Note: See TracChangeset
for help on using the changeset viewer.