예제 #1
0
        public void GetAllPayHistory2(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='******' and State=2";
            DataTable dt       = new DataTable();

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

            foreach (DataRow row in dt.Rows)
            {
                string Consumerobjects = "";
                if ((int)row["GameId"] == 0 || (int)row["ServerId"] == 0)
                {
                    Consumerobjects = "充值平台币";
                }
                else
                {
                    Consumerobjects = row["GameName"] + "-" + row["ServerName"];
                }
                HtmlStr += "<tr><td>" + row["PayTime"] + "</td><td>" + row["PayMoney"] + "</td><td>" + Consumerobjects + "</td></tr>";
            }
            context.Response.Write(HtmlStr);
        }
예제 #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());
        }
예제 #3
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());
        }
예제 #4
0
        public void GetSpreadMoney(HttpContext context)
        {
            string WhereStr = context.Request["WhereStr"];
            int    UserId   = BBRequest.GetUserId();

            string[] re = WhereStr.Split('|');
            WhereStr = "";
            if (!string.IsNullOrEmpty(re[0]))
            {
                WhereStr += " and o.gameid = " + re[0];
            }
            else
            {
                WhereStr += " and 1=1";
            }
            if (string.IsNullOrEmpty(re[1]) || string.IsNullOrEmpty(re[2]))
            {
                WhereStr += " and 1=1";
            }
            else
            {
                WhereStr += " and o.paytime>='" + re[1] + "' and o.paytime<='" + re[2] + "'";
            }
            context.Response.Write(om.GetSumMoney(UserId, WhereStr));
        }
예제 #5
0
        public ActionResult PayHistory()
        {
            ViewData["PayHistoryOn"] = "ch_son_p_cur";
            ViewData["UserInfo3On"]  = "ch_id_cur";
            ViewData["menu1On"]      = "reddot";
            ViewData["menu2On"]      = "reddot";
            ViewData["menu3On"]      = "pay_menu_cur1";

            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";
                }
            }

            ViewData["Money"] = gu.Money;
            return(View());
        }
예제 #6
0
        public void ProcessRequest(HttpContext context)
        {
            //取得处事类型
            string action = BBRequest.GetQueryString("action");
            string a      = context.Request["action"];

            switch (action)
            {
            case "SingleFile":     //单文件
                SingleFile(context);
                break;

            case "MultipleFile":     //多文件
                MultipleFile(context);
                break;

            case "AttachFile":     //附件
                AttachFile(context);
                break;

            case "EditorFile":     //编辑器文件
                EditorFile(context);
                break;

            case "ManagerFile":     //管理文件
                ManagerFile(context);
                break;
            }
        }
예제 #7
0
        public string DoUpadatePwd()
        {
            string Pwd  = Request["PWD"];
            string APwd = Request["APwd"];

            if (string.IsNullOrEmpty(Pwd.Trim()))
            {
                return("请输入密码!");
            }
            if (!DevRegHel.RegPwd(Pwd.Trim()))
            {
                return("密码输入错误!");
            }
            if (Pwd.Trim() != APwd.Trim())
            {
                return("两次输入的密码不一致!");
            }
            int UserId = BBRequest.GetUserId();
            int Type   = (int)Session["Type"];

            if (UserId > 0)
            {
                GameUser gu = gum.GetGameUser(UserId);
                gu.PWD = DESEncrypt.Md5(Pwd, 32);
                gum.UpdateUser(gu);
                vdcm.DelValiDateCode(UserId, Type);
            }
            else
            {
                return("您的验证已过期!");
            }
            return(null);
        }
