Web/login.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using 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 login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLogin_Click(object sender, ImageClickEventArgs e)
{
string err="";
//判断输入
if (txtUsername.Value == "")
{
err += "用户名不能为空!";
}
if (txtPass.Value == "")
{
err += "密码不能为空!";
}
//验证输入,如果不合法就弹出相应提示,并返回
if (err != "")
{
lblMsg.Text=err;
return;
}
DataSet ds = null;
if(DropDownList1.SelectedValue=="管理员")
{
BS.BLL.admin bll = new BS.BLL.admin();
ds = bll.GetList(" lname='" + txtUsername.Value + "' and pwd='" + txtPass.Value + "' and (flag='管理员' or flag='超级管理员') ");
}
else if (DropDownList1.SelectedValue == "操作员")
{
BS.BLL.admin bll = new BS.BLL.admin();
ds = bll.GetList(" lname='" + txtUsername.Value + "' and pwd='" + txtPass.Value + "' and (flag='操作员') ");
}
else if (DropDownList1.SelectedValue == "读者")
{
BS.BLL.users bll = new BS.BLL.users();
ds = bll.GetList(" uno='" + txtUsername.Value + "' and pwd='" + txtPass.Value + "'");
}
//判断用户是否存在
if (ds.Tables[0].Rows.Count > 0)
{
DataRow dr = ds.Tables[0].Rows[0];
后面还有 25 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。