Changeset 499 for pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php
- Timestamp:
- Nov 14, 2014 6:01:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php
r483 r499 35 35 function messageReceiver(){ 36 36 $aryArgs = func_get_args(); 37 list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $ contentType ,$info, $receiveTime) = $aryArgs;37 list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $info, $receiveTime) = $aryArgs; 38 38 39 39 $msgType = '0'; //text message … … 48 48 if ($username != $mo_username) return '0|0|Username is not corrected!'; 49 49 if ($password != $mo_password) return '0|0|Password is not corrected!'; 50 if (!$requestID) return '0|0|requestID is required!'; 51 if ((int)$requestID != 4) return '0|0|requestID is not corrected!'; 50 if (!$requestID) return '0|0|requestID is required!'; 52 51 if (!$userID) return '0|0|UserID is required!'; 53 52 if (!$serviceID) return '0|0|serviceID is required!'; 54 53 if ($serviceID != '8062') return '0|0|serviceID is not corrected!'; 55 56 $status = 0; 57 $sentNumber = $userID; 58 $username = !$receiverID ? $sentNumber : $receiverID; 59 60 $CI->load->model('frontend/user_model', 'userModel'); 61 $password = $CI->userModel->create_random_password(); 62 63 $result = $CI->userModel->register ($sentNumber, $receiverID, $serviceID, $commandCode, $info, $receiveTime, $status); 54 55 $CI->load->model('Services_model'); 56 $CI->load->model('frontend/User_model', 'objUserModel'); 57 $result = $CI->Services_model->processMORequest($userID, strtoupper($info)); 58 $CI->objUserModel->insertSmslog($receiverID, $serviceID, $commandCode, $info, $receiveTime); 64 59 65 60 $aryResult = explode ('|', $result); 66 67 61 return $aryResult[0].'|'.$msgType.'|'.$aryResult[1]; 68 62 } 69 63 70 64 $this->_server->addFunction('messageReceiver'); 65 71 66 try { 72 67 ob_start();
Note: See TracChangeset
for help on using the changeset viewer.