49 lines
2.0 KiB
C#
49 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using ZWL.DBUtility;
|
|
|
|
public partial class Main_online2 : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
return;
|
|
|
|
ZWL.Common.PublicMethod.CheckSession();
|
|
|
|
string currentIP = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
|
|
string username = ZWL.Common.PublicMethod.GetSessionValue("UserName");
|
|
string logindate = ZWL.Common.PublicMethod.GetSessionValue("LoginDate");
|
|
|
|
//string ip = DbHelperSQL.GetSHSL("select top 1 IpStr from ERPRiZhi where DoSomething='用户登陆系统' and username ='" + username + "' order by TimeStr desc");
|
|
string logindate2 = DbHelperSQL.GetSHSL("select top 1 TimeStr2 from ERPRiZhi where DoSomething='用户登陆系统' and username ='" + username + "' order by TimeStr desc");
|
|
if (logindate2 == "")
|
|
{
|
|
Response.Write("1");
|
|
Response.End();
|
|
}
|
|
|
|
if (logindate != Convert.ToDateTime(logindate2).ToString("yyyy-MM-dd HH:mm:ss"))
|
|
{
|
|
System.Web.HttpContext.Current.Session["UserID"] = null;
|
|
System.Web.HttpContext.Current.Session["UserName"] = null;
|
|
System.Web.HttpContext.Current.Session["Password"] = null;
|
|
System.Web.HttpContext.Current.Session["JiaoSe"] = null;
|
|
System.Web.HttpContext.Current.Session["Department"] = null;
|
|
System.Web.HttpContext.Current.Session["TrueName"] = null;
|
|
System.Web.HttpContext.Current.Session["ZhiWei"] = null;
|
|
System.Web.HttpContext.Current.Session["guid"] = null;
|
|
System.Web.HttpContext.Current.Session["QuanXian"] = null;
|
|
System.Web.HttpContext.Current.Session["LoginDate"] = null;
|
|
Response.Write("0");
|
|
}
|
|
else
|
|
{
|
|
Response.Write("1");
|
|
}
|
|
Response.End();
|
|
}
|
|
} |