Changeset 716


Ignore:
Timestamp:
Jan 29, 2015 4:58:53 PM (10 years ago)
Author:
dungnv
Message:
 
Location:
pro-violet-viettel/sourcecode
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php

    r707 r716  
    337337                $data = $this->user_model->update_user($src, $token, $user, $us_id);
    338338                parse_str($data);
    339                 switch ($status) {
     339                                error_log('API return ---- Data: '. var_export($data, TRUE). "\n", 3, '/srv/www/sbg/log/changepass.log');
     340                switch ((int)$status) {
    340341                    case 0:
    341342                        $result['success'] = 1;
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r707 r716  
    404404        public function isExistcollaborator($collaborator) {
    405405                $this->db->query ( 'UNLOCK TABLES' );
    406                 $this->db->select ( '*' )->from ( 'tblcollaborator' )->where ( 'login_name', $collaborator )->limit ( 1 );
     406                //$this->db->select ( '*' )->from ( 'tblcollaborator' )->where ( 'login_name', $collaborator )->limit ( 1 );
     407                $this->db->select ( '*' )->from ( 'tblcollaborator' )->where ( 'cellphone', $collaborator )->limit ( 1 );
    407408                $result = $this->db->get ()->row_array ();
    408409                if ($result)
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php

    r714 r716  
    298298                                        <div class="alert alert-block alert-success">                                           
    299299                                            <p>
    300                                                 QuÜ vị cÅ©ng có thể sá»­ dụng số điện thoại <strong><?php echo $username;?></strong> và soạn tin theo cú pháp: <strong>SBG VIP 1</strong> (hay VIP 3, VIP 6, VIP 12) <strong>gá»­i tới 8062</strong> (Hệ thống sẜ trừ tiền trên tài khoản chính cá»§a số điện thoại <strong><?php echo $username;?></strong>)
     300                                                QuÜ vị cÅ©ng có thể sá»­ dụng số điện thoại&nbsp;<strong><?php echo $username;?></strong> và soạn tin theo cú pháp: <strong>SBG VIP 1</strong> (hay VIP 3, VIP 6, VIP 12) <strong>gá»­i tới 8062</strong> (Hệ thống sẜ trừ tiền trên tài khoản chính cá»§a số điện thoại&nbsp;<strong><?php echo $username;?></strong>)
    301301                                        </p>
    302302                                        </div>
  • pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php

    r630 r716  
    3535                function messageReceiver(){
    3636                        $aryArgs = func_get_args();
     37                        $aryExport = array('Username' => $aryArgs[0], 'Password' => $aryArgs[1], 'RequestID' => $aryArgs[2],'UserID' => $aryArgs[3],'ReceiverID' => $aryArgs[4],'ServiceID' => $aryArgs[5],'CommandCode' => $aryArgs[6], 'Info' => $aryArgs[7], 'ReceiveTime' => $aryArgs[8]);
     38
     39                        error_log(date('Y-m-d H:i:s').' -- VARIABLES: '. var_export($aryExport, TRUE). "\n", 3, '/srv/www/sbg/log/sms.log');
    3740                        list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $info, $receiveTime) = $aryArgs;
    3841                       
     
    5659                        $CI->load->model('frontend/User_model', 'objUserModel');
    5760                        $result = $CI->Services_model->processMORequest($userID, $info);
     61                        error_log(date('Y-m-d H:i:s').' -- INFO VAR: '. var_export($info, TRUE). "\n\n", 3, '/srv/www/sbg/log/sms.log');
    5862                        $CI->objUserModel->insertSmslog($receiverID, $serviceID, $commandCode, $info, $receiveTime);
    59                                        
     63                       
    6064                        $aryResult = explode ('|', $result);
    6165                        return $aryResult[0].'|'.$msgType.'|'.$aryResult[1];
  • pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php

    r711 r716  
    2525if ( ! defined('_SBG_CHARGING_GENERAL_ERROR'))                  define('_SBG_CHARGING_GENERAL_ERROR', 440);
    2626if ( ! defined('_SBG_CHARGING_NUMBER_NOT_REGISTED'))    define('_SBG_CHARGING_NUMBER_NOT_REGISTED', 501);
     27if ( ! defined('_SBG_CHARGING_MAX_VALUE'))                              define('_SBG_CHARGING_MAX_VALUE', 50000);
     28
    2729
    2830if ( ! defined('_SBG_SEND_MT_FAIL'))                                    define('_SBG_SEND_MT_FAIL', -1);
     
    3638if ( ! defined('_SBG_MO_PROCCESS_ERR'))                                 define('_SBG_MO_PROCCESS_ERR', 0);
    3739
    38 if ( ! defined('_SBG_GET_COLLABORATOR_FAIL'))                           define('_SBG_GET_COLLABORATOR_FAIL', -1);
     40if ( ! defined('_SBG_GET_COLLABORATOR_FAIL'))                   define('_SBG_GET_COLLABORATOR_FAIL', -1);
    3941
    4042Class Services_model extends CI_Model
     
    170172                                       
    171173                                        $amount = $packageData ['p_price'];
    172                                         $result = $this->chargeRootAccountProcess($sentNumber, $amount, $sentNumber.' paid for SBG');
     174                                        $count = $amount > $maxCharging ? ceil($amount/ _SBG_CHARGING_MAX_VALUE) : 1;
     175                                        $value = 0;
     176                                        for ($i = 1; $i <= $count; $i++) {
     177                                                $value = $amount > _SBG_CHARGING_MAX_VALUE ? _SBG_CHARGING_MAX_VALUE : $amount;
     178                                                $amount -= $value;                                                     
     179                                                $result = $this->chargeRootAccountProcess($sentNumber, $value, $sentNumber.' paid for SBG');
     180                                        }       
    173181
    174182                                        if ($result == _SBG_CHARGING_SUCCESS) {
     183                                                $amount = $packageData ['p_price'];
    175184                                                $this->objUserModel->rechargeAccount($sentNumber, $amount);
    176185                                                $smsReturn = $this->objUserModel->registerVip($sentNumber, $p_code, $packageData);
    177                                                
    178186                                                $paidTime = date('Y-m-d H:i:s');
    179187                                                $this->objUserModel->insertPaidlog($sentNumber, $sentNumber, _SBG_PAIDTYPE_SMS, $amount, $paidTime);
     
    187195                        case _SBG_MO_PAY_TO_ACCOUNT:
    188196                        case _SBG_MO_PAY_TO_ACCOUNT_FOR:
    189 
     197                                error_log(date('Y-m-d H:i:s').' -- DATA: '. var_export($aryContents, TRUE).' -- CASE: '. $case . "\n", 3, '/srv/www/sbg/log/pay.log');
    190198                                $userName = isset($aryContents[1]) ? $this->formatPhoneNumber($aryContents[1]) : $sentNumber;
    191                                
    192199                                if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR && !preg_match('/^(09\d{8}|01\d{9})$/', $userName)) {
    193200                                        $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG');
  • pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php

    r707 r716  
    122122                                                                        <a href="<?php echo $base_url; ?>admin/reportprovince">
    123123                                                                                <i class="icon-double-angle-right"></i>
    124                                                                                 Báo cáo thuê bao theo tỉnh
     124                                                                                Thuê bao theo tỉnh
    125125                                                                        </a>
    126126                                                                </li>
     
    128128                                                                        <a href="<?php echo $base_url; ?>admin/reportpackage">
    129129                                                                                <i class="icon-double-angle-right"></i>
    130                                                                                 Báo cáo doanh thu theo tỉnh
     130                                                                                Doanh thu theo tỉnh
    131131                                                                        </a>
    132132                                                                </li>
  • pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js

    r662 r716  
    127127}
    128128
     129function DoCloseLecture () {
     130        g_Flash.SetVariable("command", "Quit App");
     131}
     132
    129133// Handle all the FSCommand messages in a Flash movie.
    130134function LectorEditorOnline_DoFSCommand(command, args) {
     
    170174    InitViolet();
    171175    //$('#open-lecture').click(function(e){DoOpenLecture('http://sbgapi.violet.vn/space/file/id/7');});
     176        var inFormOrLink = false;
    172177
     178        /*$( window ).bind('beforeunload',function(e) {
     179                console.log('unload');
     180                e.preventDefault();
     181        });*/
    173182})
Note: See TracChangeset for help on using the changeset viewer.