WebUI/Web/Ajaxlogin.aspx.cs
(完整代码) 1KBnamespace hyst.Web
{
using DBUtility;
using Model;
using System;
using System.Data;
using System.Web;
using System.Web.UI;
public class Ajaxlogin : Page
{
private BaseClass bc = new BaseClass();
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = PublicMethod.QueryDataset("select * from admininfo where (aUsername='" + base.Request.QueryString["username"] + "' or aNum='" + base.Request.QueryString["username"] + "') and aPwd='" + DESEncrypt.Encrypt(base.Request.QueryString["password"]) + "'").Tables[0];
if (dt.Rows.Count > 0)
{
HttpContext.Current.Session["Webnames"] = dt.Rows[0]["aName"].ToString();
HttpContext.Current.Session["Webusername"] = dt.Rows[0]["aName"].ToString();
HttpContext.Current.Session["Webuserjiao"] = dt.Rows[0]["aRnum"].ToString();
HttpContext.Current.Session["Webshopnum"] = dt.Rows[0]["aSnum"].ToString();
DataTable dtshop = PublicMethod.QueryDataset("select sName from shops where sNum = '" + dt.Rows[0]["aSnum"].ToString() + "'").Tables[0];
if (dtshop.Rows.Count > 0)
{
HttpContext.Current.Session["Webshopname"] = dtshop.Rows[0]["sName"].ToString();
}
base.Response.Write("true");
string strl = " insert into WorkNote(Wn_Person,Wn_Time,Wn_type,wn_dianpu,wn_ip) values ('" + PublicMethod.GetSessionValue("names") + "','" + DateTime.Now.ToString() + "','登录系统','" + PublicMethod.GetSessionValue("shopnum") + "','" + Userinfo.getIPAddress() + "')";
this.bc.execsql(strl);
}
else
{
base.Response.Write("false");
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
