예제 #1
0
 public void CheckMoney(HttpContext context)
 {
     int GameId = int.Parse(context.Request["GameId"]);
     int Type = int.Parse(context.Request["Type"]);
     string SelMoney = context.Request["SelMoney"];
     string TxtMoney = context.Request["TxTMoney"];
     int PayType = int.Parse(context.Request["PayType"]);
     Games game = new Games();
     GamesManager gm = new GamesManager();
     game = gm.GetGame(GameId);
     float Money = string.IsNullOrEmpty(TxtMoney) ? float.Parse(SelMoney.Trim()) : float.Parse(TxtMoney.Trim());
     float PayMoney = 0;
     switch (PayType)
     {
         case 7:
             PayMoney = Money / 10;
             break;
         case 5:
         case 9:
             PayMoney = Money * 0.8F;
             break;
         case 2:
         case 3:
         case 4:
             PayMoney = Money * 0.9F;
             break;
         default:
             PayMoney = Money;
             break;
     }
     string GameMoney = Type == 1 ? PayMoney * game.GameMoneyScale + "游戏币" : PayMoney * 10 + "平台币";
     context.Response.Write(Money + "|" + GameMoney);
 }
예제 #2
0
 /// <summary>
 /// 添加游戏信息
 /// </summary>
 /// <param name="g">游戏</param>
 /// <returns>返回是否添加成功</returns>
 public Boolean AddGame(Games g)
 {
     try
     {
         string sql = "insert into Games(name,gameno,gamelistimg,indextjimg,indexhbimg,indexhdimg,hdimg,gamedesc," +
        "gamecom,gamebbs,newhand,is_top,is_red,is_hot,is_slide,is_lock,sort_id,gamemoneyscale,gamemoneyname,isrole,pic1," +
        "pic2,pic3,pic4,gameproperty,tjqf,game_url_g,game_url_hd,game_url_xzq)"
        + "values (@Name,@GameNo,@GameListImg,@IndexTjImg,@IndexHbImg,@IndexHdImg,@HdImg,@GameDesc,@GameCom,@GameBBS," +
         "@NewHand,@Is_Top,@Is_Red,@Is_Hot,@Is_Slide,@Is_Lock,@Sort_Id,@GameMoneyScale,@GameMoneyName,@IsRole,@Pic1,@Pic2," +
         "@Pic3,@Pic4,@GameProperty,@tjqf,@game_url_g,@game_url_hd,@game_url_xzq)";
         SqlParameter[] sp = new SqlParameter[]
         {
              new SqlParameter("@Name",g.Name),
             new SqlParameter("@GameNo",g.GameNo),
             new SqlParameter("@GameListImg",string.IsNullOrEmpty(g.GameListImg)?"":g.GameListImg),
             new SqlParameter("@IndexTjImg",string.IsNullOrEmpty(g.IndexTjImg)?"":g.IndexTjImg),
             new SqlParameter("@IndexHbImg",string.IsNullOrEmpty(g.IndexHbImg)?"":g.IndexHbImg),
             new SqlParameter("@IndexHdImg",string.IsNullOrEmpty(g.IndexHdImg)?"":g.IndexHdImg),
             new SqlParameter("@HdImg",string.IsNullOrEmpty(g.HdImg)?"":g.HdImg),
             new SqlParameter("@GameDesc",string.IsNullOrEmpty(g.GameDesc)?"":g.GameDesc),
             new SqlParameter("@GameCom",string.IsNullOrEmpty(g.GameCom)?"":g.GameCom),
             new SqlParameter("@GameBBS",string.IsNullOrEmpty(g.GameBBS)?"":g.GameBBS),
             new SqlParameter("@NewHand",string.IsNullOrEmpty(g.NewHand)?"":g.NewHand),
             new SqlParameter("@Is_Top", g.Is_Top),
             new SqlParameter("@Is_Red",g.Is_Red),
             new SqlParameter("@Is_Hot",g.Is_Hot),
             new SqlParameter("@Is_Slide",g.Is_Slide),
             new SqlParameter("@Is_Lock",g.Is_Lock),
             new SqlParameter("@Sort_Id",g.Sort_Id),
             new SqlParameter("@GameMoneyScale",g.GameMoneyScale),
             new SqlParameter("@GameMoneyName",string.IsNullOrEmpty(g.GameMoneyName)?"":g.GameMoneyName),
             new SqlParameter("@IsRole",g.IsRole),
             new SqlParameter("@Pic1",string.IsNullOrEmpty(g.Pic1)?"":g.Pic1),
             new SqlParameter("@Pic2",string.IsNullOrEmpty(g.Pic2)?"":g.Pic2),
             new SqlParameter("@Pic3",string.IsNullOrEmpty(g.Pic3)?"":g.Pic3),
             new SqlParameter("@Pic4",string.IsNullOrEmpty(g.Pic4)?"":g.Pic4),
             new SqlParameter("@GameProperty",string.IsNullOrEmpty(g.GameProperty)?"":g.GameProperty),
             new SqlParameter("@tjqf",g.tjqf),
             new SqlParameter("@game_url_g",string.IsNullOrEmpty(g.game_url_g)?"":g.game_url_g),
             new SqlParameter("@game_url_hd",string.IsNullOrEmpty(g.game_url_hd)?"":g.game_url_hd),
             new SqlParameter("@game_url_xzq",string.IsNullOrEmpty(g.game_url_xzq)?"":g.game_url_xzq),
         };
         return db.ExecuteNonQuery(sql, sp);
     }
     catch (SqlException ex)
     {
         throw new Exception("数据库异常!原因:" + ex.Message);
     }
     catch (Exception ex)
     {
         throw new Exception("未知异常!原因:" + ex.Message);
     }
 }
