Ignore:
Timestamp:
Nov 13, 2014 9:10:19 PM (11 years ago)
Author:
namnd
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r497 r498  
    108108                        else
    109109                        {
    110                                 $sms = "So dien thoai cua Qui vi chua la cong tac vien cua soanbaigiang.smas.vn!";
     110                                $sms = "Khong tim thay cong tac vien nao co so dien thoai [".$collaborator."] tren soanbaigiang.smas.vn!";
    111111                                $status = 0;
    112112                        }
     
    118118                        {
    119119                                case 0:
    120                                         $col['login_name'] = $username;
    121                                         $col['passwd'] = md5($password);
    122                                         $col['cellphone'] = $username;
    123                                         $col['created_time'] = date('Y-m-d H:i:s');
    124                                         $col['activated'] = 1;
    125                                         $this->db->insert('tblcollaborator', $col);
    126120                                        $us_id = $id;
    127121                                        $user['created_time'] = date('Y-m-d H:i:s');
    128122                                        $user['us_id'] = $us_id;
    129123                                        $user['cellphone'] = $username;
    130                                         $user['collaborator'] = $username;
    131124                                        $this->db->insert('tbluser', $user);
    132125                                        $sms = "Chuc mung Qui vi da dang ky thanh cong tai khoan Soan Bai giang Online. Hay dang nhap vao soanbaigiang.smas.vn voi ten truy nhap ".$username.", mat khau ".$password." de su dung.";
     
    203196                        {
    204197                                case 0:
    205                                         if ($this->get_collaborator_by_login_name($username)){
    206                                                 $col['login_name'] = $sentNumber;
    207                                                 $col['cellphone'] = $sentNumber;
    208                                                 $col['updated_time'] = date('Y-m-d H:i:s');
    209                                                 $this->updateCollaborator($col);
    210                                         }
    211198                                        $us_id = $id;
    212199                                        $user['updated_time'] = date('Y-m-d H:i:s');
     
    261248                        {
    262249                                case 0:
    263                                         if ($this->get_collaborator_by_login_name($username)){
    264                                                 $col['passwd'] = $pass;
    265                                                 $this->updateCollaborator($col);
    266                                         }
    267250                                        $us_id = $id;
    268251                                        $user['updated_time'] = date('Y-m-d H:i:s');
     
    372355        }
    373356       
    374         function get_collaborator_by_login_name($collaborator)
    375         {
    376                 $this->db->select('*')->from('tblcollaborator')->where('login_name', $collaborator)->limit(1);
    377                 $result = $this->db->get()->row_array();
    378                 return $result;
    379        
    380         }
    381        
    382357        function isExistcollaborator($collaborator)
    383358        {
     
    391366                $this->db->where('us_id', $us_id);
    392367                $this->db->update('tbluser', $data);
    393         }
    394        
    395         function updateCollaborator($us_id, $data)
    396         {
    397                 $this->db->where('id', $us_id);
    398                 $this->db->update('tblcollaborator', $data);
    399368        }
    400369       
Note: See TracChangeset for help on using the changeset viewer.