- Timestamp:
- Nov 11, 2014 11:21:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r469 r472 14 14 function checkLogin ($src, $token, $username, $password) 15 15 { 16 $data = $this->vservices->actionExecute('login', array('src' => $src, 'token' => $token, 'username' => $username, 'password' => $password), 'user'); 16 $data = $this->vservices->actionExecute('login', array('src' => $src, 'token' => $token, 'username' => $username, 'password' => $password), 'user'); 17 17 18 $arr_users = explode("&", $data); 18 $str_status = "";19 $str_fullname = "";20 $str_usid = "";21 $usid = "";22 $fullname = "";23 for ($i=0; $i <count($arr_users); $i++)19 $str_status = ''; 20 $str_fullname = ''; 21 $str_usid = ''; 22 $usid = ''; 23 $fullname = ''; 24 for ($i=0; $i < count($arr_users); $i++) 24 25 { 25 26 if (strpos($arr_users[$i], 'status=') !== false) … … 39 40 } 40 41 $arr_status = explode("=", $str_status); 41 if ($str_fullname != "")42 if ($str_fullname != '') 42 43 { 43 44 $arr_fullname = explode("=", $str_fullname); 44 45 $fullname = $arr_fullname[1]; 45 46 } 46 if ($str_usid !== "")47 if ($str_usid !== '') 47 48 { 48 49 $arr_usid = explode("=", $str_usid); … … 50 51 } 51 52 $status = (int)$arr_status[1]; 52 if ($status == 0 || $status = 4){ 53 54 if ($status == 0 || $status == 4){ 53 55 $us_id = (int)$usid; 54 56 $query = "SELECT * FROM tbluser WHERE us_id = ?"; … … 83 85 $errMsg = ''; 84 86 parse_str($data); 85 $sms = "";87 $sms = ''; 86 88 87 89 switch((int)$status) … … 166 168 $us_id = 0; 167 169 $errMsg = ''; 168 $sms = "";170 $sms = ''; 169 171 $this->db->select('*')->from('tbluser')->where('cellphone', $receiverID); 170 172 $query = $this->db->get(); … … 218 220 $us_id = 0; 219 221 $errMsg = ''; 220 $sms = "";222 $sms = ''; 221 223 $flag = false; 222 224 $pass = $password; 223 if (is_null($password) || $password = "")225 if (is_null($password) || $password == '') 224 226 { 225 227 $pass = $this->create_random_password(); … … 271 273 } 272 274 275 276 function checkLicense ($userId) 277 { 278 $isNotExpired = false; 279 $userInfo = $this->get_user_by_id($userId); 280 $expireDate = $userInfo['expire_date']; 281 282 if ((trim($expireDate) == '')) return $isNotExpired; 283 284 $today = mktime(); 285 $expireTime = strtotime($expireDate.' 23:59:59'); 286 $isNotExpired = ($today < $expireTime); 287 return $isNotExpired; 288 } 289 273 290 function insert_smslog($sentNumber, $userID, $serviceID, $commandcode, $info, $receiveTime) 274 291 {
Note: See TracChangeset
for help on using the changeset viewer.