Esempio n. 1
0
File: register.cs Progetto: Hcq/Rain
 protected override void ShowPage()
 {
     this.action   = DTRequest.GetQueryString("action");
     this.username = DTRequest.GetQueryString("username");
     this.username = Utils.DropHTML(this.username);
     if (this.action == "" && this.uconfig.regstatus == 0)
     {
         HttpContext.Current.Response.Redirect(this.linkurl(nameof(register), (object)"?action=close"));
     }
     else
     {
         if (!(this.action == "checkmail"))
         {
             return;
         }
         string               queryString = DTRequest.GetQueryString("code");
         Rain.BLL.user_code   userCode    = new Rain.BLL.user_code();
         Rain.Model.user_code model       = userCode.GetModel(queryString);
         if (model == null)
         {
             HttpContext.Current.Response.Redirect(this.linkurl(nameof(register), (object)"?action=checkerror"));
         }
         else
         {
             model.status = 1;
             userCode.Update(model);
             new Rain.BLL.users().UpdateField(model.user_id, "status=0");
         }
     }
 }
Esempio n. 2
0
 protected override void ShowPage()
 {
     this.action = DTRequest.GetQueryString("action");
     if (this.action == "mobile")
     {
         this.username = DTRequest.GetQueryString("username");
     }
     else
     {
         if (!(this.action == "email"))
         {
             return;
         }
         this.code = DTRequest.GetQueryString("code");
         Rain.Model.user_code model = new Rain.BLL.user_code().GetModel(this.code);
         if (model == null)
         {
             HttpContext.Current.Response.Redirect(this.linkurl(nameof(repassword), (object)"?action=error"));
         }
         else
         {
             this.username = model.user_name;
         }
     }
 }