Esempio n. 1
0
        public ActionResult WdServers()
        {
            int UserId = BBRequest.GetUserId();

            g = gm.GetGame("jstm");
            if (UserId > 0)
            {
                GameUser gu = new GameUser();
                gu = gum.GetGameUser(UserId);
                ViewData["UserName"] = gu.UserName;
                ViewData["TjqfHref"] = "#";
                ViewData["TjqfName"] = "暂无";
                ViewData["LLHref"]   = "#";
                ViewData["LLName"]   = "最近没有玩游戏哦";
                OnlineLog ol = new OnlineLog();
                ol = new OnlineLogManager().GetLastLogin(UserId, g.Id);
                if (ol != null)
                {
                    GameServer Llqf = sm.GetGameServer(ol.ServerId);
                    ViewData["LLHref"] = "client://loadgame|http://www.5577yx.com/" + g.GameNo + "/LoginGame?S=" + Llqf.QuFu;
                    ViewData["LLName"] = Llqf.Name;
                }
                if (g.tjqf > 0)
                {
                    GameServer tjqf = sm.GetGameServer(g.tjqf);
                    ViewData["TjqfHref"] = "client://loadgame|http://www.5577yx.com/" + g.GameNo + "/LoginGame?S=" + tjqf.QuFu;
                    ViewData["TjqfName"] = tjqf.Name;
                }
                List <GameServer> gsList = new List <GameServer>();
                gsList = sm.GetServersByGame(g.Id);
                string            ServerHtml = "";
                List <GameServer> serverList = new List <GameServer>();
                foreach (GameServer gs in gsList)
                {
                    if (gs.State == 3 || gs.State == 4)
                    {
                        serverList.Add(gs);
                        //<li><div class="tpb"><a class="btn" href="http://www.5577yx.com/" + @g. + "/LoginGame?S=" + gs.QuFu + "\" target=\"_self\">" + gs.Name" onclick="gotoPlay('89','s86_86')" title="双线86区">[双线86区]</a></div></li>
                        ServerHtml += "<li><div class=\"tpb\"><a class=\"btn\" href=\"http://www.5577yx.com/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_self\">" + "[" + gs.Name + "]" + "</a></div></li>";
                    }
                }
                ViewData["gsHtml"] = ServerHtml;
                // ViewData["serverList"] = serverList;
                Utils.WriteCookie2("miniloader", "1", "5577yx.com");

                return(View());
            }
            else
            {
                return(RedirectToAction("Wd"));
            }
        }
Esempio n. 2
0
        public ActionResult WdServers()
        {
            int UserId = BBRequest.GetUserId();

            g = gm.GetGame("ahxx");
            if (UserId > 0)
            {
                GameUser gu = new GameUser();
                gu = gum.GetGameUser(UserId);
                ViewData["UserName"] = gu.UserName;
                ViewData["TjqfHref"] = "#";
                ViewData["TjqfName"] = "暂无";
                ViewData["LLHref"]   = "#";
                ViewData["LLName"]   = "最近没有玩游戏哦";
                OnlineLog ol = new OnlineLog();
                ol = new OnlineLogManager().GetLastLogin(UserId, g.Id);
                if (ol != null)
                {
                    GameServer Llqf = sm.GetGameServer(ol.ServerId);
                    ViewData["LLHref"] = "client://loadgame|http://www.5577yx.com/" + g.GameNo + "/LoginGame?S=" + Llqf.QuFu;
                    ViewData["LLName"] = Llqf.Name;
                }
                if (g.tjqf > 0)
                {
                    GameServer tjqf = sm.GetGameServer(g.tjqf);
                    ViewData["TjqfHref"] = "client://loadgame|http://www.5577yx.com/" + g.GameNo + "/LoginGame?S=" + tjqf.QuFu;
                    ViewData["TjqfName"] = tjqf.Name;
                }
                List <GameServer> gsList = new List <GameServer>();
                gsList = sm.GetServersByGame(g.Id);
                //string ServerHtml = "";
                List <GameServer> serverList = new List <GameServer>();
                foreach (GameServer gs in gsList)
                {
                    if (gs.State == 3 || gs.State == 4)
                    {
                        serverList.Add(gs);
                        //ServerHtml += "<a href=\"client://loadgame|http://www.5577yx.com/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_self\">" + gs.Name + "</a>";
                    }
                }
                //ViewData["gsHtml"] = ServerHtml;
                ViewData["serverList"] = serverList;
                Utils.WriteCookie2("miniloader", "1", "5577yx.com");

                return(View());
            }
            else
            {
                return(RedirectToAction("Wd"));
            }
        }
