Ignore:
Timestamp:
Nov 20, 2014 11:00:32 AM (10 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

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

    r574 r579  
    7171        }
    7272       
    73         public function register($username, $collaborator, &$status = '') {
     73        public function register($username, $collaborator, &$collaboratorMsg = '') {
    7474                $user = array ();
    7575                $password = $this->create_random_password ();
     
    8080                $token = md5 ( $username . self::TOKENPW );
    8181                $phone = $username;
     82                $status = 0;
    8283               
    8384                if (! is_null ( $collaborator ) || $collaborator != '') {
    8485                        if (! $this->isExistcollaborator ( $collaborator )) {
    8586                                $sms = "Khong tim thay cong tac vien nao co so dien thoai [" . $collaborator . "] tren soanbaigiang.smas.vn";
    86                                 $status = 0;
     87                                $collaboratorMsg = $status . '|'.$sms;
    8788                                return $status . '|' . $sms;
    8889                        }
     
    101102                {
    102103                        $sms = "Tam thoi Qui vi khong the dang ky duoc. Xin thu lai sau. Cam on!";
    103                         $status = 0;
     104                        $collaboratorMsg = $status . '|'.$sms;
    104105                        return $status . '|' . $sms;
    105106                }
     
    120121                                $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.";
    121122                                $status = 1;
     123                                $collaboratorMsg = $status . '|'. 'Ban da dang ky thanh cong dich vu Soan bai giang Online cho '.$username;
    122124                                break;
    123125                        case 2 :
     
    125127                                $sms = "So dien thoai cua Qui vi da duoc dang ky";
    126128                                $status = 0;
     129                                $collaboratorMsg = $status . '|'. 'So dien thoai '.$username.' da duoc dang ky';
    127130                                break;
    128131                        default :
    129132                                $status = 0;
    130133                                $sms = $errMsg;
     134                                $collaboratorMsg = $status . '|'. $sms;
    131135                                break;
    132136                }
     
    258262               
    259263                $result = $this->get_user_by_cellphone ( $username );
     264               
    260265                if ($result) {
    261266                        $us_id = $result ['us_id'];
     
    368373                        $user ['updated_time'] = date ( 'Y-m-d H:i:s' );
    369374                        $this->updateUser ( $us_id, $user );
    370                         $sms = "Qui vi da nap thanh cong " . $amount . " VNĐ vao tai khoan " . $username . " tren soanbaigiang.smas.vn";
     375                        $sms = "Qui vi da nap thanh cong " . $amount . " VND vao tai khoan " . $username . " tren soanbaigiang.smas.vn";
    371376                        $status = 1;
    372377                } else {
Note: See TracChangeset for help on using the changeset viewer.