Web8/Admin/login.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Tc.Web.Admin
{
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
#if DEBUG
txt_name.Text = "admin";
txt_pwd.Text = "coseo";
Button1_Click(sender, e);
#endif
}
}
// 下载于www.51aspx.com
protected void Button1_Click(object sender, EventArgs e)
{
string name = this.txt_name.Text.Replace("'", "").FilterSql();
string pwd = DEncrypt.Encrypt(this.txt_pwd.Text.FilterSql());
if (name.Length > 0 && pwd.Length > 0)
{
Tc.BLL.TcAdmin ao = new Tc.BLL.TcAdmin();
List<Tc.Model.TcAdmin> t = ao.GetModelList("loginName='" + name + "'");
if (t.Count <= 0)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "login", "alert('用户名或密码错误!请重新尝试!')", true);
}
else
{
if (t[0].Isdel == true)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "login", "alert('用户名已经禁用了!请联系管理员')", true);
}
else
{
if (t[0].Pwd.GetString().ToLower() == pwd.ToLower())
{
Session[LibAdmin.Session_admin] = t[0];
Random r = new Random();
string s = DateTime.Now.ToLongTimeString() + r.Next(1000000);
FormsAuthentication.SetAuthCookie(name, false);
Response.Redirect("main.aspx");
}
else
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "login", "alert('用户名或密码错误!请重新尝试')", true);
}
}
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。