Exemplo n.º 1
0
        public ActionResult UserCard()
        {
            ViewData["UserCardOn"]  = "ch_son_p_cur";
            ViewData["UserInfo2On"] = "ch_id_cur";
            ViewData["menu1On"]     = "reddot";
            ViewData["menu2On"]     = "pay_menu_cur1";
            ViewData["menu3On"]     = "reddot";
            GameUser gu     = new GameUser();
            int      UserId = BBRequest.GetUserId();

            if (UserId < 1)
            {
                return(RedirectToAction("Login", "Home"));
            }
            else
            {
                gu = gum.GetGameUser(UserId);
                if (gu.IsSpreader <= 0)
                {
                    ViewData["IsSpread"] = "display:none";
                }
            }
            if (string.IsNullOrEmpty(gu.Cards))
            {
                ViewData["CardStyle"]  = "no";
                ViewData["ShowStyle1"] = "display:none";
                ViewData["ShowStyle2"] = "";
            }
            else
            {
                ViewData["CardStyle"]  = "yes";
                ViewData["ShowStyle1"] = "";
                ViewData["ShowStyle2"] = "display:none";
                string Cards = gu.Cards.Substring(0, 6);
                if (gu.Cards.Length == 15)
                {
                    for (int i = 0; i < 6; i++)
                    {
                        Cards += "*";
                    }
                    Cards += gu.Cards.Substring(12, 3);
                }
                else if (gu.Cards.Length == 18)
                {
                    for (int i = 0; i < 8; i++)
                    {
                        Cards += "*";
                    }
                    Cards += gu.Cards.Substring(14, 4);
                }
                ViewData["Card"] = Cards;
                string RealName = gu.RealName.Substring(0, 1);
                for (int i = 0; i < gu.RealName.Length - 1; i++)
                {
                    RealName += "*";
                }
                ViewData["RealName"] = RealName;
            }
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            ViewData["UserCenterOn"] = "current";
            ViewData["YejiOn"]       = "chosen";
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                if (gu.IsSpreader > 0)
                {
                    ViewData["Photo"]       = gu.Photo;
                    ViewData["SpreadCount"] = om.GetAllSpreadCount(UserId);
                    ViewData["UserName"]    = gu.UserName;
                    ViewData["SpreadMoney"] = om.GetSumMoney(UserId, "");
                    ViewData["Style"]       = "display:none";
                    if (gu.IsSpreader == 2)
                    {
                        ViewData["CaoZuo"] = "<th>操作</th>";
                        ViewData["Style"]  = "";
                    }
                }
                else
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }
            else
            {
                return(RedirectToAction("Login", "SpreadCenter"));
            }
            return(View());
        }
Exemplo n.º 3
0
        public ActionResult UserSafe()
        {
            ViewData["UserSafeOn"]  = "ch_son_p_cur";
            ViewData["UserInfo2On"] = "ch_id_cur";
            ViewData["menu1On"]     = "reddot";
            ViewData["menu2On"]     = "pay_menu_cur1";
            ViewData["menu3On"]     = "reddot";
            int UserId = BBRequest.GetUserId();

            if (UserId < 1)
            {
                return(RedirectToAction("Login", "Home"));
            }
            GameUser gu = new GameUser();

            gu = gum.GetGameUser(UserId);
            if (string.IsNullOrEmpty(gu.Email) && string.IsNullOrEmpty(gu.Cards))
            {
                ViewData["Safe"]     = "<span class=\"weak\">弱</span>";
                ViewData["SafeInfo"] = "请您务必及时绑定邮箱或身份证,以确保您账户的安全!";
            }
            else if (string.IsNullOrEmpty(gu.Email) || string.IsNullOrEmpty(gu.Cards))
            {
                ViewData["Safe"]     = "<span class=\"mid\">适中</span>";
                ViewData["SafeInfo"] = "请您及时绑定邮箱和身份证,以完善您账户的安全!";
            }
            else if (!string.IsNullOrEmpty(gu.Email) && !string.IsNullOrEmpty(gu.Cards))
            {
                ViewData["Safe"]     = "<span class=\"good\">强</span>";
                ViewData["SafeInfo"] = "您的账户很安全,请继续保持!";
            }
            if (string.IsNullOrEmpty(gu.Email))
            {
                ViewData["EamilStyle"] = "no";
                ViewData["EmailText"]  = "您还暂未绑定邮箱!";
            }
            else
            {
                ViewData["EamilStyle"] = "yes";
                ViewData["EmailText"]  = "您已经绑定邮箱!";
            }
            if (string.IsNullOrEmpty(gu.Cards))
            {
                ViewData["CardsStyle"] = "no";
                ViewData["CardsText"]  = "您还暂未绑定邮箱!";
            }
            else
            {
                ViewData["CardsStyle"] = "yes";
                ViewData["CardsText"]  = "您已经绑定邮箱!";
            }
            if (gu.IsSpreader <= 0)
            {
                ViewData["IsSpread"] = "display:none";
            }
            return(View());
        }
