Esempio n. 1
0
 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");
     }
 }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 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);
     }
 }
Esempio n. 6
0
        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;
                }
            }
        }
Esempio n. 7
0
        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);
                    }
                }
            }
        }
Esempio n. 8
0
        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);
                        }
                    }
                }
            }
        }
Esempio n. 9
0
        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));
                }
            }
        }