Ejemplo n.º 1
0
 public function RegisterProcess()
 {
     //lay gia tri
     //luc nay chi can lay 1 mat khau, vi js da xac thuc 2 mat khau giong nhau
     $userID = $_REQUEST['user_id'];
     $userPwd = md5($_REQUEST['user_pass']);
     $userSvorgv = $_REQUEST['user_svgv'];
     //de tranh viec ten dang nhap trung nhau, truoc khi them vao ta se kiem tra coi ten user da co chua
     if ($this->CheckId($userID)) {
         //neu chua co nguoi nao su dung ten dang nhap nay, cho phep dang ki
         //o day tam bo qua email di
         $this->AddNewUser($userID, $userPwd, $userSvorgv);
         $out = new HtmlOutput();
         $out->UserRegisterSucess();
         exit;
     } else {
         //da ton tai ten dang nhap, bao loi~ va yeu cau dang ki voi ten khac
         $out = new HtmlOutput();
         $out->UserRegisterFalseID();
         exit;
     }
     return;
 }