CreateProject/Login.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CreateCommon;

namespace CreateProject
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            string userName = this.GetRequestStr("txtUserName", false);
            string userPwd = this.GetRequestStr("txtUserPwd");

            if (userName == "" || userPwd == "")
            {
                sp_err.InnerHtml = "用户名或验证码不能为空";
                return;
            }

            CreateBll.UserListBll bll = new CreateBll.UserListBll();
            int line = bll.Exists(userName, Security.Encode(userPwd), "islogin", ""); //密码解
            if (line > 0)
            {
                Session["userName"] = userName;
                //更新最后一次登录时间
                TSQLServer.ExecuteNonQuery("update [UserList] set lastLoginTime = @1 where (userName=@2 or userMail=@2)",
                  DateTime.Now, userName);
                Response.Redirect("Index.aspx");

            }
            else if (line == -1)
            {
                sp_err.InnerHtml = "账号没有激活,请点击邮件进行激活账号";
            }
            else
            {
                sp_err.InnerHtml = "用户名或密码有误";
            }

        }
    }
}

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

AI 解读 AI

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

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