Esempio n. 1
0
    /// <summary>
    /// 修改房间
    /// </summary>
    private void EditPage()
    {
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误"));

        if (!new BCW.BLL.Game.Stone().Exists(id))
        {
            Utils.Error("不存在的记录", "");
        }
        BCW.Model.Game.Stone model = new BCW.BLL.Game.Stone().GetStone(id);
        Master.Title = "修改" + model.StName + "房间";

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("修改" + model.StName + "房间");
        builder.Append(Out.Tab("</div>", ""));

        string strText = "房间名称:/,房间类型:/,出手方式:/,最小下注额:/,最大下注额:/,超时秒数:/,,";
        string strName = "StName,Types,ShotTypes,SmallPay,BigPay,Expir,id,act";
        string strType = "text,select,select,num,num,num,hidden,hidden";
        string strValu = "" + model.StName + "'" + model.Types + "'" + model.ShotTypes + "'" + model.SmallPay + "'" + model.BigPay + "'" + model.Expir + "'" + id + "'editsave";
        string strEmpt = "false,1|二人对决|2|三人对决|3|生死战|4|混战区,0|自由出手|1|轮流出手,false,false,false,false";
        string strIdea = "/";
        string strOthe = "修改|reset,stone.aspx,post,1,red|blue";

        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=del&amp;id=" + id + "") + "\">删除房间</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx") + "\">返回上一级</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }
Esempio n. 2
0
    /// <summary>
    /// 游戏首页
    /// </summary>
    private void ReloadPage()
    {
        int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-4]$", "1"));

        Master.Title = "剪刀管理";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏</a>&gt;石头剪刀布");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));

        if (ptype == 1)
        {
            builder.Append("二人对决|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?ptype=1") + "\">二人</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("三人对决|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?ptype=2") + "\">三人</a>|");
        }

        if (ptype == 3)
        {
            builder.Append("生死战|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?ptype=3") + "\">生死</a>|");
        }

        if (ptype == 4)
        {
            builder.Append("混战区");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?ptype=4") + "\">混战</a>");
        }

        builder.Append("<br /><a href=\"" + Utils.getUrl("stone.aspx?act=top") + "\">排行榜单</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=speak") + "\">闲聊</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=msg") + "\">动作</a>");

        builder.Append(Out.Tab("</div>", "<br />"));

        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = "";

        string[] pageValUrl = { "ptype" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        strWhere = "Types=" + ptype + "";

        // 开始读取列表
        IList <BCW.Model.Game.Stone> listStone = new BCW.BLL.Game.Stone().GetStones(pageIndex, pageSize, strWhere, out recordCount);

        if (listStone.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Stone n in listStone)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", "<br />"));
                    }
                }
                builder.AppendFormat("<a href=\"" + Utils.getUrl("stone.aspx?act=edit&amp;id={0}") + "\">[管理]&gt;</a>", n.ID);
                builder.AppendFormat("{0}", n.StName);
                builder.Append("<br />");
                builder.AppendFormat("<a href=\"" + Utils.getUrl("stone.aspx?act=speak&amp;id={0}") + "\">闲聊</a>&gt;", n.ID);
                builder.AppendFormat("<a href=\"" + Utils.getUrl("stone.aspx?act=msg&amp;id={0}") + "\">动作记录</a>", n.ID);
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=add") + "\">添加房间</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("../xml/stoneset.aspx?backurl=" + Utils.PostPage(1) + "") + "\">游戏配置</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }
Esempio n. 3
0
    /// <summary>
    /// 系统动作记录
    /// </summary>
    private void MsgPage()
    {
        int    id     = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0"));
        string StName = string.Empty;

        if (id != 0)
        {
            if (!new BCW.BLL.Game.Stone().Exists(id))
            {
                Utils.Error("不存在的记录", "");
            }
            StName = new BCW.BLL.Game.Stone().GetStName(id);
        }

        Master.Title = "" + StName + "系统动作记录";
        builder.Append(Out.Tab("<div class=\"title\">" + StName + "系统动作记录</div>", ""));

        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = "";

        string[] pageValUrl = { "id", "act" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        if (id != 0)
        {
            strWhere = "Types=1 and NodeId=" + id + "";
        }
        else
        {
            strWhere = "Types=1";
        }

        // 开始读取列表
        IList <BCW.Model.Action> listAction = new BCW.BLL.Action().GetActions(pageIndex, pageSize, strWhere, out recordCount);

        if (listAction.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Action n in listAction)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", "<br />"));
                    }
                }

                builder.AppendFormat("{0}{1}({2}前)", "系统:", n.Notes, DT.DateDiff(DateTime.Now, n.AddTime));
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=clearmsg&amp;id=" + id + "") + "\">清空动作</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx") + "\">返回上一级</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }