- Timestamp:
- Jan 15, 2015 12:08:25 PM (10 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/services/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php
r636 r695 41 41 $chargErrMsg = lang('_SBG_CHARGING_FROM_CARD_FAIL_MSG'); 42 42 $errMsg = ''; 43 43 $cardValue = 0; 44 44 if ($isLocked == 0) { 45 45 $aryParams = array( … … 50 50 51 51 $aryResult = array(); 52 //$aryResult['TransactionAmount'] = 10000; 52 53 $chargCard = $this->services_model->cardPaidProcess($aryParams, $aryResult); 53 54 //$chargCard = _SBG_CARD_PAY_SUCCESS; 55 $status = $chargCard; 54 56 $paidType = 2; 55 57 $amount = $aryResult['TransactionAmount']; 58 $cardValue = $amount; 56 59 $paidTime = date('Y-m-d H:i:s'); 57 60 $user['acc_balanced'] = $user['acc_balanced'] + $amount; 58 61 $user['updated_time'] = date('Y-m-d H:i:s'); 59 if ($amount>0){ 60 $this->objUserModel->updateUser($userID, $user); 62 if ($amount > 0){ 63 $updateData = array('acc_balanced' => $user['acc_balanced'], 'updated_time' => $user['updated_time'] ); 64 $updated = $this->objUserModel->updateUser($userID, $updateData); 61 65 } 62 66 … … 74 78 else { 75 79 $isLocked = createLockFile($lockFilePreFix, $maxReach, $timeToUnlock, $lockFilePath, FALSE); 76 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg; 80 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg; 81 $status = 0; 77 82 } 78 83 }else if ($isLocked == 1) { 79 84 $errMsg = $lockedMsg; 80 85 $result['success'] = _SBG_CARD_PAY_FAIL; 86 $status = -1; 81 87 } 88 89 $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $user['updated_time']); 82 90 91 $result['us_id'] = $userID; 92 $result['UPDATED_DATA'] = $user; 83 93 $result['errMsg'] = $errMsg; 84 94 echo json_encode($result); -
pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php
r689 r695 215 215 { 216 216 error_reporting(E_ALL); 217 217 218 $this->load->model('Services_model'); 218 219 … … 221 222 // get total page 222 223 $totalpage = 1; 224 223 225 $default = $this->Services_model->getCollaborator(2,1,1); 226 227 $data = mb_convert_encoding($default, 'UTF-8'); 228 224 229 if($default){ 225 $xml = simplexml_load_string($d efault);230 $xml = simplexml_load_string($data); 226 231 $xml->registerXPathNamespace("S", "http://schemas.xmlsoap.org/soap/envelope/"); 227 232 $xml = $xml->xpath('//S:Body')[0]; … … 230 235 } 231 236 232 $result = $this->Services_model->getCollaborator(2,1,$totalpage); 237 var_dump($totalpage); 238 239 /*$result = $this->Services_model->getCollaborator(2,1,$totalpage); 233 240 if ($result){ 234 241 $xml = simplexml_load_string($result); … … 258 265 $logMsg = date('Y-m-d H:i:s') . " Result is null \n"; 259 266 write_file('./log/sync_collaborator.log', $logMsg, FOPEN_WRITE_CREATE); 260 } 267 }*/ 261 268 } 262 269 } 270 271 function fix_latin1_mangled_with_utf8_maybe_hopefully_most_of_the_time($str) 272 { 273 return preg_replace_callback('#[\\xA1-\\xFF](?![\\x80-\\xBF]{2,})#', 'utf8_encode_callback', $str); 274 } 275 276 function utf8_encode_callback($m) 277 { 278 return utf8_encode($m[0]); 279 }
Note: See TracChangeset
for help on using the changeset viewer.