Changeset 559 for pro-violet-viettel/sourcecode/application
- Timestamp:
- Nov 18, 2014 5:13:28 PM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/frontend
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r556 r559 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); 30 $data['paidlogs'] = $paidlogs; 29 31 parse_str($user, $info); 30 32 $data = array_merge($data, $u); 31 33 $data = array_merge($data, $user_info); 34 //var_dump($data); 35 32 36 $this->load->view('frontend/user_profile', $data); 33 37 } else { -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r556 r559 365 365 $user ['updated_time'] = date ( 'Y-m-d H:i:s' ); 366 366 $this->updateUser ( $us_id, $user ); 367 $sms = "Qui vi da nap thanh cong " . $amount . " VN Dvao tai khoan " . $username . " tren soanbaigiang.smas.vn";367 $sms = "Qui vi da nap thanh cong " . $amount . " VNÄ vao tai khoan " . $username . " tren soanbaigiang.smas.vn"; 368 368 $status = 1; 369 369 } else { … … 445 445 $paidlog ['paidType'] = $paidType; 446 446 $paidlog ['amount'] = $amount; 447 $paidlog['source'] = ""; 448 if ($paidType == 1) 449 { 450 $paidlog['source'] = $sentNumber; 451 452 }else 453 { 454 $paidlog['source'] = "Thẻ cà o"; 455 } 447 456 $paidlog ['paidTime'] = $paidTime; 448 457 $this->db->query ( 'UNLOCK TABLES' ); 449 $sql = 'INSERT INTO tblpaidlog(us_id, paid_type, amount, paid_time) VALUES (?,?,?,?)';458 $sql = 'INSERT INTO tblpaidlog(us_id, paid_type, amount, source, paid_time) VALUES (?,?,?,?,?)'; 450 459 $query = $this->db->query ( $sql, $paidlog ); 451 460 } … … 469 478 $query = $this->db->query ($sql, $cardlog); 470 479 } 480 481 public function getPaidlog($us_id) 482 { 483 $this->db->query ( 'UNLOCK TABLES' ); 484 $sql = 'SELECT * FROM tblpaidlog where us_id = ?'; 485 $query = $this->db->query ( $sql, array ( 486 $us_id 487 ) ); 488 $row = $query->result_array(); 489 return $row; 490 } 471 491 } -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r557 r559 328 328 <tr> 329 329 <th class="center"> 330 <label> 331 <input type="checkbox" class="ace" /> 332 <span class="lbl"></span> 333 </label> 330 Từ 334 331 </th> 335 332 <th>Sá» tiá»n</th> … … 343 340 344 341 <tbody> 342 <?php if ($paidlogs) {?> 343 <?php foreach($paidlogs as $paidlog): ?> 345 344 <tr> 346 345 <td class="center"> 347 <label> 348 <input type="checkbox" class="ace" /> 349 <span class="lbl"></span> 350 </label> 346 <?php echo $paidlog['source']; ?> 351 347 </td> 352 <td> $45</td>353 <td> Feb 12</td>348 <td><?php echo $paidlog['amount']; ?></td> 349 <td><?php echo date('d-m-Y H:i:s', strtotime($paidlog['paid_time']));?></td> 354 350 </tr> 351 <?php endforeach; ?> 352 <?php }else{ ?> 353 <tr> 354 <td class="center" colspan=3>Quà vá» chưa có giao dá»ch nà o!</td> 355 </tr> 356 <?php } ?> 355 357 </tbody> 356 358 </table>
Note: See TracChangeset
for help on using the changeset viewer.