Exemplo n.º 4
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"));
            }
        }
Exemplo n.º 5
0
        public Boolean DelUserMsg(int M)
        {
            int UserId = BBRequest.GetUserId();

            if (UserId < 1)
            {
                return(false);
            }
            else
            {
                return(smm.DelSysMsg(M));
            }
        }
Exemplo n.º 6
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"));
            }
        }
Exemplo n.º 7
0
        public ActionResult Ptb()
        {
            ViewData["PtbOn"] = "chosen";
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                return(View());
            }
            else
            {
                return(RedirectToAction("Login", "Home"));
            }
        }
Exemplo n.º 8
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;
                ViewData["FlMoney"]  = gu.RebateMoney;
                ViewData["vip"]      = gu.GradeId > 0 ? "vip1_12.jpg" : "vip11_0.jpg";
                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());
        }
Exemplo n.º 9
0
        public ActionResult Login()
        {
            if (Utils.GetCookie("6qmgamesame") != "")
            {
                string value    = Utils.GetCookie("6qmgamesame");
                string UserName = DESEncrypt.DesDecrypt(value.Split('|')[0]);
                ViewData["UserName"] = UserName;
            }
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                Session.RemoveAll();
            }
            return(View());
        }
Exemplo n.º 10
0
        public ActionResult Top()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                ViewData["HeadInfo"] = "<span style=\"color: sandybrown; font-weight: bold\">" + gu.UserName + "</span>";
            }
            else
            {
                ViewData["HeadInfo"] = "体验更优的服务请您先[<a href=\"/Home/Login\">登录</a>]或[<a href=\"/Home/Reg\">注册</a>]";
            }
            string Controller = Request.RequestContext.RouteData.Values["Controller"].ToString();

            switch (Controller)
            {
            case "Home":
                ViewData["HomeOn"] = "current";
                break;

            case "GameCenter":
                ViewData["GameCenterOn"] = "current";
                break;

            case "UserCenter":
                ViewData["UserCenterOn"] = "current";
                break;

            case "PayCenter":
                ViewData["PayCenterOn"] = "current";
                break;

            case "GameGift":
                ViewData["GameGiftOn"] = "current";
                break;

            case "NewsCenter":
                ViewData["NewsCenterOn"] = "current";
                break;

            default:
                break;
            }
            return(View());
        }
Exemplo n.º 11
0
        public void GetAllSysMsg(HttpContext context)
        {
            int           PageSize = int.Parse(context.Request["PageSize"]);
            int           PageNum  = int.Parse(context.Request["PageNum"]);
            List <sysmsg> list     = new List <sysmsg>();

            list = smm.GetAllSysMsg(PageSize, PageNum, "userid=" + BBRequest.GetUserId(), "addtime desc");
            string HtmlStr = "";

            foreach (sysmsg sm in list)
            {
                string Type  = sm.type == 1 ? "平台消息" : "站内信";
                string State = sm.state == 1 ? "已读" : "未读";
                HtmlStr += "<tr><td align=\"center\">" + Type + "</td><td class=\"t\"><a href=\"javascript:;\" onclick=\"ShowMsg('" + sm.id + "')\">" + sm.title + "</a></td><td align=\"center\">未读</td><td align=\"center\">" + sm.addtime + "</td><td align=\"center\"><a href=\"javascript:InitPageContent('SysMsg')\" onclick=\"Del('/UserCenter/DelUserMsg?M=" + sm.id + "')\">删除</a></td><tr id=\"trCon" + sm.id + "\" style=\"display: none;\"><td colspan=\"5\" style=\"padding-left: 10px;\"><div class=\"xiaoxi_con11\"><span style=\"color: #FF9900\">消息内容:</span> <span style=\"color: #F7654B\">" + sm.msg + "</span><br><span style=\"color: #FF9900\">防诈骗提示:</span>请您在游戏中不要相信任何中奖信息,那些都是骗子的骗人招数,请您要妥善保管好您的帐号。</div></td></tr></tr>";
            }
            context.Response.Write(HtmlStr);
        }
