DTcms.Web.UI/DTcms.Web.UI.Page/usercenter.cs
(完整代码) 1KBusing DTcms.BLL;
using DTcms.Common;
using System;
using System.Data;
using System.Web;
namespace DTcms.Web.UI.Page
{
public class usercenter : UserPage
{
protected string action = string.Empty;
protected string curr_login_ip = string.Empty;
protected string pre_login_ip = string.Empty;
protected string pre_login_time = string.Empty;
protected int total_order;
protected int total_msg;
protected override void InitPage()
{
this.action = DTRequest.GetQueryString("action");
DataTable dt = new user_login_log().GetList(2, "user_name='" + this.userModel.user_name + "'", "id desc").Tables[0];
if (dt.Rows.Count == 2)
{
this.curr_login_ip = dt.Rows[0]["login_ip"].ToString();
this.pre_login_ip = dt.Rows[1]["login_ip"].ToString();
this.pre_login_time = dt.Rows[1]["login_time"].ToString();
}
else if (dt.Rows.Count == 1)
{
this.curr_login_ip = dt.Rows[0]["login_ip"].ToString();
}
this.total_order = new orders().GetCount("user_name='" + this.userModel.user_name + "' and status<3");
this.total_msg = new user_message().GetCount("accept_user_name='" + this.userModel.user_name + "' and is_read=0");
if (this.action == "exit")
{
HttpContext.Current.Session["dt_session_user_info"] = null;
Utils.WriteCookie("dt_cookie_user_name_remember", "DTcms", -43200);
Utils.WriteCookie("dt_cookie_user_pwd_remember", "DTcms", -43200);
Utils.WriteCookie("UserName", "DTcms", -1);
Utils.WriteCookie("Password", "DTcms", -1);
HttpContext.Current.Response.Redirect(base.linkurl("login", new object[0]));
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。