Esempio n. 3
0
        public void GetGetOnlineLog(HttpContext context)
        {
            List <OnlineLog> list = new List <OnlineLog>();

            list = new OnlineLogManager().GetOnlineLog(GetUser(context).Id, 2);
            string HtmlStr = "";

            foreach (OnlineLog ol in list)
            {
                Games      g  = gm.GetGame(ol.GameId);
                GameServer gs = sm.GetGameServer(ol.ServerId);
                HtmlStr += " <span ><a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_blank\">" + gm.GetGame(ol.GameId).Name + "-" + sm.GetGameServer(ol.ServerId).Name + " </a></span><br/>";
            }
            context.Response.Write(HtmlStr);
        }
Esempio n. 4
0
        public ActionResult Left()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                ViewData["UserNameed"] = gu.UserName;
                ViewData["Money"]      = gu.Money;
                ViewData["Photo"]      = gu.Photo + ".jpg";
                List <OnlineLog> Ollist = new List <OnlineLog>();
                Ollist = new OnlineLogManager().GetOnlineLog(gu.Id, 2);
                string HtmlStr = "";
                foreach (OnlineLog ol in Ollist)
                {
                    Games      g  = gm.GetGame(ol.GameId);
                    GameServer gs = sm.GetGameServer(ol.ServerId);
                    HtmlStr += " <li ><a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_blank\" class=\"dub\"><span>" + sm.GetGameServer(ol.ServerId).Name + "</span><span class=\"g\">go</span></a>" + "<a class=\"n\" href=\"#\" target=\"_blank\">" + gm.GetGame(ol.GameId).Name + "</a></li>";
                }
                ViewData["OnlineLogHtml"] = HtmlStr;
                ViewData["LoginStyle"]    = "style=\"display: none;\"";
            }
            else
            {
                if (Utils.GetCookie("6qmgamesame") != "")
                {
                    string value    = Utils.GetCookie("6qmgamesame");
                    string UserName = DESEncrypt.DesDecrypt(value.Split('|')[0]);
                    string PWD      = DESEncrypt.DesDecrypt(value.Split('|')[1]);
                    ViewData["UserName"] = UserName;
                    ViewData["PWD"]      = PWD;
                }
                ViewData["LoginedStyle"] = "style=\"display: none;\"";
            }
            List <GameServer> list = new List <GameServer>();

            list = sm.GetNewsServer(6);
            ViewData["NewServerHtml"] = hh.GetNewServerHtml(list);
            return(PartialView());
        }