Exemplo n.º 12
0
        public ActionResult Lottery()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                ViewData["UserName"]    = gu.UserName;
                ViewData["Points"]      = gu.Points;
                ViewData["LotteryInfo"] = GetLotteryInfo();
                return(View());
            }
            else
            {
                return(RedirectToAction("Login", "Home"));
            }
        }
Exemplo n.º 13
0
        public void GetAllSpreadPay(HttpContext context)
        {
            int           PageSize = int.Parse(context.Request["PageSize"]);
            int           PageNum  = int.Parse(context.Request["PageNum"]);
            int           UserId   = UserId = BBRequest.GetUserId();
            string        WhereStr = context.Request["WhereStr"];
            List <Orders> list     = new List <Orders>();

            list = om.GetAllSpreadPay(PageSize, PageNum, UserId, WhereStr);
            string HtmlStr = "";

            foreach (Orders o in list)
            {
                HtmlStr += "<tr><td>" + o.UserName + "</td><td>" + o.PayTime + "</td><td>" + o.GameName + "-" + o.ServerName + "</td><td>" + gm.GetGameUserInfo(o.GameId, gum.GetGameUser(o.UserName).Id, o.ServerId).UserName + "</td><td>" + o.PayMoney + "</td></tr>";
            }
            context.Response.Write(HtmlStr);
        }
Exemplo n.º 14
0
        public ActionResult UserEmail()
        {
            ViewData["UserEmailOn"] = "ch_son_p_cur";
            ViewData["UserInfo2On"] = "ch_id_cur";
            ViewData["menu1On"]     = "reddot";
            ViewData["menu2On"]     = "pay_menu_cur1";
            ViewData["menu3On"]     = "reddot";
            GameUser gu     = new GameUser();
            int      UserId = BBRequest.GetUserId();

            if (UserId < 1)
            {
                return(RedirectToAction("Login", "Home"));
            }
            else
            {
                gu = gum.GetGameUser(UserId);
                if (gu.IsSpreader <= 0)
                {
                    ViewData["IsSpread"] = "display:none";
                }
            }
            if (string.IsNullOrEmpty(gu.Email))
            {
                ViewData["EmailStyle"] = "no";
                ViewData["ShowStyle1"] = "display:none";
                ViewData["ShowStyle2"] = "";
            }
            else
            {
                ViewData["EmailStyle"] = "yes";
                ViewData["ShowStyle1"] = "";
                ViewData["ShowStyle2"] = "display:none";
                string Email  = gu.Email.Substring(0, 4);
                int    Length = gu.Email.LastIndexOf('@') - 4;
                for (int i = 0; i < Length; i++)
                {
                    Email += "*";
                }
                Email            += gu.Email.Substring(gu.Email.LastIndexOf('@'), gu.Email.Length - gu.Email.LastIndexOf('@'));
                ViewData["Email"] = Email;
            }
            return(View());
        }
Exemplo n.º 15
0
        public void GetAllSpreadGame(HttpContext context)
        {
            int    PageSize = int.Parse(context.Request["PageSize"]);
            int    PageNum  = int.Parse(context.Request["PageNum"]);
            string WhereStr = context.Request["WhereStr"];
            int    UserId   = UserId = BBRequest.GetUserId();
            Dictionary <string, string> list = new Dictionary <string, string>();

            list = om.GetAllSpreadGame(PageSize, PageNum, UserId, WhereStr);
            string HtmlStr = "";

            foreach (KeyValuePair <string, string> kv in list)
            {
                GameServer gs       = sm.GetGameServer(int.Parse(kv.Key));
                string     GameName = gm.GetGame(gs.GameId).Name;
                HtmlStr += "<tr><td>" + GameName + "-" + gs.Name + "</td><td>" + kv.Value + "</td></tr>";
            }
            context.Response.Write(HtmlStr);
        }
