Ignore:
Timestamp:
Jan 19, 2015 11:51:02 AM (10 years ago)
Author:
dungnv
Message:
 
Location:
pro-violet-viettel/sourcecode/application/modules
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/admin/controllers/cardlog.php

    r540 r698  
    5656                        $id = $cl['us_id'];
    5757                        $username = $this->get_username($id);
    58                         $servicename = $this->get_servicename($cl['service_id']);
     58                        //$servicename = $this->get_servicename($cl['service_id']);
    5959                        $cl['username'] = $username;
    60                         $cl['servicename'] = $servicename;
     60                        //$cl['servicename'] = $servicename;
    6161                        array_push($cardlogs, $cl);
    6262                endforeach;
  • pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/listview.php

    r573 r698  
    6363                                                                </th>
    6464                                                        <th class="<?php if ($sorting_field == 'sender') {echo $sorting_order;} else {echo "sorting";} ?>" id="sender" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Người gá»­i: activate to sort column ascending">Người gá»­i</th>
    65                                                         <th class="<?php if ($sorting_field == 'service_id') {echo $sorting_order;} else {echo "sorting";} ?>" id="serivice_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Dịch vụ: activate to sort column ascending">Dịch vụ</th>
     65                                                        <th class="<?php if ($sorting_field == 'service_id') {echo $sorting_order;} else {echo "sorting";} ?>" id="serivice_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Dịch vụ: activate to sort column ascending">Tình trạng</th>
    6666                                                        <th class="<?php if ($sorting_field == 'pin_code') {echo $sorting_order;} else {echo "sorting";} ?>" id="pin_code" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Mã pin: activate to sort column ascending">Mã pin</th>
    6767                                                        <th class="<?php if ($sorting_field == 'serial_number') {echo $sorting_order;} else {echo "sorting";} ?>" id="serial_number" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số seri: activate to sort column ascending">Số seri</th>
     
    8787                                                                <?php echo $cardlog['sender']; ?>
    8888                                                        </td>
    89                                                         <td><?php echo $cardlog['servicename']; ?></td>
     89                                                        <td><?php echo $cardlog['status'] == -1 ? 'Lỗi nạp thẻ': ($cardlog['status'] == 0 ? 'Khóa tạm thời' : 'Nạp thành cÃŽng');?></td>
    9090                                                        <td><?php echo $cardlog['pin_code']; ?></td>
    91                                                         <td><?php echo $cardlog['serial_number']; ?></td>
     91                                                        <td><?php echo $cardlog['serial_num']; ?></td>
    9292                                                        <td><?php echo $cardlog['card_value']; ?></td>
    9393                                                        <td><?php echo $cardlog['created_time']; ?></td>
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php

    r691 r698  
    341341                $this->load->helper('pagging');
    342342                $us_id = $this->uri->segment(4);
    343         $user_info = $this->session->userdata('userInfo');
    344         if ($user_info)
     343
     344        $user_info = $this->session->userdata('userInfo');
     345                $admin_info = $this->session->userdata('adminInfo');
     346
     347        if ($user_info || $admin_info)
    345348                {
    346                        
    347349                        $data['us_id'] = $us_id;
    348350                        $data['perpage'] = 10;
     
    376378                $username = $user['cellphone'];
    377379                $user_info = $this->session->userdata('userInfo');
    378                 if ($user_info)
     380                $admin_info = $this->session->userdata('adminInfo');
     381                if ($user_info || $admin_info)
    379382                {
    380383                        $data['username'] = $username;
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r695 r698  
    496496                $cardlog['created_time'] = $receiveTime;
    497497                $this->db->query ( 'UNLOCK TABLES' );
    498                 $sql = 'INSERT INTO tblcardlog(sender, us_id, pin_code, serial_num, card_value, created_time) VALUES(?,?,?,?,?,?)';
     498                $sql = 'INSERT INTO tblcardlog(sender, us_id, status, pin_code, serial_num, card_value, created_time) VALUES(?,?,?,?,?,?,?)';
    499499                $query = $this->db->query ($sql, $cardlog);
    500500        }
  • pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php

    r695 r698  
    4242                $errMsg = '';
    4343                $cardValue = 0;
     44                $updatedTime = date('Y-m-d H:i:s');
     45                $status = -1;
     46
    4447                if ($isLocked == 0) {
    4548                        $aryParams = array(
     
    5053                       
    5154                        $aryResult = array();
    52                         //$aryResult['TransactionAmount'] = 10000;
     55
    5356                        $chargCard = $this->services_model->cardPaidProcess($aryParams,  $aryResult);
    54                         //$chargCard = _SBG_CARD_PAY_SUCCESS;
    5557                        $status = $chargCard;
     58
    5659                        $paidType = 2;
    5760                        $amount = $aryResult['TransactionAmount'];
     
    5962                        $paidTime = date('Y-m-d H:i:s');
    6063                        $user['acc_balanced'] = $user['acc_balanced'] + $amount;
    61                         $user['updated_time'] = date('Y-m-d H:i:s');
     64                        $user['updated_time'] = $updatedTime;
    6265                        if ($amount > 0){
    6366                                $updateData = array('acc_balanced' => $user['acc_balanced'], 'updated_time' => $user['updated_time'] );
     
    7881                        else {
    7982                                $isLocked = createLockFile($lockFilePreFix, $maxReach, $timeToUnlock, $lockFilePath, FALSE);
    80                                 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg;
    81                                 $status = 0;
     83                                $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg;                           
    8284                        }
    8385                }else if ($isLocked == 1) {
    8486                        $errMsg = $lockedMsg;
    8587                        $result['success'] = _SBG_CARD_PAY_FAIL;
    86                         $status = -1;
     88                        $status = 0;
    8789                }
    8890
    89                 $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $user['updated_time']);
     91                $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $updatedTime);
    9092               
    9193                $result['us_id'] = $userID;
Note: See TracChangeset for help on using the changeset viewer.