示例#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.ktv789().Exists(id))
        {
            Utils.Error("不存在的记录", "");
        }
        BCW.Model.Game.ktv789 model = new BCW.BLL.Game.ktv789().Getktv789(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,GoldType,PayCent,Expir,id,act";
        string strType = "text,select,select,num,num,hidden,hidden";
        string strValu = "" + model.StName + "'" + model.Types + "'" + model.GoldType + "'" + model.PayCent + "'" + model.Expir + "'" + id + "'editsave";
        string strEmpt = "false,1|初级对决|2|中级对决|3|终级对决,0|正常游戏|1|奖币游戏,false,false,false";
        string strIdea = "/";
        string strOthe = "修改|reset,ktv789.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("ktv789.aspx?act=del&amp;id=" + id + "") + "\">删除房间</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("ktv789.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 />"));
    }
示例#2
0
    /// <summary>
    /// 游戏首页
    /// </summary>
    private void ReloadPage()
    {
        int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-4]$", "1"));

        Master.Title = "Ktv789管理";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏</a>&gt;Ktv789");
        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("ktv789.aspx?ptype=1") + "\">初级</a>|");
        }

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

        if (ptype == 3)
        {
            builder.Append("终级对决");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("ktv789.aspx?ptype=3") + "\">终级</a>");
        }


        builder.Append("<br /><a href=\"" + Utils.getUrl("ktv789.aspx?act=top") + "\">排行榜单</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("ktv789.aspx?act=speak") + "\">闲聊</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("ktv789.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.ktv789> listktv789 = new BCW.BLL.Game.ktv789().Getktv789s(pageIndex, pageSize, strWhere, out recordCount);

        if (listktv789.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.ktv789 n in listktv789)
            {
                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("ktv789.aspx?act=edit&amp;id={0}") + "\">[管理]&gt;</a>", n.ID);
                builder.AppendFormat("{0}", n.StName);
                builder.Append("<br />");
                builder.AppendFormat("<a href=\"" + Utils.getUrl("ktv789.aspx?act=speak&amp;id={0}") + "\">闲聊</a>&gt;", n.ID);
                builder.AppendFormat("<a href=\"" + Utils.getUrl("ktv789.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("ktv789.aspx?act=add") + "\">添加房间</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("../xml/ktv789set.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 />"));
    }
示例#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.ktv789().Exists(id))
            {
                Utils.Error("不存在的记录", "");
            }
            StName = new BCW.BLL.Game.ktv789().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=2 and NodeId=" + id + "";
        }
        else
        {
            strWhere = "Types=2";
        }

        // 开始读取列表
        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("ktv789.aspx?act=clearmsg&amp;id=" + id + "") + "\">清空动作</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("ktv789.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 />"));
    }