Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
 /// <summary>
 /// 用户登陆状态设置
 /// </summary>
 /// <param name="account"></param>
 public void LoginStateSet(string sAccount, int iUserID, string sFormUrl)
 {
     if (sAccount.Trim().Length > 3 && iUserID > 1000)
     {
         string sLoginIP = ProvideCommon.GetRealIP();
         setcookies(sAccount, iUserID);
         //Session["Account"] = sAccount;
         //Session["UserID"] = iUserID.ToString();
         UserPointsBLL.UPointCheck(iUserID);
         CenterLoginBLL.CenterLoginAdd(iUserID, sLoginIP, sAccount, sFormUrl);
     }
 }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    iUserID   = GetUserID();
            string sRes      = YeePayBuy.QuickYeePaySubmit();
            string sTranIP   = ProvideCommon.GetRealIP();
            string sFromUrl  = Request.Url.ToString();
            char   cTranFrom = 't';

            if ("4" == sRes)
            {
                cTranFrom = 'y';
                YeePayBuy.LastOfPayLog(sTranIP, cTranFrom, sFromUrl);
                if (iUserID > 999)
                {
                    UserPoints upObject = UserPointsBLL.UPointsSel(iUserID);
                    SetPoints(upObject.Points);
                }
                Response.Write("SUCCESS");
                return;
            }
            else
            {
                YeePayBuy.LastOfPayLog(sTranIP, cTranFrom, sFromUrl);
                string[] sARes = sRes.Split('|');
                string   sUrl  = string.Empty;
                if ("1" == sARes[0])
                {
                    sUrl = string.Format("PayGSucc.aspx?TranID={0}&gn={1}&type=q", sARes[1], sARes[2]);
                    Response.Redirect(sUrl, true);
                }
                else if ("3" == sARes[0])
                {
                    //sMsg = "<script>alert('武林币充值成功!游戏充值失败!请进入武林币兑换页面进行兑换!');</script>";
                    Response.Redirect("PayPErr.aspx?err=101");
                }
                else if ("2" == sARes[0])
                {
                    //sMsg = "<script>alert('提交订单失败!请联系客服!');</script>";
                    Response.Redirect(string.Format("PayPErr.aspx?err=102&code={0}", sRes));
                }
                else if ("0" == sARes[0])
                {
                    //充值失败,原因见sRes[1]
                    //sMsg = "<script>alert('请稍等查看余额,如有问题请联系客服!');</script>";
                    Response.Redirect("PayPErr.aspx?err=110");
                }
                else
                {
                    sMsg = string.Format("<script>alert('{0}');</script>", sRes);
                }
            }
        }
Beispiel #4
0
        public string UserInfoSel(string sAccount)
        {
            string sUserInfo = string.Empty;

            if (sAccount.Length > 4 || sAccount.Length < 17)
            {
                int           iUserID     = UserBll.UserIDSel(sAccount);
                string        sUserPoints = UserPointsBLL.UPointAllSel(iUserID).ToString();
                StringBuilder sbText      = new StringBuilder();
                sbText.Append("{\"point\":\"");
                sbText.Append(sUserPoints);
                sbText.Append("\"}");
                sUserInfo = sbText.ToString();
            }
            return(sUserInfo);
        }
Beispiel #5
0
        protected void userlogin_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            string sAccountVal  = CYRequest.GetFormString("account").Trim();
            string sPassWord    = CYRequest.GetFormString("pwdone").Trim();
            string sState       = string.Empty;
            string sMD5PassWord = UserBll.PassWordMD5(sAccountVal, sPassWord);

            sState = UserBll.UserVal(sAccountVal, sMD5PassWord);
            if ("0" == sState)
            {
                sAccount = sAccountVal;
                int iUserID = UserBll.UserIDSel(sAccountVal);
                iPoints = UserPointsBLL.UPointAllSel(iUserID);
                GLoginInfo(iUserID);
                string sKey     = ConfigurationManager.AppSettings["UserValKey"].ToString();
                string sUrl     = DiscuzUserI.BBSLogin(sAccountVal, sPassWord, sKey);
                string sPageUrl = Request.Url.ToString();
                LoginStateSet(sAccount, iUserID, sPageUrl);
                string sCUrl  = WebConfig.BaseConfig.sWUrl;
                string sJSUrl = string.Format("{0}/{1}?un={2}", sCUrl, "usercookie.aspx", sAccount);
                sMsg = string.Format("<script src='{0}'></script><script src='{1}'></script>{2}", sUrl, sJSUrl, PageRefresh());
            }
            else
            {
                string sMD5PassWordNew = UserBll.PassWordMD5New(sAccountVal, sPassWord);
                if ("0" == UserBll.UserVal(sAccountVal, sMD5PassWordNew))
                {
                    sAccount = sAccountVal;
                    int iUserID = UserBll.UserIDSel(sAccountVal);
                    iPoints = UserPointsBLL.UPointAllSel(iUserID);
                    GLoginInfo(iUserID);
                    string sKey     = ConfigurationManager.AppSettings["UserValKey"].ToString();
                    string sUrl     = DiscuzUserI.BBSLogin(sAccountVal, sPassWord, sKey);
                    string sPageUrl = Request.Url.ToString();
                    LoginStateSet(sAccount, iUserID, sPageUrl);
                    string sCUrl  = "http://www.dao50.com";
                    string sJSUrl = string.Format("{0}/{1}?un={2}", sCUrl, "usercookie.aspx", sAccount);
                    sMsg = string.Format("<script src='{0}'></script><script src='{1}'></script>{2}", sUrl, sJSUrl, PageRefresh());
                }
                else
                {
                    sMsg = "<script>alert('用户信息输入错误,验证失败!')</script>";
                    return;
                }
            }
        }
Beispiel #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string sRes      = YeePayBuy.YeePaySubmit();
            string sTranIP   = ProvideCommon.GetRealIP();
            string sFromUrl  = Request.Url.ToString();
            char   cTranFrom = 't';

            if ("4" == sRes)
            {
                int iUserID = GetUserID();
                cTranFrom = 'y';
                YeePayBuy.LastOfPayLog(sTranIP, cTranFrom, sFromUrl);
                if (iUserID > 999)
                {
                    UserPoints upObject = UserPointsBLL.UPointsSel(iUserID);
                    SetPoints(upObject.Points);
                }
                Response.Write("SUCCESS");
                return;
            }
            else
            {
                YeePayBuy.LastOfPayLog(sTranIP, cTranFrom, sFromUrl);
                string[] sARes = sRes.Split('|');
                if ("1" == sARes[0])
                {
                    Response.Redirect("PayPSucc.aspx?TranID=" + sARes[1]);
                }
                else if ("2" == sARes[0])
                {
                    //sMsg = "<script>alert('提交订单失败!请联系客服!');location.href='default.aspx';</script>";
                    Response.Redirect("PayPErr.aspx?err=101");
                }
                else if ("0" == sARes[0])
                {
                    //sMsg = "<script>alert('请稍等查看余额,如有问题请联系客服!');location.href='default.aspx';</script>";
                    Response.Redirect("PayPErr.aspx?err=110");
                }
            }
        }
Beispiel #7
0
        public void setcookies(string sAccount, int iUserID)
        {
            Crypto3DES DesObject = new Crypto3DES();

            DesObject.Key = sDESKey;
            Encoding enc = Encoding.GetEncoding("UTF-8");

            Response.Cookies["UserID"].Value      = DesObject.Encrypt3DES(iUserID.ToString());
            Response.Cookies["UserID"].Expires    = DateTime.Now.AddDays(1);
            Response.Cookies["Account"].Value     = HttpUtility.UrlEncode(sAccount, enc);
            Response.Cookies["Account"].Expires   = DateTime.Now.AddDays(1);
            Response.Cookies["logintime"].Value   = DateTime.Now.ToString();
            Response.Cookies["logintime"].Expires = DateTime.Now.AddDays(1);
            UserPoints upObject    = UserPointsBLL.UPointsSel(iUserID);
            int        iPoints     = upObject.Points;
            int        iGiftPoints = upObject.GiftPoints;

            SetPoints(iPoints + iGiftPoints);
            string sLoginInfo = GetUserLogin(iUserID);

            SetLogin(sLoginInfo);
        }
Beispiel #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string sAccount = CYRequest.GetString("account");

            sPId = CYRequest.GetString("agentid");
            string tstamp = CYRequest.GetString("tstamp");
            string sign   = CYRequest.GetString("sign");
            int    pid;

            int.TryParse(sPId, out pid);

            TimeSpan tsNow    = new TimeSpan(DateTime.Now.Ticks);
            long     lTime    = long.Parse(tstamp + "0000000");
            TimeSpan tsGet    = new TimeSpan(lTime);
            int      iMinutes = tsNow.Subtract(tsGet).Minutes;

            string sTicket = string.Empty;

            if (sAccount == "" || sPId == "" || tstamp == "" || sign == "")
            {
                sErr = "null";
            }
            else if (sAccount.Length > 20 || sAccount.Length < 6 || sAccount == "unsafe string")
            {
                sErr = "name";
            }
            else if (pid < 1)
            {
                sErr = "pid";
            }
            else if (iMinutes > 20)
            {
                sErr = "time";
            }
            else
            {
                sTicket = PartnerBLL.PartnerKeySel(pid);
                if (sTicket == null || sTicket.Length < 1)
                {
                    sErr = "ticket";
                }
            }

            if (string.IsNullOrEmpty(sErr))
            {
                StringBuilder sbText = new StringBuilder(50);
                sbText.Append(sAccount);
                sbText.Append(sPId);
                sbText.Append(tstamp);
                sbText.Append(sTicket);
                string sValSign = ProvideCommon.MD5(sbText.ToString());// md5(account + agentid  + tstamp  +  TICKEY_PAY)
                if (sign != sValSign)
                {
                    sErr = "sign";
                }
            }

            if (string.IsNullOrEmpty(sErr))
            {
                int iUserID = PartnerUserBLL.PartnerUserIDSel(sAccount, pid);
                if (iUserID < 1000)
                {
                    sErr = "userid";
                }
                else
                {
                    sUserName   = sAccount;
                    iUserPoints = UserPointsBLL.UPointSel(iUserID);
                    if (iUserPoints > 0)
                    {
                        UserPointsBLL.UPointCheck(iUserID);
                    }
                    string sPartnerAbbre = PartnerBLL.PartnerAbbreSel(pid);
                    if (sPartnerAbbre == null || sPartnerAbbre.Length < 1)
                    {
                        sErr = "partner";
                    }
                    string sAccountC = string.Format("{0}:{1}", sPartnerAbbre, sAccount);
                    string sPageUrl  = Request.Url.ToString();
                    LoginStateSet(sAccountC, iUserID, sPageUrl);
                }
            }
        }
