Admin/index.aspx.cs
(完整代码) 1KBusing System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class user_index : System.Web.UI.Page
{
protected DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string vstr, userName, userPass, userPassmd5;
userName = PageValidate.GetSafeStr(this.txtUserName.Text.Trim());
userPass = PageValidate.GetSafeStr(this.txtUserPass.Text.Trim());
userPassmd5 = MD5.Hash(userPass);
vstr = PageValidate.GetSafeStr(this.TextBox3.Text);
if (vstr.CompareTo(Session["Vnumber"].ToString()) != 0)
{
MessageBox.Show(this, "您输入的验证码不正确,请重新输入!");
return;
}
ds = DB.select("select * from [user] where [username]='" + userName + "' and [userpass]='" + userPassmd5 + "'", "user");
if (ds.Tables["user"].Rows.Count > 0)
{
Session["userName"] = ds.Tables["user"].Rows[0]["username"].ToString();
Response.Redirect("welcome.htm");
}
else
{
MessageBox.Show(this, "用户名或者密码错误,请重新输入!");
this.txtUserName.Text = "";
this.txtUserPass.Text = "";
this.TextBox3.Text = "";
MessageBox.SetFocus(this.txtUserName, this.Page);
return;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。