Exemplo n.º 16
0
        public ActionResult SpreadGame()
        {
            ViewData["UserCenterOn"] = "current";
            ViewData["GameOn"]       = "chosen";
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                if (gu.IsSpreader > 0)
                {
                    ViewData["Photo"]       = gu.Photo;
                    ViewData["SpreadCount"] = om.GetAllSpreadCount(UserId);
                    ViewData["UserName"]    = gu.UserName;
                    if (gu.IsSpreader != 2)
                    {
                        ViewData["Style"] = "display:none";
                    }

                    List <Games> list = new List <Games>();
                    list = gm.GetAll("where is_lock=1 order by sort_id ");
                    ViewData["Action"]   = DESEncrypt.Encrypt(UserId + "|" + list[list.Count - 1].Id);
                    ViewData["GameName"] = list[list.Count - 1].Name;
                    string HtmlGame = "";
                    foreach (Games g in list)
                    {
                        string Action = DESEncrypt.Encrypt(UserId + "|" + g.Id);
                        HtmlGame += "<li style=\"width: 210px;\"><a onclick=\"GetSpreadText('" + g.Name + "','" + Action + "')\"><img src=\"" + g.GameListImg + "\" width=\"200px\" height=\"110px\"></a><label for=\"male\">" + g.Name + "</label></li>";
                    }
                    ViewData["HtmlGame"] = HtmlGame;
                }
                else
                {
                    return(RedirectToAction("Login", "SpreadCenter"));
                }
            }
            else
            {
                return(RedirectToAction("Login", "SpreadCenter"));
            }
            return(View());
        }
Exemplo n.º 17
0
        public Boolean DoInfoEdit()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId < 1)
            {
                RedirectToAction("Login", "Home");
            }
            GameUser gu = new GameUser();

            gu          = gum.GetGameUser(UserId);
            gu.Photo    = string.IsNullOrEmpty(Request["Photo"]) ? gu.Photo : Request["Photo"];
            gu.RealName = string.IsNullOrEmpty(Request["RealName"]) ? gu.RealName : Request["RealName"];
            gu.Cards    = string.IsNullOrEmpty(Request["Card"]) ? gu.Cards : Request["Card"];
            gu.BirthDay = string.IsNullOrEmpty(Request["BirthDay"]) ? gu.BirthDay : Request["BirthDay"];
            gu.Sex      = string.IsNullOrEmpty(Request["Sex"]) ? gu.Sex : Request["Sex"];
            gu.Email    = string.IsNullOrEmpty(Request["Email"]) ? gu.Email : Request["Email"];
            gu.PWD      = string.IsNullOrEmpty(Request["PWD"]) ? gu.PWD : DESEncrypt.Md5(Request["PWD"], 32);
            return(gum.UpdateUser(gu));
        }
Exemplo n.º 18
0
        public string GetLottery()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                if (lm.DeducUserPoints(gu.UserName))
                {
                    return(lm.LotteryRes(gu.UserName));
                }
                else
                {
                    return("0|扣除积分失败!请检查积分余额是否充足!");
                }
            }
            else
            {
                return("0|您还未登陆,或登陆信息已经超时,请重新登陆!");
            }
        }
Exemplo n.º 19
0
        public ActionResult IsLogined()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                if (gu.IsSpreader > 0)
                {
                    return(View());
                }
                else
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }
            else
            {
                return(RedirectToAction("Login", "SpreadCenter"));
            }
        }
Exemplo n.º 20
0
        public ActionResult UserMsg()
        {
            ViewData["UserMsgOn"]   = "ch_son_p_cur";
            ViewData["UserInfo2On"] = "ch_id_cur";
            ViewData["menu1On"]     = "reddot";
            ViewData["menu2On"]     = "pay_menu_cur1";
            ViewData["menu3On"]     = "reddot";
            int UserId = BBRequest.GetUserId();

            if (UserId < 1)
            {
                return(RedirectToAction("Login", "Home"));
            }
            GameUser gu = gum.GetGameUser(UserId);

            if (gu.IsSpreader <= 0)
            {
                ViewData["IsSpread"] = "display:none";
            }
            return(View());
        }