Beispiel #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string sUID  = CYRequest.GetQueryString("uid").Trim();
            string sType = string.Empty;

            if (sUID.Length > 3)
            {
                string sHava7UID = "18967189|18967207|18967219|18967230|18967236|18967241";
                if (sHava7UID.IndexOf(sUID) > -1)
                {
                    Response.Redirect("http://www.7hava.com/");
                    return;
                }
                sType = GetUserType(sUID);
            }
            string sGoUrl       = string.Empty;
            string sQueryString = Request.Url.Query;

            switch (sType)
            {
            case "2":
                sGoUrl = string.Format("http://game.niuzei.com/pay/{0}", sQueryString);
                break;

            case "20":
                sGoUrl = string.Format("http://www.wanyouxi123.com/pay.html{0}", sQueryString);
                break;

            case "21":
                sGoUrl = string.Format("http://www.99wanyouxi.com/pay.html{0}", sQueryString);
                break;

            case "22":
                sGoUrl = string.Format("http://www.50shouyou.com/pay.html{0}", sQueryString);
                break;

            case "23":
                sGoUrl = string.Format("http://www.50dao.com/pay.html{0}", sQueryString);
                break;

            case "24":
                sGoUrl = string.Format("http://www.niu50.com/pay.html{0}", sQueryString);
                break;

            case "25":
                sGoUrl = string.Format("http://www.99nbwan.com/pay.html{0}", sQueryString);
                break;

            case "26":
                sGoUrl = string.Format("http://www.97nbwan.com/pay.html{0}", sQueryString);
                break;
            }
            if (sGoUrl.Length > 5)
            {
                Response.Redirect(sGoUrl, true);
                return;
            }
            if (LoginSessionVal() || isLoginCookie())
            {
                int iUserID = GetUserID();
                sUserName   = GetAccount();
                iUserPoints = UserPointsBLL.UPointAllSel(iUserID);
                if (iUserPoints > 0)
                {
                    UserPointsBLL.UPointCheck(iUserID);
                }
                SetPoints(iUserPoints);
                sIsLogin = "******";
            }
            else
            {
                sIsLogin = "******";
            }
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取Authorization Code
            string usercancel = CYRequest.GetQueryString("usercancel", false);

            if (usercancel.Length == 0)
            {
                //通过Authorization Code获取Access Token
                string code         = CYRequest.GetQueryString("code", false);
                string state        = CYRequest.GetQueryString("state", false);
                string sMD5State    = CYRequest.GetQueryString("ms", false);
                string sMD5StateVal = ProvideCommon.MD5(state);
                if (sMD5State == sMD5StateVal)
                {
                    string redirect_uri = Server.UrlEncode(string.Format("http://game.dao50.com/Services/qqCallBack.aspx?ms={0}", sMD5StateVal));
                    string sAccessToken = QQLogin.GetAccessToken(redirect_uri, code);
                    string sOpenID      = QQLogin.GetOpenID(sAccessToken);
                    //判断openid是否存在
                    int iUserID = QQUserBLL.QQUserUseridSelByOpenID(sOpenID);
                    if (iUserID < 1000)
                    {
                        string sNickName = QQLogin.GetNickName(sAccessToken, sOpenID);
                        string sAccount  = QQLogin.GetAccount(sNickName);
                        int    iType     = 3;
                        int    iUID      = UserBll.UserReg(sAccount, sOpenID, iType);
                        if (-1 == iUID)
                        {
                            Response.Write("<script>alert('注册失败,请重试!location.href='http://www.dao50.com/';')</script>");
                            return;
                        }
                        else if (iUID > 999)
                        {
                            UserInfo uiObject = new UserInfo();
                            uiObject.Credennum = "";
                            uiObject.Answer    = "";
                            uiObject.Email     = "";
                            uiObject.Name      = sNickName;
                            uiObject.question  = "";
                            uiObject.regip     = ProvideCommon.GetRealIP();
                            uiObject.uid       = iUID;
                            UserInfoBLL.UserInfoAdd(uiObject);
                            string sPageUrl = Request.Url.ToString();
                            QQUserBLL.QQUserAdd(iUID, sOpenID, sPageUrl);
                            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, sOpenID, sKey);
                            string sJSUrl  = string.Format("<script src='{0}'></script><script src='{1}'></script>", sBBSUrl, sWWWUrl);
                            Response.Write(string.Format("{0}<script>alert('注册成功!');location.href='http://www.dao50.com/';</script>", sJSUrl));
                            return;
                        }
                    }
                    else
                    {
                        string sAccount = UserBll.AccountSel(iUserID).Trim();
                        int    iPoints  = UserPointsBLL.UPointAllSel(iUserID);
                        string sKey     = ConfigurationManager.AppSettings["UserValKey"].ToString();
                        string sUrl     = DiscuzUserI.BBSLogin(sAccount, sOpenID, sKey);
                        string sPageUrl = Request.Url.ToString();
                        LoginStateSet(sAccount, iUserID, sPageUrl);
                        string sCUrl  = WebConfig.BaseConfig.sWUrl;
                        string sJSUrl = string.Format("{0}/{1}?un={2}", sCUrl, "usercookie.aspx", sAccount);
                        Response.Write(string.Format("<script src='{0}'></script><script src='{1}'></script><script>location.href='{2}'</script>",
                                                     sUrl, sJSUrl, sCUrl));
                    }
                }
                else
                {
                    Response.Write("state err");
                }
            }
            else
            {
                Response.Write("<script>alert('登陆失败!location.href='http://www.dao50.com/';')</script>");
                return;
            }
        }