예제 #8
0
        /// <summary>
        /// 生成一个订单
        /// </summary>
        /// <param name="OrderCode">订单标识码</param>
        /// <param name="GameId">游戏Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="Type">订单类型</param>
        /// <param name="PayTypeId">支付类型</param>
        /// <param name="UserName">充值用户</param>
        /// <param name="Money">充值金额(RMB/元)</param>
        /// <param name="AdminUserName">操作员</param>
        /// <returns></returns>
        public Orders GetOrder(string OrderCode, string GameId, int ServerId, int Type, int PayTypeId, string UserName, float Money, string AdminUserName)
        {
            Thread.Sleep(8);
            Orders o = new Orders();

            if (CheckOrder(GameId, ServerId, Type, PayTypeId, UserName, Money, AdminUserName))
            {
                GameServerServers gss = new GameServerServers();
                GamesServers      gs  = new GamesServers();
                o.Type      = Type;
                o.PayTypeId = PayTypeId;
                o.State     = 0;
                o.UserName  = UserName;
                o.PayTime   = DateTime.Now;
                o.Ip        = BBRequest.GetIP();
                if (!string.IsNullOrEmpty(AdminUserName))
                {
                    o.AdminUserName = AdminUserName;
                }
                else
                {
                    o.AdminUserName = "******";
                }
                if (PayTypeId == 7)
                {
                    o.PMoney = o.PayMoney = Money / 10;
                }
                else
                {
                    o.PMoney = o.PayMoney = Money;
                }
                if (Type == 1)
                {
                    if (GameId.ToString().Length == 1)
                    {
                        GameId = "00" + GameId;
                    }
                    else if (GameId.ToString().Length == 2)
                    {
                        GameId = "0" + GameId;
                    }
                    o.OrderNo    = OrderCode + DateTime.Now.ToString("yyyyMMddHHmmss") + DateTime.Now.Millisecond + GameId + gss.GetGameServer(ServerId).QuFu;
                    o.GameId     = int.Parse(GameId);
                    o.ServerId   = ServerId;
                    o.GameName   = gs.GetGame(o.GameId).Name;
                    o.ServerName = gss.GetGameServer(ServerId).Name;
                }
                else
                {
                    o.OrderNo    = OrderCode + DateTime.Now.ToString("yyyyMMddHHmmss") + DateTime.Now.Millisecond + 0 + 0;
                    o.GameId     = 0;
                    o.ServerId   = 0;
                    o.GameName   = "适用所有游戏";
                    o.ServerName = "适用所有区服";
                }
            }
            return(o);
        }
예제 #9
0
        public string DoLogin()
        {
            string UserName = Request["UserName"].Trim();
            string PWD      = Request["PWD"].Trim();
            string Code     = Request["Code"].Trim();

            if (string.IsNullOrEmpty(UserName))
            {
                return("请输入用户名!");
            }
            if (string.IsNullOrEmpty(PWD))
            {
                return("请输入密码!");
            }
            if (string.IsNullOrEmpty(Code))
            {
                return("请输入验证码!");
            }
            if (Session[Keys.SESSION_CODE] == null)
            {
                return("验证码已过期,请刷新验证码!");
            }
            if (Code.ToLower() != Session[Keys.SESSION_CODE].ToString().ToLower())
            {
                return("您输入的验证码不正确!");
            }
            if (!gum.IsGameUser(UserName))
            {
                return("您输入的用户不存在!");
            }
            GameUser gu = new GameUser();

            gu = gum.GetGameUser(UserName, DESEncrypt.Md5(PWD, 32));
            if (gu == null)
            {
                return("您输入的用户或密码有误!");
            }
            if (gu.IsLock == 1)
            {
                return("您输入的用户或密码有误!");
            }
            if (alm.IsLock(BBRequest.GetIP()))
            {
                return("您输入的用户或密码有误!");
            }
            Session[Keys.SESSION_USER] = gu.Id;
            Session.Timeout            = 120;
            gum.UpdateLastLogin(gu.Id);
            if (Request["ck1"] == "on")
            {
                Utils.WriteCookie("6qmgamesame", DESEncrypt.DesEncrypt(UserName) + "|" + DESEncrypt.DesEncrypt(PWD), 10080);
            }
            else
            {
                Utils.WriteCookie("6qmgamesame", "", -10);
            }
            return("True");
        }
예제 #10
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());
        }
예제 #11
0
        private void AddMasterLog(Master master)
        {
            manager_log ml = new manager_log();

            ml.user_id     = master.Id;
            ml.user_name   = master.UserName;
            ml.action_type = "Login";
            ml.note        = master.RoleType + "登录";
            ml.login_ip    = BBRequest.GetIP();
            ml.login_time  = DateTime.Now;
            new MasterManager().AddMasterLog(ml);
        }
예제 #12
0
 public ActionResult Index()
 {
     try
     {
         string Action  = Request["Action"];
         string annalID = Request["annalID"];
         if (string.IsNullOrEmpty(Action))
         {
             return(Redirect("about:blank"));
         }
         else if (alm.IsLock(Action))
         {
             return(Redirect("about:blank"));
         }
         else if (alm.IsLock(BBRequest.GetIP()))
         {
             return(Redirect("about:blank"));
         }
         else
         {
             int      s = 0;
             string[] a = DESEncrypt.Decrypt(Action).Split('|');
             string   b = a[0];
             string   c = a[1];
             if (int.TryParse(a[0], out s) && int.TryParse(a[1], out s))
             {
                 GameUser gu = new GameUser();
                 gu = gum.GetGameUser(int.Parse(a[0]));
                 if (gu != null)
                 {
                     if (gu.IsSpreader > 0)
                     {
                         ViewData["Action"] = Action;
                     }
                     else
                     {
                         return(Redirect("about:blank"));
                     }
                 }
             }
         }
         if (!string.IsNullOrEmpty(annalID))
         {
             Session["annalID"] = annalID;
         }
     }
     catch (Exception)
     {
         return(Redirect("about:blank"));
     }
     return(View("~/Views/SpreadCenter/Tg.cshtml"));
 }
예제 #13
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"));
            }
        }
예제 #14
0
        public Boolean DelUserMsg(int M)
        {
            int UserId = BBRequest.GetUserId();

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

            if (UserId > 0)
            {
                return(View());
            }
            else
            {
                return(RedirectToAction("Login", "Home"));
            }
        }
예제 #17
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());
        }
예제 #18
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());
        }
예제 #19
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());
        }
예제 #20
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"));
            }
        }
예제 #21
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);
        }
예제 #22
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);
        }
예제 #23
0
        public ActionResult ValiDateCode()
        {
            string ucode  = BBRequest.GetQueryString("ucode");
            string tcode  = BBRequest.GetQueryString("tcode");
            string scode  = BBRequest.GetQueryString("scode");
            string vicode = BBRequest.GetQueryString("vicode");

            ViewData["MsgStyle"]       = "";
            ViewData["UpdatePwdStyle"] = "";
            if (string.IsNullOrEmpty(ucode) || string.IsNullOrEmpty(tcode) || string.IsNullOrEmpty(scode) || string.IsNullOrEmpty(vicode))
            {
                ViewData["Msg"]            = "验证失败";
                ViewData["MsgText"]        = "您的验证信息错误或已过期,请登录用户中心重新发送!";
                ViewData["UpdatePwdStyle"] = "display: none;";
                return(View());
            }
            int userid = int.Parse(DESEncrypt.decryptstring1(ucode));
            int type   = int.Parse(DESEncrypt.decryptstring1(tcode));

            vicode = vicode.Substring(0, 10) + " " + vicode.Substring(10, 8);
            DateTime dt1 = DateTime.Parse(vicode);

            if (!vdcm.ExitValiDateCode(userid, type, dt1.AddHours(-47)))
            {
                ViewData["Msg"]            = "验证失败";
                ViewData["MsgText"]        = "您的验证信息错误或已过期,请登录用户中心重新发送!";
                ViewData["UpdatePwdStyle"] = "display: none;";
                return(View());
            }
            validatecode vcode = vdcm.GetValiDateCode(userid, type);

            if (vcode.code != scode)
            {
                ViewData["Msg"]            = "验证失败";
                ViewData["MsgText"]        = "您的验证信息错误或已过期,请登录用户中心重新发送!";
                ViewData["UpdatePwdStyle"] = "display: none;";
                return(View());
            }
            ViewData["MsgStyle"]       = "display: none;";
            Session[Keys.SESSION_USER] = userid;
            Session["Type"]            = type;
            Session.Timeout            = 20;
            return(View());
        }
예제 #24
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());
        }
예제 #25
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);
        }
예제 #26
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());
        }
예제 #27
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));
        }
예제 #28
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|您还未登陆,或登陆信息已经超时,请重新登陆!");
            }
        }
예제 #29
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"));
            }
        }
예제 #30
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());
        }