Backup/DTcms.Web/admin/login.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;
namespace DTcms.Web.admin
{
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
txtUserName.Text = Utils.GetCookie("DTRememberName");
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
string userName = txtUserName.Text.Trim();
string userPwd = txtUserPwd.Text.Trim();
string code = txtCode.Text.Trim();
if (userName.Equals("") || userPwd.Equals(""))
{
lblTip.Visible = true;
lblTip.Text = "请输入用户名或密码";
return;
}
if (code.Equals(""))
{
lblTip.Visible = true;
lblTip.Text = "请输入验证码";
return;
}
if (Session[DTKeys.SESSION_CODE] == null)
{
lblTip.Visible = true;
lblTip.Text = "系统找不到验证码";
return;
}
if (code.ToLower() != Session[DTKeys.SESSION_CODE].ToString().ToLower())
{
lblTip.Visible = true;
lblTip.Text = "验证码输入不正确";
return;
}
BLL.manager bll = new BLL.manager();
Model.manager model = bll.GetModel(userName, DESEncrypt.Encrypt(userPwd));
if (model == null)
{
lblTip.Visible = true;
lblTip.Text = "用户名或密码有误";
return;
}
Session[DTKeys.SESSION_ADMIN_INFO] = model;
Session.Timeout = 45;
//写入登录日志
后面还有 28 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
