admin/login.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
namespace 仓库管理系统.admin
{
public partial class login : System.Web.UI.Page
{
SQLHelper db = new SQLHelper();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string login_type = this.rbt_type.SelectedValue.ToString();
//
if (this.txt_admin.Text == "" || this.txt_password.Text == "")
{
Response.Write("<script language=javascript>alert('请填写帐号和密码!');location='javascript:history.go(-1)'</script>");
}
if(login_type=="管理员")
{
string sql = "select * from web_admin where adminuser='" + this.txt_admin.Text + "' and password='" + this.txt_password.Text + "'";
DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
int count = dt.Rows.Count;
if (count == 0)
{
Response.Write("<script language=javascript>alert('帐号密码不正确!');</script>");
}
else
{
Session["admin"] = "admin";
Response.Redirect("index.aspx");
}
}
//
if (login_type == "仓库管理员")
{
string sql = "select * from depot where zh='" + this.txt_admin.Text + "' and mima='" + this.txt_password.Text + "'";
DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
int count = dt.Rows.Count;
if (count == 0)
{
Response.Write("<script language=javascript>alert('帐号密码不正确!');</script>");
}
else
{
Session["name"] =dt.Rows[0]["name"].ToString();
Response.Redirect("ck_index.aspx");
}
}
//
}
}
后面还有 1 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
