Exemple #1
0
        public string GameHtml2(List <Games> list)
        {
            string HtmlStr = "";

            foreach (Games g in list)
            {
                //HtmlStr += "<dl><dt><span class=\"index_youxi_list_span_img\" onclick=\"window.open('/" + g.GameNo + "/Servers')\"><img src=\"" + g.IndexTjImg + "\" width=\"118\" height=\"86\" title=\"点击进入游戏\"></span></dt><dd class=\"first\"><p class=\"t\">" + "<a href=\"/" + g.GameNo + "/Servers\" target=\"_blank\">" + g.Name + "</a></p><p>类别:" + g.GameProperty.Split('|')[2] + "</p><p>状态:推荐</p></dd><dd class=\"second\"><span class=\"index_span_btn3\"><a href=\"/" + g.GameNo + "/\" target=\"_blank\">进入官网</a></span>" + "</dd></dl>";
                string tjqf = "#";
                if (g.tjqf > 0)
                {
                    GameServer gsTjqf = new ServersMananger().GetGameServer(g.tjqf);
                    tjqf = gsTjqf.QuFu;
                }
                HtmlStr += "<li><div class=\"posb\"><a href=\"/" + g.GameNo + "\"target=\"_blank\" class=\"img\"><img src=\"" + g.IndexTjImg + "\"></a><div class=\"det\"><strong>" + g.Name + "</strong><span>状态:推荐</span><a href=\"/" + g.GameNo + "/\" class=\"web\" target=\"_blank\">进入官网</a><div class=\"btn_box\"><a class=\"gnew\" href=\"/" + g.GameNo + "/LoginGame?S=" + tjqf + "\"target=\"_blank\">进入新区</a><button class=\"gmore\"></button></div></div></div></li>";
            }
            return(HtmlStr);
        }
Exemple #2
0
        public string TjGameHtml(List <Games> GameList)
        {
            string          HtmlStr = "";
            ServersMananger sm      = new ServersMananger();

            foreach (Games g in GameList)
            {
                //List<GameServer> listServer = sm.GetServersByGame(g.Id, 3);
                //listServer.ElementAt(0);
                string serverName = sm.GetGameServer(g.tjqf).Name;
                string qufu       = sm.GetGameServer(g.tjqf).QuFu;
                string p          = g.GameDesc;
                string type       = g.GameProperty.Split('|')[0];
                string descript   = p.Length < 50 ? p : p.Substring(0, 50);
                //HtmlStr += "<div class=\"hot_gm\"><a href=\"/" + g.GameNo + "/Servers\" target=\"_blank\"><img src=\"" + g.IndexHdImg + "\" width=\"230\" height=\"148\" title=\"点击进入游戏\"></a></div>";
                HtmlStr += "<li><img src=\"" + g.IndexHdImg + "\"style=\"width:210px;height:270px;\"/><div class=\"into\" style=\"display: block; bottom: -252px;\"><div class=\"into_wrap\"><div class=\"t\"><span class=\"nm\">" + g.Name + "</span><span class=\"rol\">" + type + "</span></div><p><a href=\"/" + g.GameNo + "\"target=\"_blank\">" + descript + "...</a></p><a href=\"/" + g.GameNo + "\" class=\"to\" target=\"_blank\">进入官网</a><div class=\"going\" id=\"JPYX_73_1\"><span class=\"sev\"><a class=\"lines\" href=\"/" + g.GameNo + "/LoginGame?S=" + qufu + "\" target=\"_blank\">" + serverName + "</a></span><a class=\"g\" href=\"/" + g.GameNo + "/LoginGame?S=" + qufu + "\" target=\"_blank\">go</a><span class=\"new\">new</span></div><div class=\"going\" id=\"JPYX_73_2\"><span class=\"sev\"><a class=\"lines\" href=\"/" + g.GameNo + "/LoginGame?S=1\" target=\"_blank\">双线1服</a></span><a class=\"g\" href=\"/" + g.GameNo + "/LoginGame?S=1\" target=\"_blank\">go</a><span class=\"ht\">hot</span></div></div><div class=\"into_bg\"></div></li>";
            }
            return(HtmlStr);
        }