예제 #3
0
        public Boolean DoAddGame()
        {
            if (Session[Keys.SESSION_ADMIN_INFO] == null)
            {
                return false;
            }
            else
            {
                Master master = Session[Keys.SESSION_ADMIN_INFO] as Master;
                if (rcm.GetRoleCompetence(master.RoleId, 11232))
                {
                    Games g = new Games();
                    g.Id = int.Parse(Request["GameId"]);
                    g.GameNo = Request["GameNo"];
                    g.Name = Request["GameName"];
                    g.tjqf = int.Parse(Request["tjqf"]);
                    g.GameProperty = Request["GameLx"] + "|" + Request["GameTz"] + "|" + Request["GameCzlx"] + "|" + Request["GameHm"] + "|" + Request["GameSfms"];
                    g.Is_Red = Request["IsRed"] == "on" ? 1 : 0;
                    g.Is_Hot = Request["IsHot"] == "on" ? 1 : 0;
                    g.Is_Lock = Request["IsLock"] == "on" ? 1 : 0;
                    g.Sort_Id = int.Parse(Request["SortId"]);
                    g.GameMoneyScale = int.Parse(Request["GameMoneyScale"]);
                    g.GameMoneyName = Request["GameMoneyName"];
                    g.GameCom = Request["GameCom"];
                    g.GameBBS = Request["GameBBS"];
                    g.NewHand = Request["NewHand"];
                    g.Pic1 = Request["Pic1"];
                    g.Pic2 = Request["Pic2"];
                    g.Pic3 = Request["Pic3"];
                    g.Pic4 = Request["Pic4"];
                    g.GameListImg = Request["GameListImg"];
                    g.IndexTjImg = Request["IndexTjImg"];
                    g.IndexHbImg = Request["IndexHbImg"];
                    g.IndexHdImg = Request["IndexHdImg"];
                    g.game_url_hd = Request["game_url_hd"];
                    g.game_url_xzq = Request["game_url_xzq"];
                    g.GameDesc = Request["GameDesc"];

                    return gm.AddGame(g);
                }
                else
                {
                    return false;
                }
            }
        }
예제 #4
0
        public ActionResult Index()
        {
            g = gm.GetGame("xxas");
            List<GameServer> gsList = new List<GameServer>();
            gsList = sm.GetServersByGame(g.Id, 5);
            string ServerHtml = "";
            foreach (GameServer gs in gsList)
            {
                ServerHtml += "<li><a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\"><span>" + gs.Name + "</span><span class=\"status\">火爆</span></a></li>";
            }
            ViewData["ServersHtml"] = ServerHtml;
            ViewData["GameNo"] = g.GameNo;
            ViewData["TjqfHref"] = "#";
            ViewData["TjqfName"] = "暂无推荐区服";
            ViewData["GameDes"] = g.GameDesc;
            if (g.tjqf > 0)
            {
                GameServer tjqf = sm.GetGameServer(g.tjqf);
                ViewData["TjqfHref"] = "/" + g.GameNo + "/LoginGame?S=" + tjqf.QuFu;
                ViewData["TjqfName"] = tjqf.Name;
            }

            List<News> Newlist = new List<News>();
            Newlist = nm.GetNews(5, 4, g.Id);
            string NewsHtml = "";
            foreach (News n in Newlist)
            {
                NewsHtml += "<li><span class=\"date\">" + n.ReleaseTime.ToString("yyyy-MM-dd") + "</span><a href=\"/NewsCenter/News?N=" + n.Id + "\">[新闻]" + (n.Title.Length < 25 ? n.Title : n.Title.Substring(0, 25)) + "</a></li>";
            }
            ViewData["News"] = NewsHtml;

            List<News> GGNewlist = new List<News>();
            GGNewlist = nm.GetNews(5, 2, g.Id);
            string GGNewsHtml = "";
            foreach (News n in GGNewlist)
            {
                GGNewsHtml += "<li><span class=\"date\">" + n.ReleaseTime.ToString("yyyy-MM-dd") + "</span><a href=\"/NewsCenter/News?N=" + n.Id + "\">[公告]" + (n.Title.Length < 25 ? n.Title : n.Title.Substring(0, 25)) + "</a></li>";
            }
            ViewData["GGNews"] = GGNewsHtml;
            return View();
        }
예제 #5
0
        public ActionResult Index()
        {
            g = gm.GetGame("gjqx");
            List<GameServer> gsList = new List<GameServer>();
            gsList = sm.GetServersByGame(g.Id);
            ViewData["ServersHtml"] = hh.ServersHtml(gsList);
            ViewData["GameNo"] = g.GameNo;
            ViewData["TjqfHref"] = "#";
            ViewData["TjqfName"] = "暂无推荐区服";
            ViewData["GameDes"] = g.GameDesc;
            if (g.tjqf > 0)
            {
                GameServer tjqf = sm.GetGameServer(g.tjqf);
                ViewData["TjqfHref"] = "/" + g.GameNo + "/LoginGame?S=" + tjqf.QuFu;
                ViewData["TjqfName"] = tjqf.Name;
            }
            ViewData["YqLink"] = hh.YqLinkHtml("20");

            List<News> Newlist = new List<News>();
            Newlist = nm.GetNews(7, 2, g.Id);
            string NewsHtml = "";
            foreach (News n in Newlist)
            {
                NewsHtml += "<li><span class=\"date fr\">" + n.ReleaseTime + "</span>[公告]<a href=\"/NewsCenter/News?N=" + n.Id + "\" target=\"_self\"title=\"" + n.Title + "\">" + (n.Title.Length < 15 ? n.Title : n.Title.Substring(0, 15)) + "</strong></a></li>";
            }
            ViewData["News"] = NewsHtml;

            List<News> GGNewlist = new List<News>();
            GGNewlist = nm.GetNews(7, 4, g.Id);
            string GGNewsHtml = "";
            foreach (News n in GGNewlist)
            {
                GGNewsHtml += "<li><span class=\"date fr\">" + n.ReleaseTime + "</span>[公告]<a href=\"/NewsCenter/News?N=" + n.Id + "\" target=\"_self\"title=\"" + n.Title + "\">" + (n.Title.Length < 15 ? n.Title : n.Title.Substring(0, 15)) + "</strong></a></li>";
            }
            ViewData["GGNews"] = GGNewsHtml;
            return View();
        }
예제 #6
0
        public ActionResult EditGame(int GameId)
        {
            if (Session[Keys.SESSION_ADMIN_INFO] == null)
            {
                return RedirectToAction("Login", "Admin");
            }
            else
            {
                Master master = Session[Keys.SESSION_ADMIN_INFO] as Master;
                if (rcm.GetRoleCompetence(master.RoleId, 11231))
                {
                    Games g = new Games();
                    g = gm.GetGame(GameId);
                    ViewData["GameId"] = GameId;
                    ViewData["GameNo"] = g.GameNo;
                    ViewData["GameName"] = g.Name;
                    ViewData["tjqf"] = g.tjqf;
                    string[] Str = g.GameProperty.Split('|');
                    ViewData["GameLx"] = Str[0];
                    ViewData["GameTz"] = Str[1];
                    ViewData["GameCzlx"] = Str[2];
                    ViewData["GameHm"] = Str[3];
                    ViewData["GameSfms"] = Str[4];
                    ViewData["IsRed"] = g.Is_Red == 1 ? true : false;
                    ViewData["IsHot"] = g.Is_Hot == 1 ? true : false;
                    ViewData["IsLock"] = g.Is_Lock == 1 ? true : false;
                    ViewData["SortId"] = g.Sort_Id;
                    ViewData["GameMoneyScale"] = g.GameMoneyScale;
                    ViewData["GameMoneyName"] = g.GameMoneyName;
                    ViewData["GameCom"] = g.GameCom;
                    ViewData["GameBBS"] = g.GameBBS;
                    ViewData["NewHand"] = g.NewHand;
                    ViewData["Pic1"] = g.Pic1;
                    ViewData["Pic2"] = g.Pic2;
                    ViewData["Pic3"] = g.Pic3;
                    ViewData["Pic4"] = g.Pic4;
                    ViewData["GameListImg"] = g.GameListImg;
                    ViewData["IndexTjImg"] = g.IndexTjImg;
                    ViewData["IndexHbImg"] = g.IndexHbImg;
                    ViewData["IndexHdImg"] = g.IndexHdImg;
                    ViewData["game_url_hd"] = g.game_url_hd;
                    ViewData["NewHand"] = g.NewHand;
                    ViewData["game_url_xzq"] = g.game_url_xzq;
                    ViewData["GameDesc"] = g.GameDesc;

                    GameConfig gc = new GameConfig();
                    gc = gcm.GetGameConfig(GameId);
                    if (gc != null)
                    {
                        ViewData["AgentId"] = gc.AgentId;
                        ViewData["LoginCom"] = gc.LoginCom;
                        ViewData["PayCom"] = gc.PayCom;
                        ViewData["ExistCom"] = gc.ExistCom;
                        ViewData["LoginTicket"] = gc.LoginTicket;
                        ViewData["PayTicket"] = gc.PayTicket;
                        ViewData["SelectTicket"] = gc.SelectTicket;
                        ViewData["FcmTicket"] = gc.FcmTicket;
                    }
                    ViewData["Function"] = "UpdateData('/Game/UpdateGame')";
                    return View("Game");
                }
                else
                {
                    return RedirectToAction("Login", "Admin");
                }
            }
        }
예제 #7
0
        public Boolean UpdateGame()
        {
            if (Session[Keys.SESSION_ADMIN_INFO] == null)
            {
                return false;
            }
            else
            {
                Master master = Session[Keys.SESSION_ADMIN_INFO] as Master;
                if (rcm.GetRoleCompetence(master.RoleId, 11231))
                {
                    Games g = new Games();
                    g.Id = int.Parse(Request["GameId"]);
                    g.GameNo = Request["GameNo"];
                    g.Name = Request["GameName"];
                    g.tjqf = int.Parse(Request["tjqf"]);
                    g.GameProperty = Request["GameLx"] + "|" + Request["GameTz"] + "|" + Request["GameCzlx"] + "|" + Request["GameHm"] + "|" + Request["GameSfms"];
                    g.Is_Red = Request["IsRed"] == "on" ? 1 : 0;
                    g.Is_Hot = Request["IsHot"] == "on" ? 1 : 0;
                    g.Is_Lock = Request["IsLock"] == "on" ? 1 : 0;
                    g.Sort_Id = int.Parse(Request["SortId"]);
                    g.GameMoneyScale = int.Parse(Request["GameMoneyScale"]);
                    g.GameMoneyName = Request["GameMoneyName"];
                    g.GameCom = Request["GameCom"];
                    g.GameBBS = Request["GameBBS"];
                    g.NewHand = Request["NewHand"];
                    g.Pic1 = Request["Pic1"];
                    g.Pic2 = Request["Pic2"];
                    g.Pic3 = Request["Pic3"];
                    g.Pic4 = Request["Pic4"];
                    g.GameListImg = Request["GameListImg"];
                    g.IndexTjImg = Request["IndexTjImg"];
                    g.IndexHbImg = Request["IndexHbImg"];
                    g.IndexHdImg = Request["IndexHdImg"];
                    g.game_url_hd = Request["game_url_hd"];
                    g.game_url_xzq = Request["game_url_xzq"];
                    g.GameDesc = Request["GameDesc"];

                    GameConfig gc = new GameConfig();
                    gc.AgentId = Request["AgentId"];
                    gc.LoginCom = Request["LoginCom"];
                    gc.PayCom = Request["PayCom"];
                    gc.ExistCom = Request["ExistCom"];
                    gc.LoginTicket = Request["LoginTicket"];
                    gc.PayTicket = Request["PayTicket"];
                    gc.SelectTicket = Request["SelectTicket"];
                    gc.FcmTicket = Request["FcmTicket"];
                    gc.GameId = int.Parse(Request["GameId"]);
                    if (gcm.GetGameConfig(g.Id) == null)
                    {
                        return (gcm.AddGameConfig(gc) && gm.UpdateGame(g));
                    }
                    else
                    {
                        return (gcm.UpdateGameConfig(gc) && gm.UpdateGame(g));
                    }
                }
                else
                {
                    return false;
                }
            }
        }
예제 #8
0
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Xxas()
        {
            game = games.GetGame("xxas");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #9
0
 /// <summary>
 /// 添加游戏信息
 /// </summary>
 /// <param name="g">游戏</param>
 /// <returns>返回是否添加成功</returns>
 public Boolean AddGame(Games g)
 {
     return gss.AddGame(g);
 }
예제 #10
0
        public ActionResult InitServers(string GameNo)
        {
            ViewData["GameCenterOn"] = "current ";
            g = gm.GetGame(GameNo);
            ViewData["Title"] = g.Name + "服务器列表";
            ViewData["IndexHbImg"] = g.IndexHbImg;
            string NewsGG = "";
            List<News> GGlist = new List<News>();
            GGlist = nm.GetNews(5, 2, g.Id);
            foreach (News n in GGlist)
            {
                NewsGG += "<li><span style=\"margin: 20px;\"><a href=\"/NewsCenter/News?N=" + n.Id + "\" style=\"text-decoration: none;\">" + n.Title + "</a></span></li>";
            }
            ViewData["NewsGG"] = NewsGG;
            string[] Str = g.GameProperty.Split('|');
            ViewData["GameLx"] = Str[0];
            ViewData["GameTz"] = Str[1];
            ViewData["GameCzlx"] = Str[2];
            ViewData["GameHm"] = Str[3];
            ViewData["GameSfms"] = Str[4];

            string ServerHtml = "";
            string SelHtml = "";
            gsList = sm.GetServersByGame(g.Id);
            for (int i = 0; i < Math.Ceiling(gsList.Count / 20f); i++)
            {
                SelHtml += " <a>" + (i * 20 + 1) + "-" + ((i + 1) * 20) + "</a>";
                ServerHtml += "<div style=\"display: none\">";
                for (int j = (i * 20); j <= ((20 * i + 19) >= gsList.Count ? gsList.Count - 1 : (20 * i + 19)); j++)
                {
                    if (gsList[j].StartTime < DateTime.Now && gsList[j].State == 1)
                    {
                        gsList[j].State = 4;
                        sm.UpdateServer(gsList[j]);
                    }
                    else if (gsList[j].StartTime > DateTime.Now && gsList[j].State != 1)
                    {
                        gsList[j].State = 1;
                        sm.UpdateServer(gsList[j]);
                    }
                    switch (gsList[j].State)
                    {
                        case 1:
                            ServerHtml += "<a class=\"li_jikai\">" + gsList[j].Name + "</a>";
                            break;
                        case 2:
                            ServerHtml += "<a class=\"li_weihu\">" + gsList[j].Name + "</a>";
                            break;
                        case 3:
                            ServerHtml += "<a class=\"li_liuchang\" href=\"/" + g.GameNo + "/LoginGame?S=" + gsList[j].QuFu + "\" target=\"_blank\">" + gsList[j].Name + "</a>";
                            break;
                        case 4:
                            ServerHtml += "<a class=\"li_hot\" href=\"/" + g.GameNo + "/LoginGame?S=" + gsList[j].QuFu + "\" target=\"_blank\">" + gsList[j].Name + "</a>";
                            break;
                        default:
                            break;
                    }
                }
                ServerHtml += "</div>";
            }
            ViewData["SelHtml"] = SelHtml;
            ViewData["ServerHtml"] = ServerHtml;

            string ZlHtml = "";
            List<News> zlList = new List<News>();
            zlList = nm.GetNews(200, 5, g.Id);
            foreach (News zl in zlList)
            {
                ZlHtml += "<li><a href=\"/NewsCenter/News?N=" + zl.Id + "\" target=\"_blank\">" + zl.Title + "</a></li>";
            }
            ViewData["ZlHtml"] = ZlHtml;

            ViewData["Pic1"] = g.Pic1;
            ViewData["Pic2"] = g.Pic2;
            ViewData["Pic3"] = g.Pic3;
            ViewData["Pic4"] = g.Pic4;

            ViewData["GameCom"] = g.GameCom;
            ViewData["BBS"] = g.GameBBS;
            ViewData["game_url_hd"] = g.game_url_hd;
            ViewData["Dlq"] = string.IsNullOrEmpty(g.game_url_xzq) ? "" : "<a href=\"" + g.game_url_xzq + "\" class=\"dlq\" target=\"_blank\">&gt; 登录器地址 </a>";
            return View("~/Views/GameCenter/GameServer.cshtml");
        }
예제 #11
0
 public string DoGetGift(int CardId, string CardNum)
 {
     cardsname cn = new cardsname();
     cn = cm.GetCard(CardId);
     g = gm.GetGame(cn.gameid);
     if (cm.GetCardCount(CardId) < 1)
     {
         return "<span><b>温馨提示:</b><lable style=\"color:red\">该新手卡已经被抢空啦!</span>";
     }
     int UserId = BBRequest.GetUserId();
     if (UserId <= 0)
     {
         if (Utils.GetCookie("6qmgamesame") != "")
         {
             string value = Utils.GetCookie("6qmgamesame");
             string UserName = DESEncrypt.DesDecrypt(value.Split('|')[0]);
             string PWD = DESEncrypt.DesDecrypt(value.Split('|')[1]);
             GameUser gu = gum.GetGameUser(UserName, DESEncrypt.Md5(PWD, 32));
             if (gu != null)
             {
                 BBRequest.WriteUserId(gu.Id);
                 gum.UpdateLastLogin(gu.Id);
                 UserId = BBRequest.GetUserId();
             }
             else
             {
                 return "<span><b>温馨提示:</b><lable style=\"color:red\">登录后才可领取!</lable></span>";
             }
         }
         else
         {
             return "<span><b>温馨提示:</b><lable style=\"color:red\">登录后才可领取!</lable></span>";
         }
     }
     if (CardNum == null)
     {
         if (cm.ExitCardLog(UserId, CardId))
         {
             return "<span id=\"showno\" ><b>温馨提示:</b><lable style=\"color:red\">您已经领取过该新手卡啦!</span>";
         }
         else
         {
             cards c = new cards();
             c = cm.GetCards(CardId);
             CardNum = c.cardnum;
             cardslog cl = new cardslog();
             cl.userid = UserId;
             cl.cardid = CardId;
             cl.cardsid = c.id;
             cm.AddCardLog(cl);
             cm.UpdateCard(1, c.id);
             sysmsg sysmsg1 = new sysmsg();
             sysmsg1.msgid = 0;
             sysmsg1.title = "新手卡信息:" + cn.cardname;
             sysmsg1.type = 2;
             sysmsg1.userid = UserId;
             sysmsg1.msg = "领取新手卡成功!卡号:" + c.cardnum;
             sysmsg1.fromid = 0;
             new SysMsgManager().AddSysMsg(sysmsg1);
             return "<span id=\"showno\" ><b>领取成功!激活码:</b> <label id=\"lblno\" style=\"color:red\"> " + CardNum + " </label></span>";
         }
     }
     else
     {
         return "<span id=\"showno\" ><b>领取成功!激活码:</b> <label id=\"lblno\" style=\"color:red\"> " + CardNum + " </label></span>";
     }
 }
예제 #12
0
파일: Game_Xyb.cs 프로젝트: Zane0816/5577yx
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Xyb()
        {
            game = games.GetGame("xyb");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #13
0
파일: Game_Ftz.cs 프로젝트: Zane0816/5577yx
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Ftz()
        {
            game = games.GetGame("ftz");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #14
0
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 初始化接口参数
        /// </summary>
        public Game_Sjsg()
        {
            game = games.GetGame("sjsg");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #15
0
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        public Game_Jhwj()
        {
            game = games.GetGame("jhwj");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #16
0
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Dpqk()
        {
            game = games.GetGame("dpqk");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #17
0
 /// <summary>
 /// 更新游戏信息
 /// </summary>
 /// <param name="g">游戏</param>
 /// <returns>返回是否更新成功</returns>
 public Boolean UpdateGame(Games g)
 {
     return gss.UpdateGame(g);
 }
예제 #18
0
        /// <summary>
        /// 根据订单处理充值
        /// </summary>
        /// <param name="OrderNo">订单号</param>
        /// <returns>返回处理结果</returns>
        public string PayManager(string OrderNo)
        {
            GameUserServers gus = new GameUserServers();
            OrdersServers os = new OrdersServers();
            LotteryManager lm = new LotteryManager();
            Orders o = os.GetOrder(OrderNo);
            if (o.PayTypeId == 7)
            {
                if (gus.UpdateUserMoney(o.AdminUserName, o.PayMoney * 10, "-"))
                {
                    if (os.UpdateOrder(OrderNo))
                    {

                    }
                    else
                    {
                        return "更新订单状态失败!";
                    }
                }
                else
                {
                    return "扣除平台币失败!";
                }
            }
            if (o.PayTypeId != 6)
            {
                lm.AddUserPoints(o.UserName, o.PayMoney);
            }
            if (o.Type == 1)
            {
                Games g = new Games();
                g = gss.GetGame(o.GameId);
                switch (g.GameNo)
                {
                    case "dxz":
                        return new Game_Dxz().Pay(OrderNo);
                    case "sjsg":
                        return new Game_Sjsg().Pay(OrderNo);
                    case "tj":
                        return new Game_Tj().Pay(OrderNo);
                    case "nz":
                        return new Game_Nz().Pay(OrderNo);
                    case "djj":
                        return new Game_Djj().Pay(OrderNo);
                    case "jlc":
                        return new Game_Jlc().Pay(OrderNo);
                    case "ly":
                        return new Game_Ly().Pay(OrderNo);
                    case "xyb":
                        return new Game_Xyb().Pay(OrderNo);
                    case "dhz":
                        return new Game_Dhz().Pay(OrderNo);
                    case "wz":
                        return new Game_Wz().Pay(OrderNo);
                    case "dpqk":
                        return new Game_Dpqk().Pay(OrderNo);
                    case "lm":
                        return new Game_Lm().Pay(OrderNo);
                    case "mxqy":
                        return new Game_Mxqy().Pay(OrderNo);
                    case "zsg":
                        return new Game_Zsg().Pay(OrderNo);
                    case "rxhzw":
                        return new Game_Rxhzw().Pay(OrderNo);
                    case "klsg":
                        return new Game_Klsg().Pay(OrderNo);
                    case "gjqx":
                        return new Game_Gjqx().Pay(OrderNo);
                    case "txj":
                        return new Game_Txj().Pay(OrderNo);
                    case "wdqk":
                        return new Game_Wdqk().Pay(OrderNo);
                    case "chcq":
                        return new Game_Chcq().Pay(OrderNo);
                    case "jjsg":
                        return new Game_Jjsg().Pay(OrderNo);
                    case "qh":
                        return new Game_Qh().Pay(OrderNo);
                    case "yjxy":
                        return new Game_Yjxy().Pay(OrderNo);
                    case "xxas":
                        return new Game_Xxas().Pay(OrderNo);
                    case "tgzt":
                        return new Game_Tgzt().Pay(OrderNo);
                    case "nslm":
                        return new Game_Nslm().Pay(OrderNo);
                    case "ftz":
                        return new Game_Ftz().Pay(OrderNo);
                    case "sbcs":
                        return new Game_Sbcs().Pay(OrderNo);
                    case "zwj":
                        return new Game_Zwj().Pay(OrderNo);
                    case "dqqyz":
                        return new Game_Dqqyz().Pay(OrderNo);
                    case "yxy":
                        return new Game_Yxy().Pay(OrderNo);
                    case "jhwj":
                        return new Game_Jhwj().Pay(OrderNo);
                    default:
                        return "不存在的游戏!";
                }
            }
            else
            {
                if (gus.UpdateUserMoney(o.UserName, o.PayMoney * 10, "+"))
                {
                    if (os.UpdateOrder(o.OrderNo))
                    {
                        return "充值成功!";
                    }
                    else
                    {
                        return "充值失败!错误原因:更新订单状态失败!";
                    }
                }
                else
                {
                    return "充值失败!";
                }
            }
        }
예제 #19
0
 public void GetNewsServer(HttpContext context)
 {
     List<GameServer> list = new List<GameServer>();
     list = sm.GetNewsServer(6);
     string HtmlStr = "";
     string Style = "style=\"background-color: #FFF4E1\"";
     foreach (GameServer gs in list)
     {
         Games g = new Games();
         g = gm.GetGame(gs.GameId);
         HtmlStr += "<tr><td " + Style + ">&nbsp;</td><td " + Style + ">" + gs.StartTime.ToString("MM-dd") + "</td><td " + Style + ">" + gs.StartTime.ToString("HH:mm") + "</td><td class=\"name\" " + Style + "><a href=\"/" + g.GameNo + "/\" class=\"a2\" target=\"_blank\" title=\"" + gs.Name + "\">" + g.Name + "</a></td><td class=\"qu\" " + Style + "><span style=\"width: 50px; display: block; float: right; text-align: center; line-height: 15px; font-size: 12px\"><a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" class=\"a1\"target=\"_blank\">" + gs.QuFu + "区</a></span></td></tr>";
     }
     context.Response.Write(HtmlStr);
 }
예제 #20
0
파일: Game_Qh.cs 프로젝트: Zane0816/5577yx
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化参数
        /// </summary>
        public Game_Qh()
        {
            game = games.GetGame("qh");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #21
0
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Chcq()
        {
            game = games.GetGame("chcq");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #22
0
파일: Game_Txj.cs 프로젝트: Zane0816/5577yx
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Txj()
        {
            game = games.GetGame("txj");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #23
0
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 实例化接口参数
        /// </summary>
        public Game_Mxqy()
        {
            game = games.GetGame("mxqy");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #24
0
파일: Game_Yxy.cs 프로젝트: Zane0816/5577yx
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        public Game_Yxy()
        {
            game = games.GetGame("yxy");                                   //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #25
0
        public ActionResult LoginGame(string GameNo, int Qf)
        {
            g = gm.GetGame(GameNo);
            GameServer gs = new GameServer();
            gs = sm.GetGameServer(g.Id, Qf);
            ViewData["Title"] = "5577yx-" + g.Name;
            ViewData["ServerName"] = g.Name + "-" + gs.Name;
            ViewData["GameNo"] = g.GameNo;
            ViewData["Qf"] = Qf;
            if (gs.State == 1 && gs.StartTime < DateTime.Now)
            {
                gs.State = 4;
                sm.UpdateServer(gs);
            }
            if (gs.State != 1 && gs.StartTime > DateTime.Now)
            {
                gs.State = 1;
                sm.UpdateServer(gs);
            }
            if (gs.State == 1 && gs.StartTime > DateTime.Now)
            {
                TimeSpan ts = gs.StartTime - DateTime.Now;
                ViewData["TimeSpan"] = ts.TotalMilliseconds;
            }
            if (gs.State == 1 || gs.State == 2)
            {
                ViewData["State"] = gs.State;
                return View("~/Views/GameCenter/LoginGame.cshtml");
            }
            int UserId = BBRequest.GetUserId();
            if (UserId > 0)
            {
                ViewData["LoginUrl"] = gm.LoginUrl(g.Id, UserId, gs.Id, 0);
                gum.UpdateLastLogin(UserId);
                OnlineLog ol = new OnlineLog(0, UserId, g.Id, gs.Id, DateTime.Now, 0, 0);
                new OnlineLogManager().AddOnlineLog(ol);
            }
            else
            {
                if (Utils.GetCookie("6qmgamesame") != "")
                {
                    string value = Utils.GetCookie("6qmgamesame");
                    string UserName = DESEncrypt.DesDecrypt(value.Split('|')[0]);
                    string PWD = DESEncrypt.DesDecrypt(value.Split('|')[1]);
                    GameUser gu = gum.GetGameUser(UserName, DESEncrypt.Md5(PWD, 32));
                    if (gu != null)
                    {
                        BBRequest.WriteUserId(gu.Id);
                        gum.UpdateLastLogin(gu.Id);
                        ViewData["LoginUrl"] = gm.LoginUrl(g.Id, gu.Id, gs.Id, 0);
                        OnlineLog ol = new OnlineLog(0, gu.Id, g.Id, gs.Id, DateTime.Now, 0, 0);
                        new OnlineLogManager().AddOnlineLog(ol);
                    }
                    else
                    {
                        return RedirectToAction("Login", "Home");
                    }
                }
                else
                {
                    return RedirectToAction("Login", "Home");
                }
            }

            return View("~/Views/GameCenter/LoginGame.cshtml");
        }
예제 #26
0
 public ActionResult Index()
 {
     ViewData["MyInfoOn"] = "ch_son_p_cur";
     ViewData["UserInfoON"] = "ch_id_cur";
     ViewData["menu1On"] = "pay_menu_cur1";
     ViewData["menu2On"] = "reddot";
     ViewData["menu3On"] = "reddot";
     int UserId = BBRequest.GetUserId();
     if (UserId > 0)
     {
         GameUser gu = gum.GetGameUser(UserId);
         ViewData["Photo"] = gu.Photo;
         ViewData["UserName"] = gu.UserName;
         ViewData["Money"] = gu.Money;
         if (gu.IsSpreader <= 0)
         {
             ViewData["IsSpread"] = "display:none";
         }
         List<GameServer> NewServerlist = new List<GameServer>();
         NewServerlist = sm.GetNewsServer(6);
         ViewData["NewServerHtml"] = hh.GetNewServerHtml(NewServerlist);
         ViewData["MsgCount"] = smm.GetSysMsgCount(gu.Id);
     }
     else
     {
         return RedirectToAction("Login", "Home");
     }
     string LoginOnline = "";
     List<OnlineLog> list = new List<OnlineLog>();
     list = olm.GetOnlineLog(UserId, 4);
     foreach (OnlineLog ol in list)
     {
         Games g = new Games();
         g = gm.GetGame(ol.GameId);
         GameServer gs = new GameServer();
         gs = sm.GetGameServer(ol.ServerId);
         if (gs != null)
         {
             LoginOnline += "<a href=\"/" + g.GameNo + "/LoginGame?S=" + gs.QuFu + "\" target=\"_blank\"><li><img src=\"" + gs.Img + "\"><br><span class=\"span_lanse\">" + g.Name + "</span>&nbsp;" + gs.Name + "</li></a>";
         }
     }
     ViewData["LoginOnline"] = LoginOnline;
     return View();
 }
예제 #27
0
 public ActionResult GameGift(int CardId)
 {
     cardsname c = new cardsname();
     c = cm.GetCard(CardId);
     g = gm.GetGame(c.gameid);
     ViewData["CardName"] = c.cardname;
     ViewData["Img"] = c.img;
     ViewData["CardCount"] = cm.GetCardCount(CardId);
     ViewData["CardDes"] = c.carddesc;
     ViewData["CardId"] = CardId;
     ViewData["GameNo"] = g.GameNo;
     return View("~/Views/GameGift/GetGift.cshtml");
 }
예제 #28
0
파일: Game_Dxz.cs 프로젝트: Zane0816/5577yx
        string tstamp; //定义时间戳

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 初始化接口参数
        /// </summary>
        public Game_Dxz()
        {
            game = games.GetGame("dxz");                                     //获取游戏
            gc = gcs.GetGameConfig(game.Id);                                //获取游戏参数
        }
예제 #29
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");
            }
        }
예제 #30
0
 /// <summary>
 /// 获取游戏的登录地址
 /// </summary>
 /// <param name="GameId">游戏Id</param>
 /// <param name="UserId">用户Id</param>
 /// <param name="ServerId">服务器Id</param>
 /// <returns>返回登陆地址</returns>
 public string LoginUrl(int GameId, int UserId, int ServerId, int IsPC)
 {
     GameUserInfo gui = new GameUserInfo();
     Games g = new Games();
     g = gss.GetGame(GameId);
     switch (g.GameNo)
     {
         case "dxz":
             return new Game_Dxz().Login(UserId, ServerId, IsPC);
         case "sjsg":
             return new Game_Sjsg().Login(UserId, ServerId, IsPC);
         case "tj":
             return new Game_Tj().Login(UserId, ServerId, IsPC);
         case "nz":
             return new Game_Nz().Login(UserId, ServerId, IsPC);
         case "djj":
             return new Game_Djj().Login(UserId, ServerId, IsPC);
         case "jlc":
             return new Game_Jlc().Login(UserId, ServerId, IsPC);
         case "ly":
             return new Game_Ly().Login(UserId, ServerId, IsPC);
         case "xyb":
             return new Game_Xyb().Login(UserId, ServerId, IsPC);
         case "dhz":
             return new Game_Dhz().Login(UserId, ServerId, IsPC);
         case "wz":
             return new Game_Wz().Login(UserId, ServerId, IsPC);
         case "dpqk":
             return new Game_Dpqk().Login(UserId, ServerId, IsPC);
         case "lm":
             return new Game_Lm().Login(UserId, ServerId, IsPC);
         case "mxqy":
             return new Game_Mxqy().Login(UserId, ServerId, IsPC);
         case "zsg":
             return new Game_Zsg().Login(UserId, ServerId, IsPC);
         case "rxhzw":
             return new Game_Rxhzw().Login(UserId, ServerId, IsPC);
         case "klsg":
             return new Game_Klsg().Login(UserId, ServerId, IsPC);
         case "gjqx":
             return new Game_Gjqx().Login(UserId, ServerId, IsPC);
         case "txj":
             return new Game_Txj().Login(UserId, ServerId, IsPC);
         case "wdqk":
             return new Game_Wdqk().Login(UserId, ServerId, IsPC);
         case "chcq":
             return new Game_Chcq().Login(UserId, ServerId, IsPC);
         case "jjsg":
             return new Game_Jjsg().Login(UserId, ServerId, IsPC);
         case "qh":
             return new Game_Qh().Login(UserId, ServerId, IsPC);
         case "yjxy":
             return new Game_Yjxy().Login(UserId, ServerId, IsPC);
         case "xxas":
             return new Game_Xxas().Login(UserId, ServerId, IsPC);
         case "tgzt":
             return new Game_Tgzt().Login(UserId, ServerId, IsPC);
         case "nslm":
             return new Game_Nslm().Login(UserId, ServerId, IsPC);
         case "ftz":
             return new Game_Ftz().Login(UserId, ServerId, IsPC);
         case "sbcs":
             return new Game_Sbcs().Login(UserId, ServerId, IsPC);
         case "zwj":
             return new Game_Zwj().Login(UserId, ServerId, IsPC);
         case "dqqyz":
             return new Game_Dqqyz().Login(UserId, ServerId, IsPC);
         case "yxy":
             return new Game_Yxy().Login(UserId, ServerId, IsPC);
         case "jhwj":
             return new Game_Jhwj().Login(UserId, ServerId, IsPC);
         default:
             return "";
     }
 }