Web/login.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Maticsoft.Common;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace Maticsoft.Web
{
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string uname = Request.Form["username"];
string pwd = Request.Form["password"];
string role = this.DropDownList1.SelectedValue;
StringBuilder strSql = new StringBuilder();
strSql.Append("select top 1 id,uname,pwd,name1,tel,address,roles from admins ");
strSql.Append(" where uname=@uname and pwd=@pwd and roles=@roles ");
SqlParameter[] parameters = {
new SqlParameter("@uname", SqlDbType.VarChar,50),
new SqlParameter("@pwd", SqlDbType.VarChar,50),
new SqlParameter("@roles", SqlDbType.VarChar,50)
};
parameters[0].Value = uname;
parameters[1].Value = pwd;
parameters[2].Value = role;
DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
if (ds.Tables[0].Rows.Count > 0)
{
Session["id"] = ds.Tables[0].Rows[0]["id"].ToString();
Session["name"] = ds.Tables[0].Rows[0]["name1"].ToString();
Session["power"] = ds.Tables[0].Rows[0]["roles"].ToString();
Response.Redirect("index.html");
}
else
{
MessageBox.Show(this, "用户名或密码错误,请重新输入!");
}
}
/// <summary>
/// 角色选择
后面还有 13 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。