Esempio n. 5
0
        public ActionResult WdServers()
        {
            int UserId = BBRequest.GetUserId();

            g = gm.GetGame("nslm");
            if (UserId > 0)
            {
                GameUser gu = new GameUser();
                gu = gum.GetGameUser(UserId);
                ViewData["UserName"] = gu.UserName;
                ViewData["TjqfHref"] = "#";
                ViewData["TjqfName"] = "暂无推荐区服";
                ViewData["LLHref"]   = "#";
                ViewData["LLName"]   = "暂无记录";
                OnlineLog ol = new OnlineLog();
                ol = new OnlineLogManager().GetLastLogin(UserId, g.Id);
                if (ol != null)
                {
                    GameServer Llqf = sm.GetGameServer(ol.ServerId);
                    ViewData["LLHref"] = "/" + g.GameNo + "/LoginGame?S=" + Llqf.QuFu;
                    ViewData["LLName"] = Llqf.Name;
                }
                if (g.tjqf > 0)
                {
                    GameServer tjqf = sm.GetGameServer(g.tjqf);
                    ViewData["TjqfHref"] = "/" + g.GameNo + "/LoginGame?S=" + tjqf.QuFu;
                    ViewData["TjqfName"] = tjqf.Name;
                }
                List <GameServer> gsList = new List <GameServer>();
                gsList = sm.GetServersByGame(g.Id);
                string ServerHtml = "";
                foreach (GameServer gs in gsList)
                {
                    switch (gs.State)
                    {
                    case 1:
                        ServerHtml += "<li><a  class=\"s2\"><span>" + gs.Name + "</span>即将开启</a></li>";
                        break;

                    case 2:
                        ServerHtml += "<li><a  class=\"s1\"><span>" + gs.Name + "</span>停服维护</a></li>";
                        break;

                    case 3:
                        ServerHtml += "<li><a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_game\" class=\"s6\"><span>" + gs.Name + "</span>流畅</a></li>";
                        break;

                    case 4:
                        ServerHtml += "<li><a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_game\" class=\"s4\"><span>" + gs.Name + "</span>火爆</a></li>";
                        break;

                    default:
                        break;
                    }
                }
                ViewData["gsHtml"] = ServerHtml;

                Utils.WriteCookie2("miniloader", "1", "5577yx.com");

                return(View());
            }
            else
            {
                return(RedirectToAction("Wd"));
            }
        }
Esempio n. 6
0
        public ActionResult WdServers()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = new GameUser();
                gu = gum.GetGameUser(UserId);
                ViewData["UserName"] = gu.UserName;
                ViewData["TjqfHref"] = "#";
                ViewData["TjqfName"] = "暂无推荐区服";
                ViewData["LLHref"]   = "#";
                ViewData["LLName"]   = "暂无记录";
                OnlineLog ol = new OnlineLog();
                ol = new OnlineLogManager().GetLastLogin(UserId, g.Id);
                if (ol != null)
                {
                    GameServer Llqf = sm.GetGameServer(ol.ServerId);
                    if (Llqf.State == 1 || Llqf.State == 2)
                    {
                        ViewData["LLHref"] = "#";
                    }
                    else
                    {
                        ViewData["LLHref"] = gm.LoginUrl(g.Id, UserId, Llqf.Id, 1);
                    }
                    ViewData["LLName"] = Llqf.Name;
                }
                if (g.tjqf > 0)
                {
                    GameServer tjqf = sm.GetGameServer(g.tjqf);
                    ViewData["TjqfHref"] = gm.LoginUrl(g.Id, UserId, tjqf.Id, 1);
                    ViewData["TjqfName"] = tjqf.Name;
                }
                List <GameServer> gsList = new List <GameServer>();
                gsList = sm.GetServersByGame(g.Id);
                string ServerHtml = "";
                foreach (GameServer gs in gsList)
                {
                    switch (gs.State)
                    {
                    case 1:
                        ServerHtml += "<a><span class=\"yellow\"></span>" + gs.Name + "</a>";
                        break;

                    case 2:
                        ServerHtml += "<a><span class=\"gray\"></span>" + gs.Name + "</a>";
                        break;

                    case 3:
                        ServerHtml += "<a href=\"" + gm.LoginUrl(g.Id, UserId, gs.Id, 1) + "\"><span class=\"green\"></span>" + gs.Name + "</a>";
                        break;

                    case 4:
                        ServerHtml += "<a href=\"" + gm.LoginUrl(g.Id, UserId, gs.Id, 1) + "\"><span class=\"red\"></span>" + gs.Name + "</a>";
                        break;

                    default:
                        break;
                    }
                }
                ViewData["gsHtml"] = ServerHtml;

                return(View());
            }
            else
            {
                return(RedirectToAction("Wd"));
            }
        }