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("1"); return; } int iUserID = GetUserID(); if (iUserID > 999) { string sUserID = iUserID.ToString(); string sGameLoginUrl = string.Format("app://loadgame:{0},{1}|{2}&from_launcher=1", sUserID, sGameAbbre, sjsgGame.Login(sUserID, sGameAbbre)); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sGameLoginUrl); } Response.Write(sGameLoginUrl); } } else { Response.Write("2"); } }
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()) { string sGameAbbre = CYRequest.GetString("gn"); if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre))) { Response.Write("<script>alert('即将开服,敬请期待!');location.href='ahxycl.aspx';</script>"); return; } int iUserID = GetUserID(); if (iUserID > 999) { string sUserID = iUserID.ToString(); string sServerID = sGameAbbre.Replace("ahxy", ""); string sServerName = ServerBLL.ServerNameSelByAbbre(sGameAbbre); string sGameLoginUrl = string.Format("app://loadgame:{0}服-{1}-{2}|{3}&from_launcher=1", sServerID, sServerName, sUserID, ahxyGame.Login(sUserID, sGameAbbre)); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sGameLoginUrl); } Response.Write(string.Format("<script>window.location ='{0}';</script>", sGameLoginUrl)); } } else { Response.Write("<script>alert('用户状态不存在,请登陆!');location.href='ahxycl.aspx';</script>"); return; } }
public string LoginSeverSelAll() { string sReturn = string.Empty; string sLoginServer = GetLoginTop3(); if (sLoginServer.Length > 1) { sReturn = ServerBLL.ServerSelByAbbreAll(sLoginServer); } return(sReturn); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { sGameName = CYRequest.GetString("gn"); sAccountT = GetAccount(); if (sGameName.Length > 0 && sAccountT.IndexOf("?") == 0) { sServerName = ServerBLL.ServerTitleNoSNameSel(sGameName); } else { Response.Redirect("http://www.dao50.com/", 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.Redirect(string.Format("{0}/jjkf", sWUrl), true); return; } int iUserID = GetUserID(); string isLocal = "1"; if (iUserID > 999) { string sGameLoginUrl = lj2Game.Login(iUserID.ToString(), sGameAbbre, isLocal); Response.Redirect(sGameLoginUrl, true); } } else { Server.Transfer("lj2login.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='nzLogin.aspx';</script>"); return; } int iUserID = GetUserID(); string sUrl = nzGame.Login(iUserID.ToString(), sGameAbbre, "pc"); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sUrl); } Response.Redirect(sUrl, false); return; } else { Server.Transfer("nzLogin.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { XmlDocument objXmlDoc = new XmlDocument(); string sXmlPath = string.Format("{0}\\{1}", Server.MapPath("~/Inc"), "rightbottom.xml"); objXmlDoc.Load(sXmlPath); string sFirstUrl = objXmlDoc.SelectSingleNode("/data/firstad").Attributes["url"].Value; string sFirstText = objXmlDoc.SelectSingleNode("/data/firstad").Attributes["text"].Value; string sFirstImg = objXmlDoc.SelectSingleNode("/data/firstad").Attributes["img"].Value; string sSecondUrl = objXmlDoc.SelectSingleNode("/data/secondad").Attributes["url"].Value; string sSecondText = objXmlDoc.SelectSingleNode("/data/secondad").Attributes["text"].Value; string sSecondImg = objXmlDoc.SelectSingleNode("/data/secondad").Attributes["img"].Value; DateTime dtToday = DateTime.Now.Date; DateTime dtTomorow = DateTime.Now.AddDays(1).Date; List <ObjectFour> lofObject = ServerBLL.ServerStartAtTime(dtToday, dtTomorow); StringBuilder sbTop3Server = new StringBuilder(); StringBuilder sbAllSever = new StringBuilder(); int iNumber = 1; foreach (ObjectFour ofObject in lofObject) { if (iNumber < 4) { sbTop3Server.AppendFormat("<li><em class=jdtj_dq>{0}</em><a href=http://game.dao50.com/GCenter/wan.aspx?gn={1} target=_blank>{2}</a><a class=jdtj_wenzi href=http://game.dao50.com/GCenter/wan.aspx?gn={1} target=_blank>{3}服</a></li>", ofObject.Fourth, ofObject.second, ofObject.third, ofObject.first); } sbAllSever.AppendFormat("<li><em class=jdtj_dq>{0}</em><a href=http://game.dao50.com/GCenter/wan.aspx?gn={1} target=_blank>{2}</a><a class=jdtj_wenzi href=http://game.dao50.com/GCenter/wan.aspx?gn={1} target=_blank>{3}服</a></li>", ofObject.Fourth, ofObject.second, ofObject.third, ofObject.first); iNumber++; } string sPath = string.Format("{0}\\{1}", Server.MapPath("~/Inc"), "RightBottom.htm"); string sHtml = string.Format(ProvideCommon.ReadFile(sPath), sFirstUrl, sFirstText, sFirstImg, sSecondUrl, sSecondText, sSecondImg, sbTop3Server.ToString(), sbAllSever.ToString()); Response.Write(string.Format("document.write('{0}');", sHtml)); }
public string FirstGift(string sGameName, int iUserID) { if (iUserID < 1000000) { return("useriderr!"); } string sBeginTime = ServerBLL.ServerTimeSel(sGameName); if (!FirstGiftBLL.valTime(sBeginTime)) { return("timeerr"); } if (Request.UrlReferrer.Host.Length < 6) { return("hostlenerr"); } if (Request.UrlReferrer.Host.Split('.').Length < 2) { return("hosterr"); } string sFromHost = Request.UrlReferrer.Host.Split('.')[1]; string sAccount = UserBll.AccountSel(iUserID).Trim(); string sGiftState = FirstGiftBLL.GiftStateSel(iUserID, sGameName); string sRes = string.Empty; int iPoint = 10; string sTranIP = ProvideCommon.GetRealIP(); string sGiftRes = string.Empty; switch (sGiftState) { case "0": sGiftRes = FirstGiftBLL.GiftToGame(iUserID, sGameName, sAccount, iPoint, sTranIP, sFromHost); if (sGiftRes == "0") { sRes = "0"; FirstGiftBLL.GiftStateUpate(iUserID, sGameName, 1); } else { sRes = sGiftRes; } break; case "1": sRes = "1"; break; case "2": sRes = "7"; break; default: string sLevel = FirstGiftBLL.ULevelSel(iUserID, sGameName); int iLevel = 0; int.TryParse(sLevel, out iLevel); if (iLevel > 29) { FirstGiftBLL.GiftAdd(iUserID, iLevel, sGameName); sGiftRes = FirstGiftBLL.GiftToGame(iUserID, sGameName, sAccount, iPoint, sTranIP, sFromHost); if (sGiftRes == "0") { FirstGiftBLL.GiftStateUpate(iUserID, sGameName, 1); sRes = "0"; } else { FirstGiftBLL.GiftStateUpate(iUserID, sGameName, 0); sRes = sGiftRes; } } else { sRes = "2"; } break; } return(sRes); }
protected string ServerSelByGame(string sAbbre) { return(ServerBLL.ServerJsonSel(sAbbre)); }
protected void Page_Load(object sender, EventArgs e) { //直接跳转游戏 if (!Page.IsPostBack) { string sGameName = CYRequest.GetString("gn"); if (sGameName.Length < 2) { Response.Redirect(string.Format("http://www.dao50.com/yxzx/?gn={0}", sGameName), 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; } } string sUserIP = ProvideCommon.GetRealIP(); if (!ProvideCommon.GameIPVal(sUserIP)) { return; } string sStartTime = DateTime.Now.ToString(); string sEndTime = ServerBLL.ServerTimeSel(sGameName); string sGame = GameInfoBLL.GameInfoAbbreSel(sGameName).TrimEnd(); sUserID = iUserID.ToString(); if (!ProvideCommon.valTime(sStartTime, sEndTime)) { if (!UserBll.AdminUserVal(iUserID)) { string sWUrl = WebConfig.BaseConfig.sWUrl; Response.Redirect(string.Format("{0}/jjkf", sWUrl), true); return; } } else if (sGame == "dxz") { int iAddDay = 15;//过期时间 if (!ProvideCommon.SeverTimeVal(sEndTime, iAddDay) && !TransPBLL.UserIsTranVal(iUserID) && !dxzGame.GameisLoginVal(sUserID, sGameName)) { //Response.Write(dxzGame.GameisLoginTest(sUserID,sGameName)); return; } } switch (sGame) { case "lj": sUrl = ljGame.Login(sUserID, sGameName); break; case "yjxy": sUrl = yjxyGame.Login(sUserID, sGameName); break; case "sq": sUrl = sqGame.Login(sUserID, sGameName, false); break; case "dxz": sUrl = dxzGame.Login(sUserID, sGameName); break; case "djj": sUrl = djjGame.Login(sUserID, sGameName); break; case "txj": sUrl = txjGame.Login(sUserID, sGameName); break; case "sjsg": sUrl = sjsgGame.Login(sUserID, sGameName); break; case "tzcq": sUrl = tzcqGame.Login(sUserID, sGameName); break; case "by": sUrl = byGame.Login(sUserID, sGameName); break; case "swjt": sUrl = swjtGame.Login(sUserID, sGameName); break; case "gcld": sUrl = gcldGame.Login(sUserID, sGameName); break; case "khbd": sUrl = khbdGame.Login(sUserID, sGameName); break; case "hyjft": sUrl = hyjftGame.Login(sUserID, sGameName); break; case "nslm": sUrl = nslmGame.Login(sUserID, sGameName); break; case "dtgzt": sUrl = tgztGame.Login(sUserID, sGameName); break; case "mhxy": sUrl = mhxyGame.Login(sUserID, sGameName); break; case "qxz": sUrl = qxzGame.Login(sUserID, sGameName); break; case "qszg": sUrl = qszgGame.Login(sUserID, sGameName); break; case "wwsg": sUrl = wwsgGame.Login(sUserID, sGameName); break; case "dntg": sUrl = dntgGame.Login(sUserID, sGameName, ""); break; case "jy": sUrl = jyGame.Login(sUserID, sGameName, ""); break; case "sskc": sUrl = sskcGame.Login(sUserID, sGameName, ""); break; case "ktpd": sUrl = ktpdGame.Login(sUserID, sGameName, "", ""); break; case "mhtj": sUrl = mhtjGame.Login(sUserID, sGameName, ""); break; case "jjp": sUrl = jjpGame.Login(sUserID, sGameName); break; case "sgyjz": if (sAccount.IndexOf("banhaotest") < 0 && sGameName == "sgyjz999") { sUrl = ""; } else { string fcm = string.Empty; string sfcmAccount = "banhaotest1|banhaotest2|banhaotest3|banhaotest9|banhaotest10"; if (sfcmAccount.IndexOf(sAccount) > -1) { fcm = "0"; } else { fcm = "2"; } sUrl = sgyjzGame.Login(sUserID, sGameName, fcm); } break; case "dtgzter": sUrl = tgzt2Game.Login(sUserID, sGameName); break; case "zwx": sUrl = zwxGame.Login(sUserID, sGameName); break; default: sUrl = string.Format("{0}|{1}|{2}", sGameName, sGame, sUserID); break; } if (sUrl.Length > 5 && sUrl.IndexOf("http") > -1) { if (GameLogin(sGameName)) { GameLoginBLL.GameLoginAdd(iUserID, sGameName, ProvideCommon.GetRealIP(), sUrl); } Response.Redirect(sUrl, true); } else { Response.Redirect(string.Format("http://www.dao50.com/fwqwh/?url={0}", Server.UrlEncode(sUrl)), true); } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "GET") { string sWebUrl = WebConfig.BaseConfig.sWUrl; string uniqueid = CYRequest.GetString("uniqueid"); sGameName = CYRequest.GetString("game"); string sign = CYRequest.GetString("sign"); string sKey = "1!s@k#d)}w[l<>"; StringBuilder sbText = new StringBuilder(); sbText.Append(uniqueid); sbText.Append(sGameName); sbText.Append(sKey); string sValSign = ProvideCommon.MD5(sbText.ToString()).ToLower(); if (sign == sValSign) { sServerName = ServerBLL.ServerTitleNoSNameSel(sGameName); if (!NoRegLoginBLL.NoRegLoginUnionidSel(uniqueid)) { //sMsg = "<script>alert('uniqueid 重复!')</script>"; sAccountT = GetAccount(); return; } string sUserName = string.Format("?{0}", ProvideCommon.GenerateStringID()); int iTypeID = 1; int iState = 1; string sPassWord = ""; int iUID = UserBll.UserReg(sUserName, sPassWord, iTypeID, iState); if (iUID > 1000) { sAccountT = sUserName; string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUID, sPageUrl); NoRegLoginBLL.NoRegLoginAdd(iUID, uniqueid, sGameName); NoRegLoginBLL.AddUserid(uniqueid, iUID.ToString()); if (sGameName.Length > 0) { string sGame = GameInfoBLL.GameInfoAbbreSel(sGameName).TrimEnd(); switch (sGame) { case "lj": case "yjxy": case "sq": case "hzw": case "xlfc": case "dxz": case "djj": case "zl": case "fswd2": case "txj": case "ljer": case "sjsg": case "tzcq": case "zsg": case "wssg": case "by": case "nz": case "mjcs": if (ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameName))) { sQueryString = string.Format("?gn={0}", sGameName); sUrl = string.Format("/frame/g_mainframe_{0}.aspx{1}", sGame, sQueryString); } break; case "tssg": string fuid = CYRequest.GetString("fuid"); sQueryString = string.Format("?gn={0}&fuid={1}", sGameName, fuid); sUrl = string.Format("/frame/g_mainframe_{0}.aspx{1}", sGame, sQueryString); break; default: sUrl = string.Format("/GCenter/PlayGame.aspx?gn={0}", sGameName); break; } } else { Response.StatusCode = 301; Response.Status = "301 Moved Permanently"; Response.RedirectLocation = string.Format("{0}/yxzx/", sWebUrl); Response.End(); } } else { Response.Write("<script>alert('注册失败!');location.href='http://www.dao50.com/';</script>"); } } else { //sMsg = "<script>alert('sign error')</script>"; return; } } }
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 (!Page.IsPostBack) { string sGameName = CYRequest.GetString("gn"); if (sGameName.Length < 2) { Response.Redirect("http://www.wanyouxi123.com/togameerr.html?code=gameisnull", false); return; } string sStartTime = DateTime.Now.ToString(); string sEndTime = ServerBLL.ServerTimeSel(sGameName); if (!ProvideCommon.valTime(sStartTime, sEndTime)) { Response.Redirect("http://www.wanyouxi123.com/togameerr.html?code=gamenobegin", true); return; } 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))) { ClearUsersInfo(); return; } } sUserID = iUserID.ToString(); string sGame = GameInfoBLL.GameInfoAbbreSel(sGameName).TrimEnd(); string sUrl = string.Empty; switch (sGame) { case "lj": sUrl = ljGame.Login(sUserID, sGameName); break; case "yjxy": sUrl = yjxyGame.Login(sUserID, sGameName); break; case "sq": bool bRes = GameLogin(sGameName); sUrl = sqGame.Login(sUserID, sGameName, bRes); break; case "dxz": sUrl = dxzGame.Login(sUserID, sGameName); break; case "djj": sUrl = djjGame.Login(sUserID, sGameName); break; case "txj": sUrl = txjGame.Login(sUserID, sGameName); break; case "sjsg": sUrl = sjsgGame.Login(sUserID, sGameName); break; case "tzcq": sUrl = tzcqGame.Login(sUserID, sGameName); break; case "by": sUrl = byGame.Login(sUserID, sGameName); break; case "swjt": sUrl = swjtGame.Login(sUserID, sGameName); break; case "gcld": sUrl = gcldGame.Login(sUserID, sGameName); break; case "khbd": sUrl = khbdGame.Login(sUserID, sGameName); break; case "hyjft": sUrl = hyjftGame.Login(sUserID, sGameName); break; case "nslm": sUrl = nslmGame.Login(sUserID, sGameName); break; case "tgzt": sUrl = tgztGame.Login(sUserID, sGameName); break; case "mhxy": sUrl = mhxyGame.Login(sUserID, sGameName); break; case "qxz": sUrl = qxzGame.Login(sUserID, sGameName); break; case "qszg": sUrl = qszgGame.Login(sUserID, sGameName); break; case "wwsg": sUrl = wwsgGame.Login(sUserID, sGameName); break; case "dntg": sUrl = dntgGame.Login(sUserID, sGameName, ""); break; case "jy": sUrl = jyGame.Login(sUserID, sGameName, ""); break; case "sskc": sUrl = sskcGame.Login(sUserID, sGameName, ""); break; case "ktpd": sUrl = ktpdGame.Login(sUserID, sGameName, "", ""); break; case "mhtj": sUrl = mhtjGame.Login(sUserID, sGameName, ""); break; case "dtgzt": sUrl = tgztGame.Login(sUserID, sGameName); break; case "sgyjz": if (sAccount.IndexOf("banhaotest") > -1) { string fcm = string.Empty; string sfcmAccount = "banhaotest1|banhaotest2|banhaotest3|banhaotest9|banhaotest10"; if (sfcmAccount.IndexOf(sAccount) > -1) { fcm = "0"; } else { fcm = "2"; } sUrl = sgyjzGame.Login(sUserID, sGameName, fcm); } else { sUrl = sgyjzGame.Login(sUserID, sGameName, "2"); } break; case "dtgzter": sUrl = tgzt2Game.Login(sUserID, sGameName); break; case "zwx": sUrl = zwxGame.Login(sUserID, sGameName); break; default: sUrl = string.Format("{0}|{1}|{2}", sGameName, sGame, sUserID); break; } if (sUrl.Length > 5 && sUrl.IndexOf("http") > -1) { if (GameLogin(sGameName)) { GameLoginBLL.GameLoginAdd(iUserID, sGameName, ProvideCommon.GetRealIP(), sUrl); } Response.Redirect(sUrl, true); } else { Response.Redirect(string.Format("http://www.wanyouxi123.com/togameerr.html?code=gameurlerr&{0}", sUrl), true); } } else { string sMultiPP = CYRequest.GetString("pp"); if (sMultiPP.Length < 10) { Response.Write("pp length is small"); return; } string sAccount = CYRequest.GetString("un"); int iUserID = UserBll.UserIDSel(sAccount); if (ProvideCommon.valMultiPP(iUserID, sMultiPP)) { string sUserID = iUserID.ToString(); string sGame = GameInfoBLL.GameInfoAbbreSel(sGameName).TrimEnd(); string sUrl = string.Empty; switch (sGame) { case "lj": sUrl = ljGame.Login(sUserID, sGameName); break; case "yjxy": sUrl = yjxyGame.Login(sUserID, sGameName); break; case "sq": bool bRes = GameLogin(sGameName); sUrl = sqGame.Login(sUserID, sGameName, bRes); break; case "dxz": sUrl = dxzGame.Login(sUserID, sGameName); break; case "djj": sUrl = djjGame.Login(sUserID, sGameName); break; case "txj": sUrl = txjGame.Login(sUserID, sGameName); break; case "sjsg": sUrl = sjsgGame.Login(sUserID, sGameName); break; case "tzcq": sUrl = tzcqGame.Login(sUserID, sGameName); break; case "by": sUrl = byGame.Login(sUserID, sGameName); break; case "swjt": sUrl = swjtGame.Login(sUserID, sGameName); break; case "gcld": sUrl = gcldGame.Login(sUserID, sGameName); break; case "khbd": sUrl = khbdGame.Login(sUserID, sGameName); break; case "hyjft": sUrl = hyjftGame.Login(sUserID, sGameName); break; case "nslm": sUrl = nslmGame.Login(sUserID, sGameName); break; case "dtgzt": sUrl = tgztGame.Login(sUserID, sGameName); break; case "mhxy": sUrl = mhxyGame.Login(sUserID, sGameName); break; case "qxz": sUrl = qxzGame.Login(sUserID, sGameName); break; case "qszg": sUrl = qszgGame.Login(sUserID, sGameName); break; case "wwsg": sUrl = wwsgGame.Login(sUserID, sGameName); break; case "dntg": sUrl = dntgGame.Login(sUserID, sGameName, ""); break; case "jy": sUrl = jyGame.Login(sUserID, sGameName, ""); break; case "sskc": sUrl = sskcGame.Login(sUserID, sGameName, ""); break; case "ktpd": sUrl = ktpdGame.Login(sUserID, sGameName, "", ""); break; case "mhtj": sUrl = mhtjGame.Login(sUserID, sGameName, ""); break; case "sgyjz": if (sAccount.IndexOf("banhaotest") > -1) { string fcm = string.Empty; string sfcmAccount = "banhaotest1|banhaotest2|banhaotest3|banhaotest9|banhaotest10"; if (sfcmAccount.IndexOf(sAccount) > -1) { fcm = "0"; } else { fcm = "2"; } sUrl = sgyjzGame.Login(sUserID, sGameName, fcm); } break; case "dtgzter": sUrl = tgzt2Game.Login(sUserID, sGameName); break; case "zwx": sUrl = zwxGame.Login(sUserID, sGameName); break; default: sUrl = string.Format("{0}|{1}|{2}", sGameName, sGame, sUserID); break; } if (sUrl.Length > 5 && sUrl.IndexOf("http") > -1) { if (GameLogin(sGameName)) { GameLoginBLL.GameLoginAdd(iUserID, sGameName, ProvideCommon.GetRealIP(), sUrl); } Response.Redirect(sUrl, true); } else { Response.Redirect(string.Format("http://www.wanyouxi123.com/togameerr.html?code=gameurlerr&{0}", sUrl), true); } } } } }
public string FirstGift(string sGameName, string sAccount, string sMultiPP, string sHost) { if (sMultiPP.Length < 10) { return("pplengthissmall"); } string sBeginTime = ServerBLL.ServerTimeSel(sGameName); if (!FirstGiftBLL.valTime(sBeginTime)) { return("timeerr"); } if (sHost.Length < 4) { return("hostlenerr"); } int iUserID = UserBll.UserIDSel(sAccount); if (!ProvideCommon.valMultiPP(iUserID, sMultiPP)) { return("pperr"); } string sGiftState = FirstGiftBLL.GiftStateSel(iUserID, sGameName); int iPoint = 10; string sTranIP = ProvideCommon.GetRealIP(); string sGiftRes = string.Empty; string sRes = string.Empty; switch (sGiftState) { case "0": sGiftRes = FirstGiftBLL.GiftToGame(iUserID, sGameName, sAccount, iPoint, sTranIP, sHost); if (sGiftRes == "0") { sRes = "0"; FirstGiftBLL.GiftStateUpate(iUserID, sGameName, 1); } else { sRes = sGiftRes; } break; case "1": sRes = "1"; break; case "2": sRes = "7"; break; default: string sLevel = FirstGiftBLL.ULevelSel(iUserID, sGameName); int iLevel = 0; int.TryParse(sLevel, out iLevel); int iTrueLevel = GameLevelSel(sGameName); if (iLevel > iTrueLevel) { FirstGiftBLL.GiftAdd(iUserID, iLevel, sGameName); sGiftRes = FirstGiftBLL.GiftToGame(iUserID, sGameName, sAccount, iPoint, sTranIP, sHost); if (sGiftRes == "0") { FirstGiftBLL.GiftStateUpate(iUserID, sGameName, 1); sRes = "0"; } else { FirstGiftBLL.GiftStateUpate(iUserID, sGameName, 0); sRes = sGiftRes; } } else { sRes = "2"; //sRes = string.Format("2|{0}",iTrueLevel.ToString()); } break; } return(sRes); }
protected string ServerJsonSelByGame(string sGame) { return(ServerBLL.ServerJsonSelByGame(sGame)); }
protected string ServerNumSelByGame(string sAbbre, string sNum) { return(ServerBLL.ServerNumJsonSel(sAbbre, sNum)); }
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 string ServerNewSel(int iGameID) { return(ServerBLL.ServerNewJsonSel(iGameID)); }