protected void Page_Load(object sender, EventArgs e) { string sAccount = CYRequest.GetString("account"); string sPId = CYRequest.GetString("agentid"); string sign = CYRequest.GetString("sign"); int pid = 0; int.TryParse(sPId, out pid); if (pid == 1) { string sTicket = PartnerBLL.PartnerKeySel(pid); StringBuilder sbText = new StringBuilder(50); sbText.Append(sAccount); sbText.Append(sPId); sbText.Append(sTicket); string sValSign = ProvideCommon.MD5(sbText.ToString());//md5(account + agentid + TICKEY_PAY) if (sign != sValSign) { Response.Redirect("http://www.682.com/Home/xsk"); } else { string sPartnerAbbre = PartnerBLL.PartnerAbbreSel(pid); string sAccountC = string.Format("{0}:{1}", sPartnerAbbre, sAccount); int iUserID = PartnerUserBLL.PartnerUserIDSel(sAccount, pid); string sPageUrl = Request.Url.ToString(); LoginStateSet(sAccountC, iUserID, sPageUrl); } } else if (!(LoginSessionVal() || isLoginCookie())) { Response.Redirect("http://www.682.com/Home/xsk"); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "POST") { string sUserName = CYRequest.GetFormString("username").Trim(); string sPassWord = CYRequest.GetFormString("pwd").Trim(); string sResult = UserBll.LoginCheck(sUserName, sPassWord); if (sResult.Length < 1) { if (UserBll.UserAllVal(sUserName, sPassWord)) { string sPageUrl = Request.Url.ToString(); int iUserID = UserBll.UserIDSel(sUserName); LoginStateSet(sUserName, iUserID, sPageUrl); } else { sMsg = "<script>alert('登陆失败,用户名密码不正确!')</script>"; } } else { sMsg = sResult; } } sAccount = GetAccount(); }
protected void Page_Load(object sender, EventArgs e) { string sType = CYRequest.GetString("Type"); string sAccount = CYRequest.GetString("Account", true); string sKey = CYRequest.GetString("Key"); string sPassWord = CYRequest.GetString("PsssWord", true);//md5加密后的密码 string sUForm = CYRequest.GetString("UFrom", true); if (ValKey(sAccount, sKey)) { switch (sType) { case "reg": Response.Write(UserReg(sAccount, sPassWord, sUForm)); break; case "login": Response.Write(UserLogin(sAccount, sPassWord, sUForm)); break; case "namesel": Response.Write(UserNameSel(sAccount)); break; case "UserInfoVal": Response.Write(UsersVal(sAccount, sPassWord)); break; } } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sChannle = CYRequest.GetFormString("Channel"); string sPhone = CYRequest.GetFormString("Phone"); string sAccount = CYRequest.GetFormString("Account"); string sPrice = CYRequest.GetFormString("Price"); decimal dPrice = 0; decimal.TryParse(sPrice, out dPrice); string sCount = CYRequest.GetFormString("Count"); int iCount = 0; int.TryParse(sCount, out iCount); string sGame = CYRequest.GetFormString("Game"); string sUrl = string.Empty; if (sGame == "" || sGame == "unsafe string") { sUrl = YeePayBuy.PayBegin(sChannle, sPhone, sAccount, dPrice, iCount); } else { string sGameName = sGame.Split('|')[0]; string sTranIP = ProvideCommon.GetRealIP(); string sPTranID = TransPBLL.PointSalesInit(sChannle, sPhone, sAccount, dPrice, iCount, sTranIP);//订单号 int iPayUserID = UserBll.UserIDSel(sAccount); decimal dFeeScale = ChannelBLL.FeeScaleSel(sChannle); //int iPrice = Convert.ToInt32(dPrice); int iGamePoints = Convert.ToInt32(dPrice * 10 * dFeeScale); string sGTranID = TransGBLL.GameSalesInit(sGameName, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP); TranQuickBLL.TranQuickAdd(sGTranID, sPTranID); sUrl = YeePayBuy.QuickPayBegin(sPTranID, sChannle, sAccount, dPrice, sGame); } context.Response.Redirect(sUrl, true); } }
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 RegButton_Click(object sender, EventArgs e) { string sAccount = CYRequest.GetFormString("txz").Trim(); string sPassWord = CYRequest.GetFormString("pwdtwo").Trim(); string sValCode = Request["ValCode"].ToString(); string sRes = ValCheckCode(sValCode); if (sRes != "0") { StringBuilder sbText = new StringBuilder(); sbText.Append("<script>alert('"); sbText.Append(sRes); sbText.Append("')</script>"); sMsg = sbText.ToString(); return; } string sValMessage = UserBll.RegCheck(sAccount, sPassWord); if (sValMessage != "") { sMsg = sValMessage; return; } int iUID = UserBll.UserReg(sAccount, sPassWord); if (-1 == iUID) { sMsg = "<script>alert('注册失败,请重试!')</script>"; return; } else if (iUID > 999) { string sQuestion = CYRequest.GetString("question"); string sAnswer = CYRequest.GetString("answer"); string sEmail = CYRequest.GetString("email"); string sName = CYRequest.GetString("realname"); string sCrednnum = CYRequest.GetString("credennum"); UserInfo uiObject = new UserInfo(); uiObject.Credennum = sCrednnum; uiObject.Answer = sAnswer; uiObject.Email = sEmail; uiObject.Name = sName; uiObject.question = sQuestion; uiObject.regip = ProvideCommon.GetRealIP(); uiObject.uid = iUID; UserInfoBLL.UserInfoAdd(uiObject); string sPageUrl = Request.Url.ToString(); LoginStateSet(sAccount, iUID, sPageUrl); string sWUrl = WebConfig.BaseConfig.sWUrl; string sWWWUrl = string.Format("{0}/{1}?un={2}", sWUrl, "usercookie.aspx", sAccount); string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sBBSUrl = DiscuzUserI.BBSLogin(sAccount, sPassWord, sKey); string sJSUrl = string.Format("<script src='{0}'></script><script src='{1}'></script>", sBBSUrl, sWWWUrl); sMsg = string.Format("{0}<script>alert('注册成功!');location.href='http://www.dao50.com/';</script>", sJSUrl); return; } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sAccount = CYRequest.GetFormString("gameaccount");//充值账号 string sPid = CYRequest.GetFormString("pid"); int iPid = 0; int.TryParse(sPid, out iPid); string sUserName = PartnerUserBLL.PartnerUserNameGet(sAccount, iPid); string sPhone = CYRequest.GetFormString("gamephone"); string sPayNums = CYRequest.GetFormString("gamepaynums"); //充值金额 string sServername = CYRequest.GetFormString("gameservername"); //充值金额 StringBuilder sbText = new StringBuilder(200); sbText.AppendFormat("<form id='ptpay' name='ptpay' action='{0}' method='post'>", "PTPay.aspx"); sbText.AppendFormat("<input type='hidden' name='gameaccount' value='{0}'/>", sUserName); sbText.AppendFormat("<input type='hidden' name='gamephone' value='{0}'/>", sPhone); sbText.AppendFormat("<input type='hidden' name='gamepaynums' value='{0}'/>", sPayNums); sbText.AppendFormat("<input type='hidden' name='gameservername' value='{0}'/>", sServername); //submit按钮控件请不要含有name属性 sbText.Append("<input type='submit' value='submit' style='display:none;'></form>"); sbText.Append("<script>document.forms['ptpay'].submit();</script>"); context.Response.Write(sbText); return; } }
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()) { if (Request.HttpMethod == "POST") { int iUID = GetUserID(); string sEmail = UserInfoBLL.UserEmailSel(iUID); string sBackUrL = Request.UrlReferrer.ToString(); string sGoUrL = string.Format("http://{0}/user.html", Request.UrlReferrer.Host); if (sEmail != null && sEmail.Length > 4) { Response.Write(string.Format("<script>alert('邮箱已绑定!');location.href='{0}';</script>", sBackUrL)); return; } string sBindEmail = CYRequest.GetFormString("EmailTwo"); int iNum = UserInfoBLL.UserInfoUpdateOfEmail(sBindEmail, iUID); if (iNum > 0) { Response.Write(string.Format("<script>alert('邮箱绑定成功!');location.href='{0}';</script>", sGoUrL)); return; } else { Response.Write(string.Format("<script>alert('邮箱绑定失败!');location.href='{0}';</script>", sBackUrL)); return; } } } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sAccount = CYRequest.GetFormString("bankaccount");//充值账号 string sPid = CYRequest.GetFormString("pid"); int iPid = 0; int.TryParse(sPid, out iPid); string sUserName = PartnerUserBLL.PartnerUserNameGet(sAccount, iPid); string sPhone = CYRequest.GetFormString("bankphonenum"); string sPayNums = CYRequest.GetFormString("bankpayprice");//充值金额 string bankchannel = CYRequest.GetFormString("bankchannel"); string bankname = CYRequest.GetFormString("bankname"); string cardTypeCombine = CYRequest.GetString("cardTypeCombine"); StringBuilder sbText = new StringBuilder(200); sbText.AppendFormat("<form id='bankpay' name='bankpay' action='{0}' method='post'>", "BankPay.ashx"); sbText.AppendFormat("<input type='hidden' name='bankaccount' value='{0}'/>", sUserName); sbText.AppendFormat("<input type='hidden' name='bankphonenum' value='{0}'/>", sPhone); sbText.AppendFormat("<input type='hidden' name='bankpayprice' value='{0}'/>", sPayNums); sbText.AppendFormat("<input type='hidden' name='bankchannel' value='{0}'/>", bankchannel); sbText.AppendFormat("<input type='hidden' name='bankname' value='{0}'/>", bankname); sbText.AppendFormat("<input type='hidden' name='cardTypeCombine' value='{0}'/>", cardTypeCombine); //submit按钮控件请不要含有name属性 sbText.Append("<input type='submit' value='submit' style='display:none;'></form>"); sbText.Append("<script>document.forms['bankpay'].submit();</script>"); context.Response.Write(sbText); return; } }
protected void Page_Load(object sender, EventArgs e) { string sErr = CYRequest.GetQueryString("err"); switch (sErr) { case "null": case "account": case "pid": sErrText = "参数有问题!"; break; case "time": sErrText = "时间超出!请从新操作!"; break; case "ticket": sErrText = "sign验证失败!"; break; case "userid": sErrText = "还没登陆游戏,请登陆游戏先!"; break; case "partner": sErrText = "合作商不合法!"; break; default: sErrText = "请从新登陆!"; break; } }
protected void Page_Load(object sender, EventArgs e) { string sTranID = CYRequest.GetQueryString("TranID"); iPayPoints = TransPBLL.TranPSelPointByID(sTranID); int iUserID = TransPBLL.TranPSelUserIDByID(sTranID); iUserPoints = UserPointsBLL.UPointAllSel(iUserID); int iLUserID = GetUserID(); if (iLUserID > 999 && (iUserID == iLUserID)) { SetPoints(iUserPoints); } string sFromHost = GetFromHost(); if (sFromHost.Length > 5) { string sQueryString = string.Format("{0}|{1}|{2}", sTranID, iPayPoints, iUserPoints); string sEncodeQueryString = Server.UrlEncode(sQueryString); string sGoUrl = string.Format("http://{0}/PayPSucc.html?{1}", sFromHost, sEncodeQueryString); Response.Redirect(sGoUrl, true); return; } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { if (Request.HttpMethod == "POST") { int iUID = GetUserID(); string sCredenNum = UserInfoBLL.UserCredennumSel(iUID); string sBackUrL = Request.UrlReferrer.ToString(); string sGoUrL = string.Format("http://{0}/user.html", Request.UrlReferrer.Host); if (sCredenNum.Length > 14) { Response.Write(string.Format("<script>alert('已经解除防沉迷!');location.href='{0}';</script>", sBackUrL)); return; } string sUserName = CYRequest.GetFormString("RealName"); string sCredenNumPost = CYRequest.GetFormString("CredenNum"); int iNum = UserInfoBLL.UserInfoUpdateOfIndulge(sUserName, sCredenNumPost, iUID); if (iNum > 0) { Response.Write(string.Format("<script>alert('防沉迷解除成功!谢谢!');location.href='{0}';</script>", sGoUrL)); return; } else { Response.Write(string.Format("<script>alert('防沉迷解除失败!');location.href='{0}';</script>", sBackUrL)); return; } } } }
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; } }
private void gameval() { sAccount = CYRequest.GetString("account").Trim(); string sPassWord = CYRequest.GetString("passwordl"); string sMD5PassWord = UserBll.PassWordMD5(sAccount, sPassWord); string sRes = UserBll.UserVal(sAccount, sMD5PassWord); string sPageUrl = Request.Url.ToString(); if (sRes == "0") { int iUserID = UserBll.UserIDSel(sAccount); LoginStateSet(sAccount, iUserID, sPageUrl); return; } else { string sMD5PassWordNew = UserBll.PassWordMD5New(sAccount, sPassWord); if ("0" == UserBll.UserVal(sAccount, sMD5PassWordNew)) { int iUserID = UserBll.UserIDSel(sAccount); LoginStateSet(sAccount, iUserID, sPageUrl); } else { Response.Redirect(string.Format("{0}/yxzq/sg/index1.html", sWUrl), true); } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType == "POST") { string sType = CYRequest.GetFormString("Type"); if (sType == "login") { gameval(); } else { sAccount = GetAccount(); string sGameAbbre = CYRequest.GetFormString("gameabbre"); int iUserID = GetUserID(); if (iUserID < 1000) { iUserID = UserBll.UserIDSel(sAccount); } gamelogin(sGameAbbre, iUserID); } } else { if (LoginSessionVal() || isLoginCookie()) { sAccount = GetAccount(); } else { Response.Redirect(string.Format("{0}/yxzq/sg/index1.html", sWUrl), true); } } }
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()) { if (Request.HttpMethod == "POST") { int iUserID = GetUserID(); string sBindQuestion = UserInfoBLL.UserQuestionSelByID(iUserID); string sBackUrL = Request.UrlReferrer.ToString(); string sGoUrL = string.Format("http://{0}/user.html", Request.UrlReferrer.Host); if (sBindQuestion != null && sBindQuestion.Length > 4) { Response.Write(string.Format("<script>alert('密码保护已绑定!');location.href='{0}';</script>", sBackUrL)); return; } string sQuestion = CYRequest.GetFormString("question"); string sAnswer = CYRequest.GetFormString("mbda"); int iNum = UserInfoBLL.UserInfoUpdateOfQuestion(sQuestion, sAnswer, iUserID); if (iNum > 0) { Response.Write(string.Format("<script>alert('密码保护绑定成功!');location.href='{0}';</script>", sGoUrL)); return; } else { Response.Write(string.Format("<script>alert('密码保护绑定失败!');location.href='{0}';</script>", sBackUrL)); return; } } } }
protected void Page_Load(object sender, EventArgs e) { sAccount = GetAccount(); if (Request.HttpMethod == "POST") { string sAccountVal = CYRequest.GetFormString("account"); string sPassWord = CYRequest.GetFormString("pwd"); string sMD5PassWord = UserBll.PassWordMD5(sAccountVal, sPassWord); string sRes = UserBll.UserVal(sAccountVal, sMD5PassWord); string sPageUrl = Request.Url.ToString(); if (sRes == "0") { int iUserID = UserBll.UserIDSel(sAccountVal); LoginStateSet(sAccountVal, iUserID, sPageUrl); } else { string sMD5PassWordNew = UserBll.PassWordMD5New(sAccountVal, sPassWord); if ("0" == UserBll.UserVal(sAccountVal, sMD5PassWordNew)) { int iUserID = UserBll.UserIDSel(sAccountVal); LoginStateSet(sAccountVal, iUserID, sPageUrl); } } string sUrl = string.Empty; if (Request.ServerVariables["HTTP_Referer"] != null) { sUrl = Request.ServerVariables["HTTP_Referer"]; Response.Redirect(sUrl, true); } return; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "POST") { string username = CYRequest.GetFormString("account"); string password = CYRequest.GetFormString("pwdone"); string fromurl = CYRequest.GetFormString("url"); string sErrMsg = UserBll.LoginCheck(username, password); string sGoUrl = string.Empty; string sHost = string.Empty; if (fromurl.Length > 4) { sGoUrl = fromurl; sHost = ProvideCommon.getHost(fromurl); } else { sGoUrl = Request.UrlReferrer.ToString(); sHost = Request.UrlReferrer.Host; } if (sErrMsg.Length > 0) { Response.Write(string.Format("{0}<script>location.href='{1}'</script>", sErrMsg, sGoUrl)); return; } if (UserBll.UserAllVal(username, password)) { string sPageUrl = Request.Url.ToString(); int iUserID = UserBll.UserIDSel(username); LoginStateSet(username, iUserID, sPageUrl); //string sTypeID = string.Empty; //switch (sHost) //{ // case "www.wanyouxi123.com": // sTypeID = "20"; // break; // case "www.99wanyouxi.com": // sTypeID = "21"; // break; //} //SetUserType(sTypeID); int iPoints = GetUPoints(); string sMultiPP = ProvideCommon.getMultiPP(iUserID); string sReturnUrl = string.Format("http://{0}/usercookie.aspx?un={1}&point={2}&GoUrl={3}&pp={4}", sHost, username, iPoints.ToString(), sGoUrl, sMultiPP); Response.Redirect(sReturnUrl, true); return; } else { StringBuilder sbHtml = new StringBuilder(); sbHtml.Append("<script>alert('账号信息输入错误!');</script>"); sbHtml.AppendFormat("<script>location.href='{0}'</script>", sGoUrl); Response.Write(sbHtml.ToString()); return; } } }
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 (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(sUserName, pwdtwo, sKey); string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUID, sPageUrl); Server.Transfer("zsg.aspx", false); } } } else { if (LoginSessionVal() || isLoginCookie()) { Server.Transfer("zsg.aspx", false); } } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST" || context.Request.HttpMethod == "GET") { string sAjaxType = CYRequest.GetString("AjaxType"); string sRes = string.Empty; string account = string.Empty; string question = string.Empty; string answer = string.Empty; switch (sAjaxType) { case "QuestionVal": account = CYRequest.GetString("un"); question = CYRequest.GetString("question"); answer = CYRequest.GetString("answer"); context.Response.Write(QuestionVal(account, question, answer)); break; case "PassWordFind": account = CYRequest.GetString("un"); question = CYRequest.GetString("question"); answer = CYRequest.GetString("answer"); if (QuestionVal(account, question, answer) == "2") { string sPassWordTwo = CYRequest.GetString("pwdtwo"); sRes = PassWordFind(account, sPassWordTwo); } else { sRes = "1"; } context.Response.Write(sRes); break; case "UserMoreSel": account = CYRequest.GetString("un"); context.Response.Write(UserMoreSel(account)); break; case "UserCredenSel": account = CYRequest.GetString("un"); context.Response.Write(UserCredenSel(account)); break; case "UserEmailSel": account = CYRequest.GetString("un"); context.Response.Write(UserEmailSel(account)); break; case "UserQuestionSel": account = CYRequest.GetString("un"); context.Response.Write(UserQuestionSel(account)); break; } } }
protected void Page_Load(object sender, EventArgs e) { string sUserName = CYRequest.GetString("username"); string sPWD = CYRequest.GetString("pwd"); string sKey = CYRequest.GetString("key"); string sGameID = CYRequest.GetString("gameid"); string sServerid = CYRequest.GetString("serverid"); if (ValKey(sUserName, sPWD, sKey)) { string sState = UserBll.UserVal(sUserName, sPWD); if ("0" == sState) { int iUserID = UserBll.UserIDSel(sUserName); string sbbsKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sUrl = DiscuzUserI.BBSLogin(sUserName, sPWD, sbbsKey); string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUserID, sPageUrl); int iGameID = 0; int.TryParse(sGameID, out iGameID); int iServerID = 0; int.TryParse(sServerid, out iServerID); string sGameAbbre = GameBLL.GameAbbreSel(iGameID, iServerID).Trim(); string sGame = GameInfoBLL.GameInfoAbbreSel(sGameAbbre).TrimEnd(); string sGameUrl = string.Empty; switch (sGame) { case "sssg": string client = CYRequest.GetString("client"); sGameUrl = string.Format("{0}/GCenter/PlayGame.aspx?gn={1}&client={2}", sRootUrl, sGameAbbre, client); break; case "tssg": string fuid = CYRequest.GetString("fuid"); sGameUrl = string.Format("{0}/GCenter/PlayGame.aspx?gn={1}&fuid={2}", sRootUrl, sGameAbbre, fuid); break; default: sGameUrl = string.Format("{0}/GCenter/PlayGame.aspx?gn={1}", sRootUrl, sGameAbbre); break; } sMsg = string.Format("<script>location.href='{0}'</script><script src='{1}'></script>", sGameUrl, sUrl); } else { sMsg = string.Format("<script>alert('用户信息输入错误,验证失败!')</script><script>location.href='{0}/Default.aspx'</script>", sRootUrl); return; } } else { Response.Redirect("../Default.aspx", true); } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { string sAccount = CYRequest.GetQueryString("un"); if (sAccount.Length > 3) { setaccount(sAccount); } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "GET") { string sWebUrl = WebConfig.BaseConfig.sWUrl; string uniqueid = CYRequest.GetString("uniqueid"); string 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) { if (!NoRegLoginBLL.NoRegLoginUnionidSel(uniqueid)) { sMsg = "uniqueid重复"; 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) { string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUID, sPageUrl); NoRegLoginBLL.NoRegLoginAdd(iUID, uniqueid, sGameName); NoRegLoginBLL.AddUserid(uniqueid, iUID.ToString()); if (sGameName.Length > 0) { sUrl = string.Format("/frame/g_mainframe_noreg.aspx?gn={0}", sGameName); return; } } else { sMsg = "注册失败"; return; } } else { sMsg = "sign error"; return; } } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sFromHost = context.Request.UrlReferrer.Host; context.Response.Cookies["fromhost"].Value = sFromHost; context.Response.Cookies["fromhost"].Expires = DateTime.Now.AddHours(1); string sAccount = CYRequest.GetFormString("bankaccount"); //充值账号 string sPhone = CYRequest.GetFormString("bankphonenum"); string sPayNums = CYRequest.GetFormString("bankpayprice"); //充值金额 int iUserID = UserBll.UserIDSel(sAccount); if (iUserID < 1000) { context.Response.Write("<script>alert('充值账号不存在!');</script>"); return; } else { decimal dPrice = 0; decimal.TryParse(sPayNums, out dPrice); if (dPrice < 10) { context.Response.Redirect("PayPErr.aspx?err=204"); return; } string sChannel = CYRequest.GetFormString("bankchannel"); string sBankName = string.Empty; if (sChannel == "ibank") { sBankName = CYRequest.GetFormString("bankname"); } int iCount = 1; string sPayDirect = string.Empty; if (sChannel == "tenpay") { sPayDirect = TenPayBuy.PayBegin(sChannel, sPhone, sAccount, dPrice, iCount, context); } else if (sChannel == "szfphone") { string cardTypeCombine = CYRequest.GetString("cardTypeCombine"); sPayDirect = SzfPayBuy.PayBegin(sChannel, sPhone, sAccount, dPrice, iCount, "0", cardTypeCombine); } else { sPayDirect = PayAll.CreatePay(sChannel, sPhone, sAccount, dPrice, iCount, sBankName); } context.Response.Write(sPayDirect); return; } } }
public static string VPayVal() { string sRes = string.Empty; //'接受服务器url get参数 string rtmd5 = CYRequest.GetString("v1"); // '服务器MD5 string trka = CYRequest.GetString("v2"); // 'V币号码15位 string rtmi = CYRequest.GetString("v3"); // '密码'V币密码6位 (可能为空 老V币没有密码) string rtmz = CYRequest.GetString("v4"); // '面值1-999 整数 string rtlx = CYRequest.GetString("v5"); // '卡的类型 1 2 3 string rtoid = CYRequest.GetString("v6"); // '网盈一号通服务器端订单 string rtcoid = CYRequest.GetString("v7"); // '商户自己订单 string rtuserid = CYRequest.GetString("v8"); // '商户的用户ID string rtcustom = CYRequest.GetString("v9"); //'商户自己定义数据 string rtflag = CYRequest.GetString("v10"); // '返回状态. 1正常发送 2补单发送 StringBuilder sbText = new StringBuilder(); sbText.Append(trka); sbText.Append(rtmi); sbText.Append(rtoid); sbText.Append(spid); sbText.Append(sppwd); sbText.Append(rtcoid); sbText.Append(rtflag); sbText.Append(rtmz); string get_key = sbText.ToString(); //string get_key = trka + rtmi + rtoid + spid + sppwd + rtcoid + rtflag + rtmz; string md5password = ProvideCommon.MD5(get_key).ToUpper(); // '先MD5 32 然后转大写 string sAccount = rtuserid; //获取充值人账户 decimal dPrice = 0; decimal.TryParse(rtmz, out dPrice); if (rtflag == "1" || rtflag == "2") { if (md5password == rtmd5) { string sTranID = string.Format("{0}{1}", rtcoid, rtcustom.Split('|')[0]); int j = TransPBLL.PointSalesCommit(sTranID, sAccount, dPrice); //确认返回信息无误后提交此定单 sRes = j.ToString(); } else { sRes = string.Format("{0}|{1}", md5password, rtmd5); } } else { sRes = string.Format("rtflag:{0}", rtflag); } return(sRes); }
public void ProcessRequest(HttpContext context) { //获取Authorization Code string usercancel = CYRequest.GetQueryString("usercancel", false); if (usercancel.Length == 0) { //通过Authorization Code获取Access Token string code = CYRequest.GetQueryString("code", false); string grant_type = "authorization_code"; string client_id = "100225329"; string client_secret = "a7a94f5cf02c8b46bc40f3597f535e46"; string state = CYRequest.GetQueryString("state", false); string md5State = ProvideCommon.MD5(state); string redirect_uri = context.Server.UrlEncode(string.Format("http://game.dao50.com/Services/qqCallBack.ashx?ms={0}", md5State)); string sQQTokenUrl = string.Format("https://graph.qq.com/oauth2.0/token?grant_type={0}&client_id={1}&redirect_uri={2}&code={3}&client_secret={4}", grant_type, client_id, redirect_uri, code, client_secret); string sTokenReturn = ProvideCommon.GetPageInfo(sQQTokenUrl); string[] sTokenReturnArray = sTokenReturn.Split('&'); Dictionary <string, string> dTokenReturn = new Dictionary <string, string>(); foreach (string i in sTokenReturnArray) { string[] sParams = i.Split('='); if (sParams.Length == 2) { dTokenReturn.Add(sParams[0], sParams[1]); } } string sAccessToken = dTokenReturn["access_token"].ToString();//Access_Token的有效期默认是3个月 //获取用户OpenID string sQQOpenIDUrl = string.Format("https://graph.qq.com/oauth2.0/me?access_token={0}", sAccessToken); string sOpenIDReturn = ProvideCommon.GetPageInfo(sQQOpenIDUrl).Trim(); string sOpenID = ProvideCommon.getJsonValueC("openid", sOpenIDReturn); //context.Response.Write(string.Format("Retrun:{0};OpenID:{1}",sOpenIDReturn,sOpenID)); //判断openid是否存在 int iUserID = QQUserBLL.QQUserUseridSelByOpenID(sOpenID); if (iUserID < 1000) { //不存在则注册 } else { //存在则新用户登陆 } } else { } }
//protected string noresize = string.Empty; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string sGameName = CYRequest.GetString("gn"); if (sGameName == "" || sGameName == "unsafe string") { Response.Redirect(string.Format("{0}/yxzx", sWUrl), false); } else { sGame = sGameName; } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "POST") { string username = CYRequest.GetFormString("account"); string password = CYRequest.GetFormString("pwdone"); string url = CYRequest.GetFormString("url"); StringBuilder sbHtml = new StringBuilder(); string sErrMsg = "";//UserBll.LoginVal(username, password); if (sErrMsg.Length > 0) { sbHtml.AppendFormat("<script>alert('{0}');</script>", sErrMsg); } else if (UserBll.UserAllVal(username, password)) { string sPageUrl = Request.Url.ToString(); int iUserID = UserBll.UserIDSel(username); LoginStateSet(username, iUserID, sPageUrl); string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sBBSUrl = DiscuzUserI.BBSLogin(username, password, sKey); sbHtml.Append(string.Format("<script src='{0}'></script>", sBBSUrl)); //string sCUrl = WebConfig.BaseConfig.sWUrl; //string sHost = ProvideCommon.getHost(url); //if(sHost.Length < 5) //{ // sHost = Request.UrlReferrer.Host; //} string sHost = "www.dao50.com"; int iPoints = GetUPoints(); string sJSUrl = string.Format("http://{0}/{1}?un={2}&point={3}", sHost, "usercookie.aspx", username, iPoints); sbHtml.Append(string.Format("<script src='{0}'></script>", sJSUrl)); } else { sbHtml.Append("<script>alert('账号信息输入错误!');</script>"); } if (url != "") { sbHtml.AppendFormat("<script>location.href='{0}'</script>", url); } else { string sWUrl = WebConfig.BaseConfig.sWUrl; sbHtml.AppendFormat("<script>location.href='{0}'</script>", sWUrl); } Response.Write(sbHtml.ToString()); } }