Exemplo n.º 1
0
    private void EditCentPage()
    {
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID无效"));

        BCW.Model.Forumvotelog model = new BCW.BLL.Forumvotelog().GetForumvotelog(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("编辑奖励");
        builder.Append(Out.Tab("</div>", ""));
        string strText = "用户ID:/,用户昵称:/,管理员ID:/,主题标题:/,cID:/,论坛ID:/,日志内容:/,添加时间:/,,,";
        string strName = "UsID,UsName,AdminId,Title,BID,ForumId,Notes,AddTime,id,act,backurl";
        string strType = "num,text,num,text,num,num,textarea,date,hidden,hidden,hidden";
        string strValu = "" + model.UsID + "'" + model.UsName + "'" + model.AdminId + "'" + model.Title + "'" + model.BID + "'" + model.ForumId + "'" + model.Notes + "'" + DT.FormatDate(model.AddTime, 0) + "'" + id + "'editcentsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,false,false,false,false,false,false,false,false,false";
        string strIdea = "/";
        string strOthe = "确定编辑,Gsadmin.aspx,post,1,red";

        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("Gsadmin.aspx?act=cent") + "\">返回上级</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">应用中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }
Exemplo n.º 2
0
    private void CentListPage()
    {
        int forumid = int.Parse(Utils.GetRequest("forumid", "all", 1, @"^[0-9]\d*$", "0"));

        if (forumid > 0)
        {
            if (!new BCW.BLL.Forum().Exists2(forumid))
            {
                Utils.Success("访问论坛", "该论坛不存在或已暂停使用", Utils.getUrl("forum.aspx"), "1");
            }
            if (new BCW.User.ForumInc().IsForumGSIDS(forumid) == true)
            {
            }
            else
            {
                Utils.Error("不存在的记录", "");
            }
        }
        Master.Title = "高手奖励记录";

        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string Title = string.Empty;
        int    hid   = int.Parse(Utils.GetRequest("hid", "all", 1, @"^[0-9]\d*$", "0"));

        if (hid > 0)
        {
            Title = new BCW.BLL.User().GetUsName(hid);
            if (Title == "")
            {
                Utils.Error("不存在的会员记录", "");
            }

            Title = "<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "(" + hid + ")</a>";
        }
        else
        {
            if (forumid > 0)
            {
                Title = new BCW.BLL.Forum().GetTitle(forumid);
            }
            else
            {
                Title = "财经论坛";
            }
        }

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("" + Title + "-奖励记录");
        builder.Append(Out.Tab("</div>", "<br />"));

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

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

        if (hid > 0)
        {
            strWhere = "UsID=" + hid + "";
        }
        else
        {
            if (forumid > 0)
            {
                strWhere = "ForumId=" + forumid + "";
            }
        }
        // 开始读取列表
        IList <BCW.Model.Forumvotelog> listForumvotelog = new BCW.BLL.Forumvotelog().GetForumvotelogs(pageIndex, pageSize, strWhere, out recordCount);

        if (listForumvotelog.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Forumvotelog n in listForumvotelog)
            {
                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.Append("" + ((pageIndex - 1) * pageSize + k) + ".");
                if (hid == 0)
                {
                    builder.Append("奖励会员:<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a><br />");
                }
                builder.Append("主题:<a href=\"" + Utils.getUrl("topic.aspx?forumid=" + n.ForumId + "&amp;bid=" + n.BID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.Title + "</a>(" + DT.FormatDate(n.AddTime, 1) + ")");
                builder.Append("<br />" + n.Notes);

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }

        builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
        if (hid > 0)
        {
            builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=centlist&amp;forumid=" + forumid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">本坛奖励记录&gt;&gt;</a><br />");
        }
        else
        {
            if (forumid > 0)
            {
                builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=centlist&amp;backurl=" + Utils.getPage(0) + "") + "\">全部奖励记录&gt;&gt;</a><br />");
            }
        }

        builder.Append("<a href=\"" + Utils.getPage("forum.aspx?forumid=" + forumid + "") + "\">&lt;&lt;返回上级</a>");
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?backurl=" + Utils.getPage(0) + "") + "\">上级</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">论坛</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Exemplo n.º 3
0
    private void CentListPage()
    {
        int forumid = int.Parse(Utils.GetRequest("forumid", "get", 1, @"^[0-9]\d*$", "0"));

        string Title = string.Empty;
        int    hid   = int.Parse(Utils.GetRequest("hid", "all", 1, @"^[0-9]\d*$", "0"));

        if (hid > 0)
        {
            Title = new BCW.BLL.User().GetUsName(hid);
            if (Title == "")
            {
                Utils.Error("不存在的会员记录", "");
            }

            Title = "<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "(" + hid + ")</a>";
        }
        else
        {
            Title = new BCW.BLL.Forum().GetTitle(forumid);
        }

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("" + Title + "-奖励记录");
        builder.Append(Out.Tab("</div>", "<br />"));

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

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

        if (hid > 0)
        {
            strWhere = "UsID=" + hid + "";
        }
        else
        {
            strWhere = "ForumId=" + forumid + "";
        }

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

        if (listForumvotelog.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Forumvotelog n in listForumvotelog)
            {
                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.Append("" + ((pageIndex - 1) * pageSize + k) + ".");
                if (hid == 0)
                {
                    builder.Append("奖励会员:<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a><br />");
                }
                builder.Append("主题:<a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid=" + n.ForumId + "&amp;bid=" + n.BID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.Title + "</a>(" + DT.FormatDate(n.AddTime, 1) + ")");
                builder.Append("<br />" + n.Notes);
                builder.Append("<a href=\"" + Utils.getUrl("Gsadmin.aspx?act=editcent&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">【编辑】</a>");

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.ForumMultiPage(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.getPage("Gsadmin.aspx?act=cent") + "\">返回上级</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">应用中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }