Changeset 716
- Timestamp:
- Jan 29, 2015 4:58:53 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
r707 r716 337 337 $data = $this->user_model->update_user($src, $token, $user, $us_id); 338 338 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) { 340 341 case 0: 341 342 $result['success'] = 1; -
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r707 r716 404 404 public function isExistcollaborator($collaborator) { 405 405 $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 ); 407 408 $result = $this->db->get ()->row_array (); 408 409 if ($result) -
pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
r714 r716 298 298 <div class="alert alert-block alert-success"> 299 299 <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 <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>) 301 301 </p> 302 302 </div> -
pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php
r630 r716 35 35 function messageReceiver(){ 36 36 $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'); 37 40 list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $info, $receiveTime) = $aryArgs; 38 41 … … 56 59 $CI->load->model('frontend/User_model', 'objUserModel'); 57 60 $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'); 58 62 $CI->objUserModel->insertSmslog($receiverID, $serviceID, $commandCode, $info, $receiveTime); 59 63 60 64 $aryResult = explode ('|', $result); 61 65 return $aryResult[0].'|'.$msgType.'|'.$aryResult[1]; -
pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php
r711 r716 25 25 if ( ! defined('_SBG_CHARGING_GENERAL_ERROR')) define('_SBG_CHARGING_GENERAL_ERROR', 440); 26 26 if ( ! defined('_SBG_CHARGING_NUMBER_NOT_REGISTED')) define('_SBG_CHARGING_NUMBER_NOT_REGISTED', 501); 27 if ( ! defined('_SBG_CHARGING_MAX_VALUE')) define('_SBG_CHARGING_MAX_VALUE', 50000); 28 27 29 28 30 if ( ! defined('_SBG_SEND_MT_FAIL')) define('_SBG_SEND_MT_FAIL', -1); … … 36 38 if ( ! defined('_SBG_MO_PROCCESS_ERR')) define('_SBG_MO_PROCCESS_ERR', 0); 37 39 38 if ( ! defined('_SBG_GET_COLLABORATOR_FAIL')) 40 if ( ! defined('_SBG_GET_COLLABORATOR_FAIL')) define('_SBG_GET_COLLABORATOR_FAIL', -1); 39 41 40 42 Class Services_model extends CI_Model … … 170 172 171 173 $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 } 173 181 174 182 if ($result == _SBG_CHARGING_SUCCESS) { 183 $amount = $packageData ['p_price']; 175 184 $this->objUserModel->rechargeAccount($sentNumber, $amount); 176 185 $smsReturn = $this->objUserModel->registerVip($sentNumber, $p_code, $packageData); 177 178 186 $paidTime = date('Y-m-d H:i:s'); 179 187 $this->objUserModel->insertPaidlog($sentNumber, $sentNumber, _SBG_PAIDTYPE_SMS, $amount, $paidTime); … … 187 195 case _SBG_MO_PAY_TO_ACCOUNT: 188 196 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'); 190 198 $userName = isset($aryContents[1]) ? $this->formatPhoneNumber($aryContents[1]) : $sentNumber; 191 192 199 if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR && !preg_match('/^(09\d{8}|01\d{9})$/', $userName)) { 193 200 $smsReturn = _SBG_MO_PROCCESS_ERR.'|'.lang('_SBG_MO_PHONENUM_WRONG_FORMAT_MSG'); -
pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php
r707 r716 122 122 <a href="<?php echo $base_url; ?>admin/reportprovince"> 123 123 <i class="icon-double-angle-right"></i> 124 Báo cáo thuê bao theo tá»nh124 Thuê bao theo tá»nh 125 125 </a> 126 126 </li> … … 128 128 <a href="<?php echo $base_url; ?>admin/reportpackage"> 129 129 <i class="icon-double-angle-right"></i> 130 Báo cáo doanh thu theo tá»nh130 Doanh thu theo tá»nh 131 131 </a> 132 132 </li> -
pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js
r662 r716 127 127 } 128 128 129 function DoCloseLecture () { 130 g_Flash.SetVariable("command", "Quit App"); 131 } 132 129 133 // Handle all the FSCommand messages in a Flash movie. 130 134 function LectorEditorOnline_DoFSCommand(command, args) { … … 170 174 InitViolet(); 171 175 //$('#open-lecture').click(function(e){DoOpenLecture('http://sbgapi.violet.vn/space/file/id/7');}); 176 var inFormOrLink = false; 172 177 178 /*$( window ).bind('beforeunload',function(e) { 179 console.log('unload'); 180 e.preventDefault(); 181 });*/ 173 182 })
Note: See TracChangeset
for help on using the changeset viewer.