CreateProject/Registe.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Net.Mail;
using System.Net;
using CreateCommon;
using System.Text.RegularExpressions;
namespace CreateProject
{
    public partial class Registe : System.Web.UI.Page
    {
        //定义对象实例化
        CreateBll.UserListBll bll = new CreateBll.UserListBll();
        CreateModel.UserListModel model = new CreateModel.UserListModel();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

            }
        }


        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            //注册准备数据
            model.userName = this.GetRequestStr("txtName", false);
            model.userPwd = Security.Encode(this.GetRequestStr("txtPassword"));
            model.userMail = this.GetRequestStr("txtUserEmail");
            string code = this.GetRequestStr("txtCode");
            string activecode = Guid.NewGuid().ToString().Substring(0, 8);//生成激活码 
            model.activeCode = activecode.getSHASplit();  //随机码Guid加密

            bool boo = new Regex(@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$").Match(model.userMail).Success;
            if (!boo && model.userMail != "")
            {
                lbinfo.Text = "邮箱格式不正确";
                return;
            }

            if (code.ToLower() != Session["code"].ToStr().ToLower())
            {
                lbinfo.Text = "验证码输入不正确";
                return;
            }
            //注册成功之前进行判断该用户是否被注册过
            int line = bll.Exists(model.userName, "", "isreg", model.userMail);
            if (line == -1)
            {
                lbinfo.Text = "该用户已被注册!";
                return;
            }
            //注册是否成功
            if (bll.Insert(model) > 0)
            {
后面还有 55 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。