protected void btnSubmit_Click(object sender, EventArgs e)
        {
            bool email    = reg.Email_Avaiable(txtEmail.Text);
            bool username = reg.UserName_Avaiable(txtUserName.Text);
            bool mobile   = reg.Mobile_Avaiable(txtMobileCode.Text + txtMobileNumber.Text);

            lblUserNameAvaility.Text = reg.UserNameIcon;
            lblEmailAvaiable.Text    = reg.EmailIcon;
            lblMobileVerify.Text     = reg.MobileIcon;
            lblPassword.Text         = reg.PasswordStrongMessege(txtPassword.Text);
            if (email && username && mobile)
            {
                reg.Input_Email     = txtEmail.Text;
                reg.Input_FirstName = txtFirstName.Text;
                reg.Input_Mobile    = txtMobileCode.Text + txtMobileNumber.Text;
                reg.Input_Packege   = "free";
                reg.Input_Password  = txtPassword.Text;
                reg.Input_SureName  = txtSureName.Text;
                reg.Input_UserName  = txtUserName.Text;
                if (reg.Reg())
                {
                    Cookies cookies = new Cookies();
                    _Cookies = cookies.Add(reg.LoginID, reg.RegID, Request.UserAgent.ToString());

                    foreach (HttpCookie httpCookie in _Cookies)
                    {
                        Response.Cookies.Add(httpCookie);
                    }
                    int i = 0;
                    foreach (string Name in cookies.CookiesName)
                    {
                        Session[Name] = cookies.CookiesValueEncrypt[i]; i++;
                    }
                    //lblResult.Text += "1="+ reg.Message;

                    Notification notification = new Notification();
                    notification.AddNotification("Verify your Email Address.", "../EmailVerify", IconDataFeather.mail, reg.Offset, reg.RegID);

                    //lblResult.Text += "2="+reg.RegID+"/ " + notification.ErrorMessage;

                    EMAIL mAIL = new EMAIL();
                    mAIL.Subject = "Email Confirmation";
                    mAIL.Messege = "please verify your email. please click http://" + Request.Url.AbsoluteUri.ToString().Replace("create_account", "EmailVerify") + "?=" + reg.EmailCode + "&rid=" + reg.RegID;
                    mAIL.Email   = txtEmail.Text;
                    //mAIL.Mail();



                    Response.Redirect("~/CMS/");
                }
                else
                {
                    lblResult.Text = reg.Message;
                }
            }
        }
Exemple #2
0
 protected void txtUserName_TextChanged(object sender, EventArgs e)
 {
     if (reg.UserName_Avaiable(txtUserName.Text))
     {
         lblUserNameAvaility.Text = reg.UserNameIcon;
     }
     else
     {
         lblUserNameAvaility.Text = reg.UserNameIcon;
     }
 }