Changeset 510 for pro-violet-viettel/sourcecode
- Timestamp:
- Nov 14, 2014 5:19:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r502 r510 223 223 { 224 224 $pass = $this->create_random_password(); 225 $ $isForgotPassword = true;225 $isForgotPassword = true; 226 226 } 227 227 $result = $this->get_user_by_cellphone($username); … … 399 399 //$this->db->insert('tblsmslog', $smslog); 400 400 } 401 402 public function insertPaidlog($sentNumber, $receiveID, $paidType, $amount, $paidTime) 403 { 404 if (preg_match('/^(84)([0-9]{9,10})$/', $sentNumber, $aryMatch) == 1) { 405 $sentNumber = '0'. $aryMatch[2]; 406 } 407 408 try { 409 $user = $this->get_user_by_cellphone($sentNumber); 410 } 411 catch(Exception $e) { 412 413 } 414 $paidlog = array(); 415 $paidlog['us_id'] = isset($user['us_id']) ? $user['us_id']:NULL; 416 $paidlog['paidType'] = $paidType; 417 $paidlog['amount'] = $amount; 418 $paidlog['paidTime'] = $paidTime; 419 $this->db->query('UNLOCK TABLES'); 420 $sql = 'INSERT INTO tblpaidlog(us_id, paidType, amount, paidTime) VALUES (?,?,?,?)'; 421 $query = $this->db->query($sql, $paidog); 422 } 401 423 }
Note: See TracChangeset
for help on using the changeset viewer.