protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType == "POST") { string sType = CYRequest.GetString("Type"); if (sType == "login") { //用户登陆 string sUserName = CYRequest.GetString("account"); string pwd = CYRequest.GetString("pwdone"); gameval(sUserName, pwd); } } else { if (LoginSessionVal() || isLoginCookie()) { DateTime dtLoginTime = GetLoginTime(); int iUserID = UserBll.UserIDSel(GetAccount()); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); sMsg = "<script>alert('密码已改,请重新登陆!')</script>"; return; } else { Server.Transfer("sqserver.aspx", false); } } } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { string sGameAbbre = CYRequest.GetString("gn"); if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre))) { Response.Write("<script>alert('即将开服,敬请期待!');location.href='jycl.aspx';</script>"); return; } int iUserID = GetUserID(); DateTime dtLoginTime = GetLoginTime(); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); string sJs = "<script>alert('密码已改,请重新登陆!');location.href='jyc.html';</script>"; Response.Write(sJs); return; } string sClient = "pc"; string sUrl = jyGame.Login(iUserID.ToString(), sGameAbbre, sClient); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sUrl); } Response.Redirect(sUrl, true); return; } else { Server.Transfer("jycl.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { DateTime dtLoginTime = GetLoginTime(); int iUserID = UserBll.UserIDSel(GetAccount()); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { sAccount = string.Empty; ClearUsersInfo(); sMsg = "<script>alert('密码已改,请重新登陆!')</script>"; return; } else { sAccount = GetAccount(); } } else { Server.Transfer("sq2cl.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { if (!(LoginSessionVal() || isLoginCookie())) { Response.Redirect(string.Format("{0}/Default.aspx", sRootUrl), true); return; } else { int iUserID = GetUserID(); DateTime dtLoginTime = GetLoginTime(); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); Response.Redirect(string.Format("{0}/Default.aspx", sRootUrl), true); return; } } iPoints = GetUPoints(); sAccount = GetAccount(); if (Request.HttpMethod == "POST") { int iUserID = GetUserID(); string sPassWord = CYRequest.GetFormString("passwordtwo"); string sAccountC = UserBll.AccountSel(iUserID).Trim(); string sOPassWord = UserBll.PassWordMD5(sAccountC, CYRequest.GetFormString("bpassword")); int iRes = UserBll.PWDVal(iUserID, sOPassWord); if (iRes > 999) { string sMD5PassWord = UserBll.PassWordMD5(sAccountC, sPassWord); if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { ClearUsersInfo(); sMsg = "<script>alert('修改密码成功!请重新登陆!');location.href='../Default.aspx';</script>"; } else { //更新失败 sMsg = "<script>alert('修改密码失败!');</script>"; } } else { string sMD5PassWordNew = UserBll.PassWordMD5New(sAccountC, CYRequest.GetFormString("bpassword")); iRes = UserBll.PWDVal(iUserID, sMD5PassWordNew); if (iRes > 999) { string sMD5PassWord = UserBll.PassWordMD5(sAccountC, sPassWord); if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { ClearUsersInfo(); sMsg = "<script>alert('修改密码成功!请重新登陆!');location.href='../Default.aspx';</script>"; } else { //更新失败 sMsg = "<script>alert('修改密码失败!');</script>"; } } else { sMsg = "<script>alert('原始密码输入错误!');</script>"; } } } }
protected void Page_Load(object sender, EventArgs e) { string ip = ProvideCommon.GetRealIP(); sGameName = CYRequest.GetString("gn"); if (sGameName == "" || sGameName == "unsafe string") { Response.Redirect(string.Format("{0}/yxzx", sWUrl), false); } else { if (LoginSessionVal() || isLoginCookie()) { int iUserID = GetUserID(); string sUserID = string.Empty; string sAccount = GetAccount(); if (!ValUserState(iUserID, sAccount)) { iUserID = UserBll.UserIDSel(sAccount); if (iUserID < 1000 || (!ValUserState(iUserID, sAccount))) { Response.Write(string.Format("<script>alert('用户名:{2}与数字ID:{3}不一致,请重新登录!谢谢!');location.href='{0}/Default.aspx?gn={1}';</script>", sRootUrl, sGameName, sAccount, iUserID)); ClearUsersInfo(); return; } } else { DateTime dtLoginTime = GetLoginTime(); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); Response.Redirect(string.Format("{0}/Default.aspx", sRootUrl), true); return; } } int iUserPoints = GetUPoints(); if (iUserPoints > 0) { UserPointsBLL.UPointCheck(iUserID); } sUserID = iUserID.ToString(); string sGame = GameInfoBLL.GameInfoAbbreSel(sGameName).TrimEnd(); switch (sGame) { case "sssg": string sSource = string.Empty; string client = string.Empty; if (CYRequest.GetString("client") != "pc") { client = "web"; } else { client = CYRequest.GetString("client"); } sUrl = sssgGame.Login(sUserID, sGameName, sSource, client); if (GameLogin(sGameName)) { GameLoginBLL.GameLoginAdd(iUserID, sGameName, ProvideCommon.GetRealIP(), sUrl); } if (client == "pc") { Response.Redirect(sUrl, true); return; } else { sGameName = string.Empty; } break; case "sxd": sUrl = sxdGame.Login(sUserID, sGameName, ""); iHeight = 635; if (GameLogin(sGameName)) { GameLoginBLL.GameLoginAdd(iUserID, sGameName, ProvideCommon.GetRealIP(), sUrl); } sGameName = string.Empty; break; default: Response.Redirect(string.Format("wan.aspx?gn={0}", sGameName), true); break; } sTitle = ServerBLL.ServerTitleSel(CYRequest.GetString("gn")); if (sTitle.Length > 11) { ssTitle = sTitle.Substring(0, 11); } else { ssTitle = sTitle; } } else { Response.Write(string.Format("<script>alert('用户状态有误或没有登录,请重新登录!谢谢!');location.href='{0}/Default.aspx?gn={1}';</script>", sRootUrl, sGameName)); } } }
protected void Page_Load(object sender, EventArgs e) { //判断是否登陆 sGameName = CYRequest.GetString("gn"); if (sGameName == "" || sGameName == "unsafe string") { Response.Redirect(string.Format("{0}/yxzx", sWUrl), false); } else { if (LoginSessionVal() || isLoginCookie()) { int iUserID = GetUserID(); string sUserID = string.Empty; string sAccount = GetAccount(); if (!ValUserState(iUserID, sAccount)) { iUserID = UserBll.UserIDSel(sAccount); if (iUserID < 1000 || (!ValUserState(iUserID, sAccount))) { sHeight = "100%"; sGame = "lj"; Response.Write(string.Format("<script>alert('用户名:{2}与数字ID:{3}不一致,请重新登录!谢谢!');location.href='{0}/Default.aspx?gn={1}';</script>", sRootUrl, sGameName, sAccount, iUserID)); ClearUsersInfo(); return; } } else { DateTime dtLoginTime = GetLoginTime(); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); Response.Redirect(string.Format("{0}/Default.aspx", sRootUrl), true); return; } } sUserID = iUserID.ToString(); sGame = GameInfoBLL.GameInfoAbbreSel(sGameName).TrimEnd(); switch (sGame) { case "lj": case "yjxy": case "sq": case "hzw": case "xlfc": case "djj": case "zl": case "fswd2": case "txj": case "ljer": case "sjsg": case "tzcq": case "zsg": case "wssg": case "by": case "nz": case "dxz": case "mxqy": case "swjt": case "gcld": case "jdsj": case "tjz": case "khbd": case "sglj": case "hyjft": case "llsg": case "nslm": case "rxzt": case "ftz": case "ahxy": case "mhxy": case "sxj": case "zwj": case "qxz": case "qszg": case "wwsg": case "dntg": case "jy": case "sskc": case "ktpd": case "mhtj": case "dtgzt": case "ahxx": case "jjp": case "sgyjz": case "zwx": string sStartTime = DateTime.Now.ToString(); string sEndTime = ServerBLL.ServerTimeSel(sGameName); if (!ProvideCommon.valTime(sStartTime, sEndTime)) { Response.Redirect(string.Format("{0}/jjkf", sWUrl), true); return; } //else //{ // if(iUserID < 2000) // { // System.Text.StringBuilder sbText = new System.Text.StringBuilder(); // sbText.Append(Server.MapPath("~/Log")); // sbText.Append("/wan"); // string sPath = sbText.ToString(); // ProvideCommon pcObject = new ProvideCommon(); // sbText.Remove(0, sbText.Length); // sbText.AppendFormat("StartTime:{0}", sStartTime); // sbText.AppendFormat(";EndTime:{0}", sEndTime); // pcObject.WriteLogFile(sPath, "log", sbText.ToString()); // } //} sHeight = "100%"; sTitle = ServerBLL.ServerTitleSel(CYRequest.GetString("gn")); sQueryString = string.Format("?gn={0}", sGameName); break; case "mjcs": sHeight = "630px"; sTitle = ServerBLL.ServerTitleSel(CYRequest.GetString("gn")); sQueryString = string.Format("?gn={0}", sGameName); break; case "tssg": sHeight = "640px"; sTitle = ServerBLL.ServerTitleSel(CYRequest.GetString("gn")); string fuid = CYRequest.GetString("fuid"); sQueryString = string.Format("?gn={0}&fuid={1}", sGameName, fuid); break; default: sHeight = "100%"; Response.Redirect(string.Format("{0}/", sWUrl), true); break; } } else { Response.Redirect(string.Format("{0}/Default.aspx?gn={1}", sRootUrl, sGameName)); } } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { if (Request.HttpMethod == "POST") { int iUserID = GetUserID(); DateTime dtLoginTime = GetLoginTime(); string sBackUrL = Request.UrlReferrer.ToString(); string sHost = Request.UrlReferrer.Host; string sGoUrL = string.Format("http://{0}/user.html", sHost); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); string sToUrl = string.Format("http://{0}/usercookie.aspx?type=del&GoUrl={1}", sHost, sGoUrL); Response.Redirect(sToUrl, true); return; } string sPassWord = CYRequest.GetFormString("passwordtwo"); string sAccountC = GetAccount(); string sOPassWord = UserBll.PassWordMD5(sAccountC, CYRequest.GetString("bpassword")); int iRes = UserBll.PWDVal(iUserID, sOPassWord); if (iRes > 999) { string sMD5PassWord = UserBll.PassWordMD5(sAccountC, sPassWord); if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { ClearUsersInfo(); string sToUrl = string.Format("http://{0}/usercookie.aspx?type=del&GoUrl={1}", sHost, sGoUrL); Response.Write(string.Format("<script>alert('修改密码成功!请重新登陆!');location.href='{0}';</script>", sToUrl)); } else { Response.Write(string.Format("<script>alert('修改密码失败!');location.href='{0}';</script>", sBackUrL)); } } else { string sMD5PassWordNew = UserBll.PassWordMD5New(sAccountC, CYRequest.GetFormString("bpassword")); iRes = UserBll.PWDVal(iUserID, sMD5PassWordNew); if (iRes > 999) { string sMD5PassWord = UserBll.PassWordMD5(sAccountC, sPassWord); if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { ClearUsersInfo(); string sToUrl = string.Format("http://{0}/usercookie.aspx?type=del&GoUrl={1}", sHost, sGoUrL); Response.Write(string.Format("<script>alert('修改密码成功!请重新登陆!');location.href='{0}';</script>", sToUrl)); } else { Response.Write(string.Format("<script>alert('修改密码失败!');location.href='{0}';</script>", sBackUrL)); } } else { Response.Write(string.Format("<script>alert('原始密码错误!');location.href='{0}';</script>", sBackUrL)); } } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType == "POST") { string sType = CYRequest.GetString("Type"); if (sType == "login") { //用户登陆 string sUserName = CYRequest.GetString("account"); string pwd = CYRequest.GetString("pwdone"); gameval(sUserName, pwd); if (sAccount == "") { sMsg = "<script>alert('登陆失败,请重试!')</script>"; } } //else if (sType == "reg") //{ // //用户注册 // string sUserName = CYRequest.GetString("accountreg"); // string pwdone = CYRequest.GetString("pwdonereg"); // string pwdtwo = CYRequest.GetString("pwdtwo"); // if (pwdone != pwdtwo) // { // sMsg = "<script>alert('注册失败,密码与确认密码不一致,请正确输入!')</script>"; // return; // } // string sValMessage = UserBll.RegCheck(sUserName, pwdtwo); // if (sValMessage != "") // { // sMsg = sValMessage; // return; // } // int iUID = UserBll.UserReg(sUserName, pwdtwo); // if (-1 == iUID) // { // sMsg = "<script>alert('注册失败,请重试!')</script>"; // return; // } // else if (iUID > 999) // { // string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); // string sR = DiscuzUserI.BBSReg(sAccount, pwdtwo, sKey); // string sPageUrl = Request.Url.ToString(); // LoginStateSet(sUserName, iUID, sPageUrl); // sAccount = sUserName; // return; // } //} } else { if (LoginSessionVal() || isLoginCookie()) { DateTime dtLoginTime = GetLoginTime(); int iUserID = UserBll.UserIDSel(GetAccount()); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { sAccount = string.Empty; ClearUsersInfo(); sMsg = "<script>alert('密码已改,请重新登陆!')</script>"; return; } else { sAccount = GetAccount(); } } } }