Exemplo n.º 21
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());
        }
Exemplo n.º 22
0
        public ActionResult MyInfoEdit()
        {
            ViewData["MyInfoEditOn"] = "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 = new GameUser();
                gu = gum.GetGameUser(UserId);
                ViewData["Photo"]    = gu.Photo;
                ViewData["UserName"] = gu.UserName;
                ViewData["Sex"]      = gu.Sex == "0" ? "男" : "女";
                ViewData["RealName"] = gu.RealName;
                ViewData["BirthDay"] = gu.BirthDay;
                if (!string.IsNullOrEmpty(gu.Email))
                {
                    string Email  = gu.Email.Substring(0, 4);
                    int    Length = gu.Email.LastIndexOf('@') - 4;
                    for (int i = 0; i < Length; i++)
                    {
                        Email += "*";
                    }
                    Email            += gu.Email.Substring(gu.Email.LastIndexOf('@'), gu.Email.Length - gu.Email.LastIndexOf('@'));
                    ViewData["Email"] = Email;
                }
                if (gu.IsSpreader <= 0)
                {
                    ViewData["IsSpread"] = "display:none";
                }
            }
            else
            {
                return(RedirectToAction("Login", "Home"));
            }
            return(View());
        }
Exemplo n.º 23
0
        public void GetAllPayHistory1(HttpContext context)
        {
            int      PageSize = int.Parse(context.Request["PageSize"]);
            int      PageNum  = int.Parse(context.Request["PageNum"]);
            int      UserId   = BBRequest.GetUserId();
            GameUser gu       = new GameUser();

            gu = gum.GetGameUser(UserId);
            string    WhereStr = "UserName='******'";
            DataTable dt       = new DataTable();

            dt = om.GetAllOrders(PageSize, PageNum, WhereStr, "PayTime desc");
            string HtmlStr = "";

            foreach (DataRow row in dt.Rows)
            {
                string Type  = row["Type"].ToString() == "1" ? "游戏币" : "平台币";
                string State = "";
                switch ((int)row["State"])
                {
                case 0:
                    State = "<span style=\"color:red\">未支付</span>";
                    break;

                case 1:
                    State = "<span style=\"color:#F7654B\">已付款</span>";
                    break;

                case 2:
                    State = "<span style=\"color:blue\">已完成</span>";
                    break;

                default:
                    break;
                }
                HtmlStr += "<tr><td>" + row["PayTime"] + "</td><td>" + row["OrderNo"] + "</td><td>" + row["PayMoney"] + "</td><td>" + Type + "</td><td>" + State + "</td></tr>";
            }
            context.Response.Write(HtmlStr);
        }
Exemplo n.º 24
0
        public ActionResult Default()
        {
            int UserId = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                if (gu.IsSpreader > 0)
                {
                    ViewData["SpreadCount"] = om.GetAllSpreadCount(UserId);
                    ViewData["UserName"]    = gu.UserName;
                    ViewData["SpreadMoney"] = om.GetSumMoney(UserId, "");
                }
                else
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }
            else
            {
                return(RedirectToAction("Login", "SpreadCenter"));
            }
            return(View());
        }
Exemplo n.º 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"));
        }
Exemplo n.º 26
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>");
            }
        }
Exemplo n.º 27
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"));
            }
        }
Exemplo n.º 28
0
        public void GetDataCount(HttpContext context, string Code)
        {
            string   WhereStr = context.Request["WhereStr"];
            int      UserId   = BBRequest.GetUserId();
            GameUser gu       = new GameUser();

            switch (Code)
            {
            case "News":
                context.Response.Write(nm.GetNewsCount(WhereStr));
                break;

            case "Game":
                context.Response.Write(gm.GetGamesCount(WhereStr));
                break;

            case "Server":
                context.Response.Write(sm.GetServerCount(WhereStr));
                break;

            case "Card":
                context.Response.Write(cm.GetCardCount(WhereStr));
                break;

            case "Order":
                context.Response.Write(om.GetOrderCount(WhereStr));
                break;

            case "SourceChange":
                context.Response.Write(scm.GetSourceChangeCount(WhereStr));
                break;

            case "GameUser":
                context.Response.Write(gum.GetGameUserCount(WhereStr));
                break;

            case "MasterLog":
                context.Response.Write(mm.GetMasterLogCount(WhereStr));
                break;

            case "Links":
                context.Response.Write(lm.GetLinksCount(WhereStr));
                break;

            case "CardLog":
                context.Response.Write(cm.GetCardLogCount(WhereStr));
                break;

            case "Master":
                context.Response.Write(mm.GetMasterCount(WhereStr));
                break;

            case "SysMsg":
                context.Response.Write(smm.GetSysMsgCount(BBRequest.GetUserId()));
                break;

            case "PayHistory1":
                gu       = gum.GetGameUser(UserId);
                WhereStr = "where UserName='******'";
                context.Response.Write(om.GetOrderCount(WhereStr));
                break;

            case "PayHistory2":
                gu       = gum.GetGameUser(UserId);
                WhereStr = "where UserName='******' and State=2";
                context.Response.Write(om.GetOrderCount(WhereStr));
                break;

            case "InitSpread":
                string[] re    = WhereStr.Split('|');
                string   Coded = context.Request["Code"];
                if (re.Length == 4)
                {
                    context.Response.Write(om.GetSpreadCount(int.Parse(re[3]), false));
                }
                else
                {
                    if (Coded == "All")
                    {
                        context.Response.Write(om.GetSpreadCount(UserId, false));
                    }
                    else
                    {
                        context.Response.Write(om.GetSpreadCount(UserId, true));
                    }
                }
                break;

            case "SpreadPay":
                context.Response.Write(om.GetSpreadPayCount(UserId, WhereStr));
                break;

            case "SpreadGame":
                context.Response.Write(om.GetSpreadGameCount(UserId, WhereStr));
                break;

            case "GetMasterRoleCount":
                context.Response.Write(mm.GetMasterRoleCount(WhereStr));
                break;

            case "GetLockCount":
                context.Response.Write(Lkm.GetAllLockCount(WhereStr));
                break;

            default:
                break;
            }
        }
Exemplo n.º 29
0
        public string AddUnderSpreader()
        {
            GameUser gu       = new GameUser();
            string   UserName = Request["UserName"].Trim();
            string   Pwd      = Request["PWD"].Trim();
            int      UserId   = BBRequest.GetUserId();

            if (UserId > 0)
            {
                GameUser Spreader = gum.GetGameUser(UserId);
                if (Spreader.IsSpreader > 1)
                {
                }
                else
                {
                    return("您不是推广团长,不能添加推广员!");
                }
            }
            else
            {
                return("您还未登陆,不能添加推广员!");
            }
            if (!DevRegHel.RegName(UserName))
            {
                return("您输入的用户名不可用!");
            }
            if (!DevRegHel.RegPwd(Pwd))
            {
                return("您输入的密码不可用!");
            }
            if (alm.IsLock(BBRequest.GetIP()))
            {
                return("您暂时不能注册!");
            }
            gu = new GameUser(0, Request["UserName"], DESEncrypt.Md5(Request["PWD"], 32), "", "0", "", "", "", ""
                              , "", "", "", "1", UserId, "", 0, 0, 0, 0, 1, 0, DateTime.Now, DateTime.Now, 0, 0, 0, 0, BBRequest.GetIP(),
                              "", 0, "", "");
            try
            {
                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;
                    //validatecode vdc = new validatecode();
                    //vdcm.DelValiDateCode(Id, 1);
                    //vdc.type = 1;
                    //vdc.userid = Id;
                    //vdc.sendtime = DateTime.Now;
                    //vdc.code = Guid.NewGuid().ToString() + DateTime.Now.Minute + DateTime.Now.Millisecond;
                    //vdc.email = gu.Email.Trim();
                    //vdcm.AddValiDateCode(vdc);
                    //string ucode = DESEncrypt.encryptstring1(vdc.userid.ToString());
                    //string tcode = DESEncrypt.encryptstring1(vdc.type.ToString());
                    //string scode = vdc.code.ToString();
                    //string vicode = vdc.sendtime.ToString("yyyy-MM-ddHH:mm:ss");
                    return("True");
                }
                else
                {
                    return("注册失败!");
                }
            }
            catch (Exception ex)
            {
                gu.IsLock   = 1;
                gu.UserDesc = "此用户为注册失败用户!失败原因:" + ex.Message;
                gum.UpdateUser(gu);
                //gum.DelGameUser(UserName);
                return("注册失败!错误:" + ex.Message);
            }
        }
Exemplo n.º 30
0
        public void GetAllSpreadUser(HttpContext context)
        {
            int    PageSize  = int.Parse(context.Request["PageSize"]);
            int    PageNum   = int.Parse(context.Request["PageNum"]);
            int    UserId    = 0;
            string WhereStr  = context.Request["WhereStr"];
            string Code      = context.Request["Code"];
            string WhereStr2 = "";

            UserId = BBRequest.GetUserId();
            string[] re = WhereStr.Split('|');

            if (!string.IsNullOrEmpty(re[0]))
            {
                WhereStr2 += " and o.gameid = " + re[0];
            }
            else
            {
                WhereStr2 += " and 1=1";
            }
            if (string.IsNullOrEmpty(re[1]) || string.IsNullOrEmpty(re[2]))
            {
                WhereStr2 += " and 1=1";
            }
            else
            {
                WhereStr2 += " and o.paytime>='" + re[1] + "' and o.paytime<='" + re[2] + "'";
            }
            if (Code == "All")
            {
                WhereStr = "source='" + UserId + "' ";
            }
            else
            {
                if (re.Length == 4)
                {
                    UserId = int.Parse(re[3]);
                }
                WhereStr = "source='" + UserId + "' ";
            }

            List <GameUser> list = new List <GameUser>();

            list = gum.GetSpreadUser(PageSize, PageNum, WhereStr, "addtime desc");
            string HtmlStr = "";

            foreach (GameUser gu in list)
            {
                //if (Code == "UnderDetail")
                //{
                //    HtmlStr += "<tr><td><a style=\"width: 20px; margin-right: 5px;\" onclick=\"ShowUser(this,'" + gu.Id + "')\"><img src=\"/Images/add01.png\" height=\"20\" /></a><span>" + gu.UserName + "</span></td><td>" + gu.AddTime + "</td><td>" + om.GetSumMoney(gu.Id, WhereStr2) + "</td><td>" + om.GetAllSpreadCount(gu.Id) + "</td><td><a  href=\"javascript:InitPageContent('UnderUserDetail')\" onclick=\"UpdateUserSource('D','" + gu.Id + "')\">撤销推广员</a></td></tr>";
                //}
                //else
                //{
                GameUser spread = gum.GetGameUser(UserId);
                if (spread.IsSpreader == 2)
                {
                    if (gu.IsSpreader == 1)
                    {
                        HtmlStr += "<tr><td><a style=\"width: 20px; margin-right: 5px;\" onclick=\"ShowUser(this,'" + gu.Id + "')\"><img src=\"/Images/add01.png\" height=\"20\" /></a><span>" + gu.UserName + "</span></td><td>" + gu.AddTime + "</td><td>" + om.GetSumMoney(gu.Id, WhereStr2) + "</td><td>" + om.GetAllSpreadCount(gu.Id) + "</td><td><a href=\"javascript:InitPageContent('SpreadUser')\" onclick=\"Reset('/SpreadCenter/ResetSpreader?UId=" + gu.Id + "')\">重置推广员</a></td></tr>";
                    }
                    else
                    {
                        HtmlStr += "<tr><td>" + gu.UserName + "</td><td>" + gu.AddTime + "</td><td>" + om.GetSumMoney(gu.Id, WhereStr2) + "</td><td>" + gu.Ip + "</td><td><a href=\"javascript:InitPageContent('SpreadUser')\" onclick=\"UpdateUserSource('U','" + gu.Id + "')\">提升为推广员</a></td></tr>";
                    }
                }
                else
                {
                    HtmlStr += "<tr><td>" + gu.UserName + "</td><td>" + gu.AddTime + "</td><td>" + om.GetSumMoney(gu.Id, WhereStr2) + "</td><td>" + gu.Ip + "</td></tr>";
                }
                //}
            }
            context.Response.Write(HtmlStr);
        }