Exemple #3
0
        public string DoTg()
        {
            GameUser gu       = new GameUser();
            string   UserName = Request["UserName"].Trim();
            string   Pwd      = Request["PWD"].Trim();

            if (!DevRegHel.RegName(UserName))
            {
                return("您输入的用户名不可用!");
            }
            if (!DevRegHel.RegPwd(Pwd))
            {
                return("您输入的密码不可用!");
            }
            if (alm.IsLock(BBRequest.GetIP()))
            {
                return("您暂时不能注册!");
            }
            try
            {
                string Action  = Request["Action"];
                int    Source  = 0;
                int    RegGame = 0;
                Games  g       = new Games();
                if (string.IsNullOrEmpty(Action))
                {
                    return("缺少参数!");
                }
                else if (alm.IsLock(Action) || alm.IsLock(BBRequest.GetIP()))
                {
                    return("参数错误!");
                }
                else
                {
                    int      s = 0;
                    string[] a = DESEncrypt.Decrypt(Action).Split('|');
                    string   b = a[0];
                    string   c = a[1];
                    if (int.TryParse(a[0], out s) && int.TryParse(a[1], out s))
                    {
                        gu = gum.GetGameUser(int.Parse(a[0]));
                        if (gu != null)
                        {
                            if (gu.IsSpreader > 0)
                            {
                                Source  = int.Parse(a[0]);
                                RegGame = int.Parse(a[1]);
                                g       = gm.GetGame(RegGame);
                                if (!(g.tjqf > 0))
                                {
                                    return("游戏还未设置推荐服务器!");
                                }
                            }
                            else
                            {
                                return("参数错误!");
                            }
                        }
                    }
                }
                gu = new GameUser(0, Request["UserName"], DESEncrypt.Md5(Request["PWD"], 32), "", "0", "", "", "", ""
                                  , "", "", "", "1", Source, "", 0, 0, 0, 0, 0, 0, DateTime.Now, DateTime.Now, 0, 0, 0, 0, BBRequest.GetIP(),
                                  "", RegGame, "", "");
                if (Session["annalID"] != null)
                {
                    string annalID = Session["annalID"].ToString().Trim();
                    if (!string.IsNullOrEmpty(annalID))
                    {
                        gu.annalID  = annalID;
                        gu.From_Url = "BengBeng";
                        string SelUrl = "http://www.bengbeng.com/reannal.php?adID=2618&annalID=" + annalID + "&idCode=" + gu.UserName + "&doukey=" + DESEncrypt.Md5("2618" + annalID + gu.UserName + "06bd24c6124b2dd7", 32);
                        string SleRes = Utils.GetWebPageContent(SelUrl);
                        Dictionary <string, string> Jd = Common.Json.JsonToArray(SleRes);
                        if (Jd["result"] != "1")
                        {
                            return(Jd["message"]);
                        }
                    }
                    else
                    {
                        return("缺少参数!");
                    }
                }
                if (gum.AddUser(gu))
                {
                    int    Id = gum.GetGameUser(UserName).Id;
                    sysmsg sm = new sysmsg();
                    sm.title  = "注册成功消息";
                    sm.type   = 2;
                    sm.userid = Id;
                    sm.fromid = 0;
                    sm.msg    = "恭喜您成功注册5577游戏账号,您可凭借此账号登录5577游戏旗下任何一款游戏,祝您游戏愉快。如果您在游戏过程中遇到任何问题,欢迎您致电客服咨询。";
                    smm.AddSysMsg(sm);
                    Session[Keys.SESSION_USER] = Id;
                    Session.Timeout            = 120;
                    GameServer gs = new ServersMananger().GetGameServer(g.tjqf);
                    return(g.GameNo + "|" + gs.QuFu);
                }
                else
                {
                    return("注册失败!");
                }
            }
            catch (Exception ex)
            {
                gu.IsLock   = 1;
                gu.UserDesc = "此用户为注册失败用户!失败原因:" + ex.Message;
                gum.UpdateUser(gu);
                //gum.DelGameUser(UserName);
                return("注册失败!错误:" + ex.Message);
            }
        }