Esempio n. 1
0
    private void EditPage()
    {
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "聊天室ID错误"));

        Master.Title = "编辑猜猜";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("编辑猜猜");
        builder.Append(Out.Tab("</div>", ""));
        BCW.Model.Game.Free model = new BCW.BLL.Game.Free().GetFree(id);
        if (model == null)
        {
            Utils.Error("不存在的猜猜记录", "");
        }
        string strText = "猜猜乐题目:/,猜猜乐描述:/,用户ID:/,用户昵称:/,猜猜单份价格:/,截止时间:/,承诺开奖时间:/,猜猜状态:/,猜猜类型:/,,,";
        string strName = "Title,Content,UserID,UserName,Price,CloseTime,OpenTime,State,CclType,id,act,backurl";
        string strType = "text,textarea,num,text,num,date,date,select,select,hidden,hidden,hidden";
        string strValu = "" + model.Title + "'" + model.Content + "'" + model.UserID + "'" + model.UserName + "'" + model.Price + "'" + model.CloseTime + "'" + model.OpenTime + "'" + model.State + "'" + model.CclType + "'" + id + "'editsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,false,false,false,false,false,0|正在进行|1|等待确认|2|已结束,1|足球|2|篮球|3|彩票|4|股票|6|体育综合|7|日常生活,false,false,false";
        string strIdea = "/";
        string strOthe = "编辑猜猜|reset,free.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.getPage("free.aspx") + "\">返回上一级</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("free.aspx?act=del&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">删除此猜猜</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
    private void ReloadPage()
    {
        Master.Title = "猜猜乐管理";
        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-1]$", "0"));

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏</a>&gt;");
        builder.Append("猜猜乐");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (ptype == 0)
        {
            builder.Append("正在进行|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("free.aspx?ptype=0") + "\">正在进行</a>|");
        }

        if (ptype == 1)
        {
            builder.Append("已结束");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("free.aspx?ptype=1") + "\">已结束</a>");
        }

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

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

        string[] pageValUrl = { "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        //查询条件
        if (ptype == 0)
        {
            strWhere = "State<>2";
        }
        else
        {
            strWhere = "State=2";
        }

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

        if (listFree.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Free n in listFree)
            {
                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("free.aspx?act=edit&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">[管理]&gt;</a>{1}.<a href=\"" + Utils.getUrl("free.aspx?act=paylist&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}</a>", n.ID, (pageIndex - 1) * pageSize + k, n.Title);
                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("free.aspx?act=clear") + "\">清空记录</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("../toplist.aspx?act=top&amp;ptype=3&amp;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 />"));
    }