Beispiel #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (LoginSessionVal() || isLoginCookie())
     {
         if (Request.HttpMethod == "POST")
         {
             int    iPayUserID = GetUserID();                            //支付游戏的账号
             string sAccount   = CYRequest.GetFormString("gameaccount"); //充值游戏账号
             string sGameAbbre = CYRequest.GetFormString("gameservername");
             int    iUserID    = UserBll.UserIDSel(sAccount);            //充值游戏数字账号
             if (iUserID < 1000)
             {
                 //sMsg = "<script>alert('充值游戏账号不存在!');location.href='default.aspx';</script>";
                 Response.Redirect("PayGErr.aspx?err=201");
                 return;
             }
             else
             {
                 string sGameIsLogin = PayAll.ValUserLoginGame(sGameAbbre, iUserID.ToString());
                 if ("1" == sGameIsLogin)
                 {
                     //sMsg = "<script>alert('充值的游戏未创建角色,请先创建角色!谢谢!');location.href='default.aspx';</script>";
                     Response.Redirect("PayGErr.aspx?err=202");
                     return;
                 }
             }
             string sPhone      = CYRequest.GetFormString("gamephone");
             string sPayNums    = CYRequest.GetFormString("gamepaynums"); //平台币充值到游戏
             string sPayAccount = GetAccount();                           //支付平台币账号
             int    iPayPoints  = 0;
             int.TryParse(sPayNums, out iPayPoints);
             int iPUserPoints = UserPointsBLL.UPointAllSel(iPayUserID);
             if (iPUserPoints > 0)
             {
                 if (!UserPointsBLL.UPointCheck(iPayUserID))
                 {
                     //sMsg = "<script>alert('网络繁忙!武林币获取失败!请一会在试,谢谢!');location.href='default.aspx';</script>";
                     Response.Redirect("PayGErr.aspx?err=203");
                     return;
                 }
             }
             else
             {
                 //sMsg = "<script>alert('账号余额为0!请充值武林币!');location.href='default.aspx';</script>";
                 Response.Redirect("PayGErr.aspx?err=204");
                 return;
             }
             if (iPUserPoints >= iPayPoints && (iPayPoints > 79 || iPayUserID < 10000))
             {
                 string sReturn = string.Empty;
                 if (sGameAbbre.IndexOf("sq") == -1)
                 {
                     sReturn = PayAll.GamePay(sGameAbbre, iPayUserID, sPayAccount, iPayPoints, sPhone, iUserID);
                 }
                 else
                 {
                     string sRoleID = CYRequest.GetFormString("gamerole");
                     if (sRoleID == "" || sRoleID == "unsafe string")
                     {
                         //sMsg = "<script>alert('角色名错误!');location.href='default.aspx';</script>";
                         Response.Redirect("PayGErr.aspx?err=205");
                         return;
                     }
                     else
                     {
                         sReturn = PayAll.sqPay(sGameAbbre, iPayUserID, sPayAccount, iPayPoints, sPhone, iUserID, sRoleID);
                     }
                 }
                 string sRes = sReturn.Split('|')[0];
                 if (sRes == "0")
                 {
                     Server.Transfer(string.Format("PayGSucc.aspx?gname={0}&TranID={1}&gn={2}", sGameAbbre, sReturn.Split('|')[1], sGameAbbre));
                 }
                 else
                 {
                     //sMsg = "<script>alert('游戏充值失败,如有问题请联系客服!');location.href='default.aspx';</script>";
                     Response.Redirect("PayGErr.aspx?err=206");
                     return;
                 }
             }
             else
             {
                 SetPoints(iPUserPoints);
                 //sMsg = "<script>alert('账号余额不足!请充值武林币!');location.href='default.aspx';</script>";
                 Response.Redirect("PayPErr.aspx?err=204");
                 return;
             }
         }
     }
     else
     {
         //sMsg = "<script>alert('充值账号不存在!');location.href='default.aspx';</script>";
         Response.Redirect("PayGErr.aspx?err=201");
         return;
     }
 }
Beispiel #12
0
        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));
                }
            }
        }
Beispiel #13
0
        public int UserPointsSel(int iUserID)
        {
            int iUserPoints = UserPointsBLL.UPointAllSel(iUserID);

            return(iUserPoints);
        }
Beispiel #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string sTranID    = CYRequest.GetQueryString("TranID");
            int    iPayUserID = TransGBLL.TransSelGUserIDByTID(sTranID);

            sPayAccount = UserBll.AccountSel(iPayUserID).Trim();
            iGamePoints = TransGBLL.TransGamePointsSelByTID(sTranID);
            string sAbbre  = CYRequest.GetQueryString("gn");
            string sType   = CYRequest.GetQueryString("type");
            string sGAbbre = GameInfoBLL.GameInfoAbbreSel(sAbbre).Trim();

            switch (sGAbbre)
            {
            case "sssg":
                sGameName = "盛世三国";
                sGameM    = "银(注:1000银=1锭)";
                break;

            case "sxd":
                sGameName = "神仙道";
                sGameM    = "元宝";
                break;

            case "lj":
                sGameName = "龙将";
                sGameM    = "金币";
                break;

            case "yjxy":
                sGameName = "一剑轩辕";
                sGameM    = "元宝";
                break;

            case "dxz":
                sGameName = "大侠传";
                sGameM    = "黄金";
                break;

            case "djj":
                sGameName = "大将军";
                sGameM    = "黄金";
                break;

            case "txj":
                sGameName = "天行剑";
                sGameM    = "元宝";
                break;

            case "sjsg":
                sGameName = "神将三国";
                sGameM    = "元宝";
                break;

            case "tzcq":
                sGameName = "天尊传奇";
                sGameM    = "元宝";
                break;

            case "zsg":
                sGameName = "战三国";
                sGameM    = "元宝";
                break;

            case "wssg":
                sGameName = "无双三国";
                sGameM    = "元宝";
                break;

            case "by":
                sGameName = "霸域";
                sGameM    = "元宝";
                break;

            case "mxqy":
                sGameName = "冒险契约";
                sGameM    = "金币";
                break;

            case "swjt":
                sGameName = "神武九天";
                sGameM    = "元宝";
                break;

            case "gcld":
                sGameName = "攻城掠地";
                sGameM    = "金币";
                break;

            case "tjz":
                sGameName = "天劫传";
                sGameM    = "元宝";
                break;

            case "khbd":
                sGameName = "葵花宝典";
                sGameM    = "元宝";
                break;

            case "sglj":
                sGameName = "三国论剑";
                sGameM    = "通宝";
                break;

            case "hyjft":
                sGameName = "火影疾风坛";
                sGameM    = "金币";
                break;

            case "llsg":
                sGameName = "龙狼三国";
                sGameM    = "黄金";
                break;

            case "nslm":
                sGameName = "女神联盟";
                sGameM    = "钻石";
                break;

            case "rxzt":
                sGameName = "热血遮天";
                sGameM    = "元宝";
                break;

            case "ahxy":
                sGameName = "暗黑西游";
                sGameM    = "元宝";
                break;

            case "mhxy":
                sGameName = "梦回轩辕";
                sGameM    = "元宝";
                break;

            case "sxj":
                sGameName = "神仙劫";
                sGameM    = "元宝";
                break;

            case "zwj":
                sGameName = "最无极";
                sGameM    = "元宝";
                break;

            case "qxz":
                sGameName = "群侠传";
                sGameM    = "元宝";
                break;

            case "qszg":
                sGameName = "骑士战歌";
                sGameM    = "金币";
                break;

            case "wwsg":
                sGameName = "威武三国";
                sGameM    = "元宝";
                break;

            case "dntg":
                sGameName = "大闹天宫";
                sGameM    = "元宝";
                break;

            case "ahxx":
                sGameName = "暗黑修仙";
                sGameM    = "元宝";
                break;

            case "jjp":
                sGameName = "将军破";
                sGameM    = "元宝";
                break;

            case "sgyjz":
                sGameName = "三国英杰传";
                sGameM    = "金币";
                break;

            case "dtgzt":
                sGameName = "太古遮天";
                sGameM    = "元宝";
                break;

            case "dtgzter":
                sGameName = "太古遮天2";
                sGameM    = "元宝";
                break;
            }
            if ("q" == sType)
            {
                sAccount    = sPayAccount;
                iUserPoints = UserPointsBLL.UPointAllSel(iPayUserID);
            }
            else
            {
                int iUserID = GetUserID();
                if (iUserID > 999)
                {
                    iUserPoints = UserPointsBLL.UPointAllSel(iUserID);
                    sAccount    = GetAccount();
                }
            }
            SetPoints(iUserPoints);
            string sFromHost = GetFromHost();

            if (sFromHost.Length > 5)
            {
                string sServerNum         = sAbbre.Replace(sGAbbre, "");
                string sQueryString       = string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}", sTranID, sGameName, sServerNum, sPayAccount, sAccount, iGamePoints, iUserPoints, sGameM);
                string sEncodeQueryString = Server.UrlEncode(sQueryString);
                string sGoUrl             = string.Format("http://{0}/PayGSucc.html?{1}", sFromHost, sEncodeQueryString);
                Response.Redirect(sGoUrl, true);
                return;
            }
        }