Example #1
0
    private void VerifyPage()
    {
        string info = Utils.GetRequest("info", "all", 1, "", "");
        int    id   = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误"));

        if (info == "")
        {
            Master.Title = "审核" + ub.GetSub("GroupName", xmlPath) + "";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定审核此" + ub.GetSub("GroupName", xmlPath) + "吗.");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("group.aspx?info=ok&amp;act=verify&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">同意创圈</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("group.aspx?info=ok2&amp;act=verify&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">撤销该申请</a><br />");
            builder.Append("<a href=\"" + Utils.getPage("group.aspx?ptype=1") + "\">再看看吧..</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            BCW.Model.Group model = new BCW.BLL.Group().GetGroup(id);
            if (model == null)
            {
                Utils.Error("不存在的" + ub.GetSub("GroupName", xmlPath) + "记录", "");
            }
            if (model.Status != 1)
            {
                Utils.Error("不存在的审核记录", "");
            }
            if (info == "ok")
            {
                new BCW.BLL.Group().UpdateStatus(id, 0);
                Utils.Success("审核" + ub.GetSub("GroupName", xmlPath) + "", "审核" + ub.GetSub("GroupName", xmlPath) + "成功..", Utils.getPage("group.aspx"), "1");
            }
            else if (info == "ok2")
            {
                //操作币
                new BCW.BLL.User().UpdateiGold(model.UsID, Convert.ToInt64(ub.GetSub("GroupAddPrice", xmlPath)), "被撤销申请" + ub.GetSub("GroupName", xmlPath) + "返还");
                new BCW.BLL.Guest().Add(model.UsID, new BCW.BLL.User().GetUsName(model.UsID), "系统管理员已撤销您的" + ub.GetSub("GroupName", xmlPath) + "《" + model.Title + "》申请,开圈费已返还到您的帐上,申请创圈失败!");
                new BCW.BLL.Group().Delete(id);
                Utils.Success("撤销" + ub.GetSub("GroupName", xmlPath) + "申请", "撤销" + ub.GetSub("GroupName", xmlPath) + "申请成功,系统已通过内线方式通知申请人并返还了开圈费用..", Utils.getPage("group.aspx"), "2");
            }
        }
    }
Example #2
0
    private void EditPage()
    {
        Master.Title = "编辑" + ub.GetSub("GroupName", xmlPath) + "";
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Group model = new BCW.BLL.Group().GetGroup(id);
        if (model == null)
        {
            Utils.Error("不存在的" + ub.GetSub("GroupName", xmlPath) + "记录", "");
        }
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("编辑" + ub.GetSub("GroupName", xmlPath) + "");
        builder.Append(Out.Tab("</div>", ""));
        string ExTime = model.ExTime.ToString();

        if (DT.FormatDate(model.ExTime, 0) == "1990-01-01 00:00:00")
        {
            ExTime = "0";
        }

        string strText = "基金数目:" + model.iCent + "/" + ub.GetSub("GroupName", xmlPath) + "名称:/," + ub.GetSub("GroupName", xmlPath) + "类型:/,所属城市(如广州):/," + ub.GetSub("GroupName", xmlPath) + "徽章(可空):/," + ub.GetSub("GroupName", xmlPath) + "宣言(可空):/,创建原因(可空):/,创建ID:/,基金数目:/,加入" + ub.GetSub("GroupName", xmlPath) + "限制:/,关联论坛ID:/,论坛设置:/,非成员发言性质:/,签到得币(从基金扣):/,过期时间(永不过期请填写0):/,创建时间:/,,,";
        string strName = "Title,Types,City,Logo,Notes,Content,UsID,iCent,InType,ForumId,ForumStatus,ChatStatus,SignCent,ExTime,AddTime,id,act,backurl";
        string strType = "text,select,text,text,text,textarea,snum,hidden,select,snum,select,select,snum,date,date,hidden,hidden,hidden";
        string strValu = "" + model.Title + "'" + model.Types + "'" + model.City + "'" + model.Logo + "'" + model.Notes + "'" + model.Content + "'" + model.UsID + "'" + model.iCent + "'" + model.InType + "'" + model.ForumId + "'" + model.ForumStatus + "'" + model.ChatStatus + "'" + model.SignCent + "'" + ExTime + "'" + DT.FormatDate(model.AddTime, 0) + "'" + id + "'editsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,1|地区|2|社会|3|打工|4|情感|5|生活|6|娱乐|7|音乐|8|博彩|9|军事|10|时尚|11|数码|12|体育|13|家族|14|文学|15|购物|16|汽车|17|财经|18|动漫|19|校园|20|其它,false,true,true,true,flase,false,0|不限制|1|需要验证|2|禁止加入,false,0|开放非成员|1|禁止非成员|2|暂停论坛,0|禁非成员|1|可以浏览|2|允许发言,false,false,false,false,false,false";
        string strIdea = "/";
        string strOthe = "编辑" + ub.GetSub("GroupName", xmlPath) + "|reset,group.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("group.aspx?act=del&amp;id=" + id + "") + "\">删除" + ub.GetSub("GroupName", xmlPath) + "</a><br />");
        builder.Append("<a href=\"" + Utils.getPage("group.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 />"));
    }
Example #3
0
    /// <summary>
    /// 上传文件页面
    /// </summary>
    private void UploadPage(int forumid, int bid)
    {
        string ac   = Utils.ToSChinese(Utils.GetRequest("ac", "post", 1, "", ""));
        int    meid = new BCW.User.Users().GetUsId();

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

        if (ac != "发表文本")
        {
            BCW.User.Users.ShowVerifyRole("f", meid);                                         //非验证会员提示
            new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Upfile, meid); //会员上传权限
        }
        //论坛限制性
        BCW.Model.Forum Forummodel = new BCW.BLL.Forum().GetForum(forumid);
        //圈子限制性
        BCW.Model.Group modelgr = null;
        if (Forummodel.GroupId > 0)
        {
            modelgr = new BCW.BLL.Group().GetGroupMe(Forummodel.GroupId);
            if (modelgr == null)
            {
                Utils.Error("不存在的" + ub.GetSub("GroupName", "/Controls/group.xml") + "", "");
            }
            else if (DT.FormatDate(modelgr.ExTime, 0) != "1990-01-01 00:00:00" && modelgr.ExTime < DateTime.Now)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "已过期", "");
            }
            if (modelgr.ForumStatus == 2)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛已关闭", "");
            }
            if (modelgr.ForumStatus == 1)
            {
                if (meid == 0)
                {
                    Utils.Login();
                }

                string GroupId = new BCW.BLL.User().GetGroupId(meid);
                if (GroupId.IndexOf("#" + Forummodel.GroupId + "#") == -1 && IsCTID(meid) == false)
                {
                    Utils.Error("非成员不能访问" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛!<br /><a href=\"" + Utils.getUrl("/bbs/group.aspx?act=addin&amp;id=" + Forummodel.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">加入本" + ub.GetSub("GroupName", "/Controls/group.xml") + "</a>", "");
                }
            }
        }
        BCW.User.Users.ShowForumLimit(meid, Forummodel.Gradelt, Forummodel.Visitlt, Forummodel.VisitId, Forummodel.IsPc);
        if (ac == "续传" || bid == 0)//发帖
        {
            //是否刷屏
            string appName = "LIGHT_THREAD";
            int    Expir   = Convert.ToInt32(ub.GetSub("BbsThreadExpir", xmlPath2));
            BCW.User.Users.IsFresh(appName, Expir);

            BCW.User.Users.ShowVerifyRole("a", meid);                                                   //非验证会员提示
            new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Text, meid);             //会员本身权限
            new BCW.User.FLimits().CheckUserFLimit(BCW.User.FLimits.enumRole.Role_Text, meid, forumid); //版块内权限
            BCW.User.Users.ShowAddThread(meid, Forummodel.Postlt);
        }
        else//回帖
        {
            //是否刷屏
            string appName = "LIGHT_REPLY";
            int    Expir   = Convert.ToInt32(ub.GetSub("BbsReplyExpir", xmlPath2));
            BCW.User.Users.IsFresh(appName, Expir);

            BCW.User.Users.ShowVerifyRole("b", meid);                                                    //非验证会员提示
            new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Reply, meid);             //会员本身权限
            new BCW.User.FLimits().CheckUserFLimit(BCW.User.FLimits.enumRole.Role_Reply, meid, forumid); //版块内权限
            BCW.User.Users.ShowAddReply(meid, Forummodel.Replylt);
        }
        int kk    = 0;
        int reid  = 0;
        int ptype = 5;//标识为附件帖子

        if (ac == "续传")
        {
            //上传文件
            SaveFiles(meid, forumid, bid, reid, out kk);
            string strOut = string.Empty;
            if (kk < 0)
            {
                if (kk == -999)
                {
                    kk = 0;
                }

                strOut = "部分文件超出今天上传数量导致上传失败,";
                kk     = Math.Abs(kk);
            }
            //更新帖子文件数
            new BCW.BLL.Text().UpdateFileNum(bid, kk);
            new BCW.BLL.Text().UpdateTypes(bid, ptype);
            //记录日志
            string strLog = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + new BCW.BLL.User().GetUsName(meid) + "[/url]对主题[url=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]《" + new BCW.BLL.Text().GetTitle(bid) + "》[/url]追加" + kk + "个文件!";
            new BCW.BLL.Forumlog().Add(7, forumid, bid, strLog);
            Utils.Success("追加文件", "追加" + kk + "个文件成功," + strOut + "正在返回..", ReplaceWap(Utils.getUrl("topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")), "2");
        }
        else
        {
            string mename  = new BCW.BLL.User().GetUsName(meid);
            string Title   = string.Empty;
            string Content = string.Empty;
            if (bid == 0)
            {
                Title   = Utils.GetRequest("Title", "post", 2, @"^[\s\S]{" + ub.GetSub("BbsThreadMin", xmlPath2) + "," + ub.GetSub("BbsThreadMax", xmlPath2) + "}$", "标题限" + ub.GetSub("BbsThreadMin", xmlPath2) + "-" + ub.GetSub("BbsThreadMax", xmlPath2) + "字");
                Title   = Title.Replace(char.ConvertFromUtf32(10), "").Replace(char.ConvertFromUtf32(13), "");
                Content = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{" + ub.GetSub("BbsContentMin", xmlPath2) + "," + ub.GetSub("BbsContentMax", xmlPath2) + "}$", "请输入" + ub.GetSub("BbsContentMin", xmlPath2) + "-" + ub.GetSub("BbsContentMax", xmlPath2) + "字的内容");
            }
            else
            {
                Content = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{1," + ub.GetSub("BbsReplyMax", xmlPath2) + "}$", "请输入不超" + ub.GetSub("BbsReplyMax", xmlPath2) + "字的回帖内容");
            }

            if (bid == 0)
            {
                int ThreadNum = Utils.ParseInt(ub.GetSub("BbsThreadNum", xmlPath));
                if (ThreadNum > 0)
                {
                    int ToDayCount = new BCW.BLL.Forumstat().GetCount(meid, 1);//今天发布帖子数
                    if (ToDayCount >= ThreadNum)
                    {
                        Utils.Error("系统限每天每ID限发帖子" + ThreadNum + "帖", "");
                    }
                }

                int    Price    = 0;
                int    Prices   = 0;
                int    HideType = 0;
                int    IsSeen   = 0;
                string PayCi    = string.Empty;

                BCW.Model.Text addmodel = new BCW.Model.Text();
                addmodel.ForumId     = forumid;
                addmodel.Types       = ptype;
                addmodel.Title       = Title;
                addmodel.Content     = Content;
                addmodel.HideContent = "";
                addmodel.UsID        = meid;
                addmodel.UsName      = mename;
                addmodel.Price       = Price;
                addmodel.Prices      = Prices;
                addmodel.HideType    = HideType;
                addmodel.PayCi       = PayCi;
                addmodel.IsSeen      = IsSeen;
                addmodel.AddTime     = DateTime.Now;
                addmodel.ReTime      = DateTime.Now;
                bid = new BCW.BLL.Text().Add(addmodel);
                //上传文件
                SaveFiles(meid, forumid, bid, reid, out kk);
                string strOut = string.Empty;
                if (kk < 0)
                {
                    if (kk == -999)
                    {
                        kk = 0;
                    }

                    strOut = "部分文件超出今天上传数量导致上传失败,";
                    kk     = Math.Abs(kk);
                }
                //更新帖子文件数
                new BCW.BLL.Text().UpdateFileNum(bid, kk);
                //论坛统计
                BCW.User.Users.UpdateForumStat(1, meid, mename, forumid);

                int GroupId = new BCW.BLL.Forum().GetGroupId(forumid);

                //动态记录
                if (GroupId == 0)
                {
                    new BCW.BLL.Action().Add(-1, 0, meid, mename, "在" + Forummodel.Title + "发表了文件帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]");
                }
                else
                {
                    new BCW.BLL.Action().Add(-2, 0, meid, mename, "在圈坛-" + Forummodel.Title + "发表了文件帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]");
                }
                //积分操作/论坛统计/圈子论坛不进行任何奖励

                if (GroupId == 0)
                {
                    new BCW.User.Cent().UpdateCent2(BCW.User.Cent.enumRole.Cent_Text, meid, true);
                }
                else
                {
                    if (!Utils.GetDomain().Contains("th"))
                    {
                        new BCW.User.Cent().UpdateCent2(BCW.User.Cent.enumRole.Cent_Text, meid, false);
                    }
                }
                if (kk == 0)
                {
                    new BCW.BLL.Text().UpdateTypes(bid, 0);//去掉附件帖标识
                }
                #region  这里开始修改提醒ID 发内线
                string remind = ub.GetSub("remindid" + forumid, "/Controls/bbs.xml"); //获取XML的值
                if (remind != "")                                                     //如果有提醒ID
                {
                    string[] IDS = remind.Split('#');
                    for (int i = 0; i < IDS.Length; i++)
                    {
                        if (GroupId != 0)
                        {
                            new BCW.BLL.Guest().Add(0, int.Parse(IDS[i]), new BCW.BLL.User().GetUsName(int.Parse(IDS[i])), "请注意!用户[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "(" + meid + ")[/url]在圈坛-" + Forummodel.Title + "发表了[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]的帖子");
                        }
                        else
                        {
                            new BCW.BLL.Guest().Add(0, int.Parse(IDS[i]), new BCW.BLL.User().GetUsName(int.Parse(IDS[i])), "请注意!用户[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "(" + meid + ")[/url]在" + Forummodel.Title + "发表了[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]的帖子");
                        }
                    }
                }
                #endregion
                Utils.Success("上传文件", "上传" + kk + "个文件成功," + strOut + "正在返回..", ReplaceWap(Utils.getPage("forum.aspx?forumid=" + forumid + "")), "2");
            }
            else
            {
                int ReplyNum = Utils.ParseInt(ub.GetSub("BbsReplyNum", xmlPath));
                if (ReplyNum > 0)
                {
                    int ToDayCount = new BCW.BLL.Forumstat().GetCount(meid, 2);//今天发布回帖数
                    if (ToDayCount >= ReplyNum)
                    {
                        Utils.Error("系统限每天每ID限回帖" + ReplyNum + "次", "");
                    }
                }

                int Floor = new BCW.BLL.Reply().GetFloor(bid);

                //派币帖
                string CentText = string.Empty;
                string PbCent   = string.Empty;
                int    iTypes   = new BCW.BLL.Text().GetTypes(bid);
                if (iTypes == 3)
                {
                    BCW.Model.Text p = new BCW.BLL.Text().GetPriceModel(bid);
                    if (p.Prices - p.Pricel > 0)
                    {
                        string bzText = string.Empty;
                        if (p.BzType == 0)
                        {
                            bzText = ub.Get("SiteBz");
                        }
                        else
                        {
                            bzText = ub.Get("SiteBz2");
                        }

                        long zPrice = 0;
                        if (p.Price2 > 0)
                        {
                            zPrice = Convert.ToInt64(new Random().Next(p.Price, (p.Price2 + 1)));//随机得到奖币值
                        }
                        else
                        {
                            zPrice = Convert.ToInt64(p.Price);
                        }

                        long GetPrice = 0;
                        if (p.Prices - p.Pricel < zPrice)
                        {
                            GetPrice = p.Prices - p.Pricel;
                        }
                        else
                        {
                            GetPrice = zPrice;
                        }

                        if (p.PayCi == "0")
                        {
                            if (("#" + p.ReplyID + "#").IndexOf("#" + meid + "#") == -1)
                            {
                                if (p.BzType == 0)
                                {
                                    new BCW.BLL.User().UpdateiGold(meid, mename, GetPrice, "派币帖回帖获得");
                                }
                                else
                                {
                                    new BCW.BLL.User().UpdateiMoney(meid, mename, GetPrice, "派币帖回帖获得");
                                }

                                //更新已派
                                new BCW.BLL.Text().UpdatePricel(bid, GetPrice);
                                CentText = "" + GetPrice + "" + bzText + "";
                                PbCent   = "楼主派" + GetPrice + "" + bzText + "";
                            }
                        }
                        else
                        {
                            if (("#" + p.PayCi + "#").IndexOf("#" + Utils.Right(Floor.ToString(), 1) + "#") != -1)
                            {
                                if (p.BzType == 0)
                                {
                                    new BCW.BLL.User().UpdateiGold(meid, mename, GetPrice, "派币帖回帖获得");
                                }
                                else
                                {
                                    new BCW.BLL.User().UpdateiMoney(meid, mename, GetPrice, "派币帖回帖获得");
                                }

                                //更新已派
                                new BCW.BLL.Text().UpdatePricel(bid, GetPrice);
                                CentText = "" + GetPrice + "" + bzText + "";
                                PbCent   = "踩中楼层" + Utils.Right(Floor.ToString(), 1) + "尾,楼主派" + GetPrice + "" + bzText + "";
                            }
                        }
                    }
                }

                BCW.Model.Reply model = new BCW.Model.Reply();
                model.Floor    = Floor;
                model.ForumId  = forumid;
                model.Bid      = bid;
                model.UsID     = meid;
                model.UsName   = mename;
                model.Content  = Content;
                model.FileNum  = 0;
                model.ReplyId  = 0;
                model.AddTime  = DateTime.Now;
                model.CentText = CentText;
                reid           = new BCW.BLL.Reply().Add(model);

                //更新回复ID
                string sPayID = new BCW.BLL.Text().GetReplyID(bid);
                if (("#" + sPayID + "#").IndexOf("#" + meid + "#") == -1)
                {
                    string ReplyID = string.Empty;
                    if (string.IsNullOrEmpty(sPayID))
                    {
                        ReplyID = meid.ToString();
                    }
                    else
                    {
                        ReplyID = sPayID + "#" + meid;
                    }
                    new BCW.BLL.Text().UpdateReplyID(bid, ReplyID);
                }
                //更新回复数
                new BCW.BLL.Text().UpdateReplyNum(bid, 1);
                //上传文件
                SaveFiles(meid, forumid, bid, reid, out kk);
                string strOut = string.Empty;
                if (kk < 0)
                {
                    if (kk == -999)
                    {
                        kk = 0;
                    }

                    strOut = "部分文件超出今天上传数量导致上传失败!";
                    kk     = Math.Abs(kk);
                }
                //更新回复文件数
                new BCW.BLL.Reply().UpdateFileNum(reid, kk);
                //论坛统计
                BCW.User.Users.UpdateForumStat(2, meid, mename, forumid);

                int GroupId = new BCW.BLL.Forum().GetGroupId(forumid);

                //动态记录
                if (GroupId == 0)
                {
                    new BCW.BLL.Action().Add(-1, 0, meid, mename, "在" + Forummodel.Title + "回复帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + new BCW.BLL.Text().GetTitle(bid) + "[/URL]");
                }
                else
                {
                    new BCW.BLL.Action().Add(-2, 0, meid, mename, "在圈坛-" + Forummodel.Title + "回复帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + new BCW.BLL.Text().GetTitle(bid) + "[/URL]");
                }
                //积分操作/论坛统计/圈子论坛不进行任何奖励
                if (GroupId == 0)
                {
                    new BCW.User.Cent().UpdateCent2(BCW.User.Cent.enumRole.Cent_Reply, meid, true);
                }
                else
                {
                    if (!Utils.GetDomain().Contains("th"))
                    {
                        new BCW.User.Cent().UpdateCent2(BCW.User.Cent.enumRole.Cent_Reply, meid, false);
                    }
                }
                Utils.Success("文件回帖", "回复" + kk + "个文件成功!" + strOut + "" + PbCent + "<br /><a href=\"" + ReplaceWap(Utils.getUrl("topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")) + "\">返回主题</a><br /><a href=\"" + ReplaceWap(Utils.getUrl("reply.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")) + "\">回复列表</a>", ReplaceWap(Utils.getUrl("reply.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")), "2");
            }
        }
    }
Example #4
0
    private void MorePage(int ptype)
    {
        string sText = string.Empty;

        if (ptype == 7)
        {
            sText = "圈子";
        }
        else if (ptype == 8)
        {
            sText = "论坛";
        }
        else
        {
            sText = "聊室";
        }

        Master.Title = "搜索" + sText + "";

        string keyword = Utils.GetRequest("keyword", "all", 2, @"^[\s\S]{1,10}$", "请输入1-10字的搜索关键字");

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("搜索:'" + keyword + "'结果:");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        if (ptype == 7)
        {
            DataSet ds = new BCW.BLL.Group().GetList("ID,Title", "Status=0 and Title like '%" + keyword + "%'");
            if (ds != null && ds.Tables[0].Rows.Count != 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int    id    = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
                    string Title = ds.Tables[0].Rows[0]["Title"].ToString();
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=view&amp;id=" + id + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a><br />");
                }
            }
            else
            {
                builder.Append("没有相关记录..<br />");
            }
        }
        else if (ptype == 8)
        {
            DataSet ds = new BCW.BLL.Forum().GetList("ID,Title", "IsActive=0 and Title like '%" + keyword + "%'");
            if (ds != null && ds.Tables[0].Rows.Count != 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int    id    = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
                    string Title = ds.Tables[0].Rows[0]["Title"].ToString();
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + id + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a><br />");
                }
            }
            else
            {
                builder.Append("没有相关记录..<br />");
            }
        }
        else if (ptype == 9)
        {
            DataSet ds = new BCW.BLL.Chat().GetList("ID,ChatName", "(ExTime='1990-1-1' OR ExTime>'" + DateTime.Now + "') and ChatName like '%" + keyword + "%'");
            if (ds != null && ds.Tables[0].Rows.Count != 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int    id    = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
                    string Title = ds.Tables[0].Rows[0]["ChatName"].ToString();
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/chatroom.aspx?id=" + id + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a><br />");
                }
            }
            else
            {
                builder.Append("没有相关记录..<br />");
            }
        }
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", Out.RHr()));
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("search.aspx") + "\">返回上级</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Example #5
0
    private void PositionPage(string act)
    {
        Master.Title = "查看权限";
        int hid = int.Parse(Utils.GetRequest("hid", "get", 2, @"^[0-9]\d*$", "会员ID错误"));

        if (!new BCW.BLL.User().Exists(hid))
        {
            Utils.Error("不存在的会员ID", "");
        }
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("管理会员:<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + new BCW.BLL.User().GetUsName(hid) + "(" + hid + ")</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("=当前权限=<br />");
        int GroupId = new BCW.BLL.Group().GetID(hid);

        DataSet ds = new BCW.BLL.Role().GetList("ID,UsName,RoleName,ForumID,ForumName,Include", "UsID=" + hid + " and (OverTime>='" + DateTime.Now + "' OR OverTime='1990-1-1 00:00:00') and Status=0 ORDER BY FORUMID ASC");

        if (ds != null && ds.Tables[0].Rows.Count > 0 || GroupId > 0)
        {
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int    id        = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString());
                    int    Include   = int.Parse(ds.Tables[0].Rows[i]["Include"].ToString());
                    int    forumid   = int.Parse(ds.Tables[0].Rows[i]["ForumID"].ToString());
                    string ForumName = ds.Tables[0].Rows[i]["ForumName"].ToString();
                    string UsName    = ds.Tables[0].Rows[i]["UsName"].ToString();
                    string RoleName  = ds.Tables[0].Rows[i]["RoleName"].ToString();

                    builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=edit&amp;id=" + id + "&amp;hid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[管理]</a>");
                    if (forumid == -1)
                    {
                        builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=rolece&amp;id=" + id + "&amp;hid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + RoleName + "</a> 管辖全站<br />");
                    }
                    else if (forumid == 0)
                    {
                        builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=rolece&amp;id=" + id + "&amp;hid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + RoleName + "</a> 管辖全区版块<br />");
                    }
                    else
                    {
                        builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=rolece&amp;id=" + id + "&amp;hid=" + hid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + RoleName + "</a> 管辖<a href=\"" + Utils.getPage("forum.aspx?id=" + forumid + "") + "\">" + ForumName + "</a><br />");
                    }
                }
                string Limit = new BCW.BLL.User().GetLimit(hid);
                if (!Limit.Contains("honor"))
                {
                    builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=honor&amp;hid=" + hid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">[设为荣誉版主]</a>");
                }
                else
                {
                    builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=honorno&amp;hid=" + hid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">[撤销荣誉版主]</a>");
                }
            }
            if (GroupId > 0)
            {
                builder.Append("<a href=\"" + Utils.getUrl("group.aspx?act=edit&amp;id=" + GroupId + "") + "\">" + new BCW.BLL.Group().GetTitle(GroupId) + "</a> " + ub.GetSub("GroupzName", "/Controls/group.xml") + "");
            }
        }
        else
        {
            builder.Append("普通会员");
        }
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=add&amp;uid=" + hid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">设为版主</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=add2&amp;uid=" + hid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">设为管理员</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?act=view&amp;uid=" + hid + "&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 />"));
    }
Example #6
0
    private void ReloadPage()
    {
        Master.Title = "" + ub.GetSub("GroupName", xmlPath) + "管理";
        int    ptype   = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[0-2]$", "0"));
        string keyword = Utils.GetRequest("keyword", "all", 1, @"^[^\^]{1,10}$", "");

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("" + ub.GetSub("GroupName", xmlPath) + "管理");
        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("group.aspx?ptype=0") + "\">已开通</a>|");
        }

        if (ptype == 1)
        {
            builder.Append("审核" + ub.GetSub("GroupName", xmlPath) + "|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("group.aspx?ptype=1") + "\">审核" + ub.GetSub("GroupName", xmlPath) + "</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("已过期");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("group.aspx?ptype=2") + "\">已过期</a>");
        }

        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = "";
        string strOrder = "";

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

        //查询条件
        if (keyword != "")
        {
            strWhere = "Title LIKE '%" + keyword + "%'";
        }
        else
        {
            if (ptype == 2)
            {
                strWhere = "Status=0 and ExTime<>'1990-1-1' and ExTime<'" + DateTime.Now + "'";
            }
            else
            {
                strWhere = "Status=" + ptype + "";
            }
        }
        //排序条件
        strOrder = "ID Desc";
        // 开始读取列表
        IList <BCW.Model.Group> listGroup = new BCW.BLL.Group().GetGroups(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listGroup.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Group n in listGroup)
            {
                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("group.aspx?act=edit&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">[管理]&gt;</a>{1}.<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=view&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}(ID:{0})</a>", n.ID, ((pageIndex - 1) * pageSize + k), n.Title);
                if (ptype == 1)
                {
                    builder.Append("<a href=\"" + Utils.getUrl("group.aspx?act=verify&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[审核]</a>");
                }
                else
                {
                    builder.Append("<a href=\"" + Utils.getUrl("group.aspx?act=chat&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[聊天]</a>");
                }
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        string strText = "输入关键字:/,";
        string strName = "keyword,act";
        string strType = "text,hidden";
        string strValu = "'search";
        string strEmpt = "true,false";
        string strIdea = "/";
        string strOthe = "搜" + ub.GetSub("GroupName", xmlPath) + ",group.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.getUrl("group.aspx?act=add") + "\">添加" + ub.GetSub("GroupName", xmlPath) + "</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 />"));
    }
Example #7
0
    private void EditSavePage()
    {
        int    id      = int.Parse(Utils.GetRequest("id", "post", 2, @"^[1-9]\d*$", "ID错误"));
        string Title   = Utils.GetRequest("Title", "post", 2, @"^[^\^]{1,30}$", "" + ub.GetSub("GroupName", xmlPath) + "名称限30字内");
        int    Types   = int.Parse(Utils.GetRequest("Types", "post", 2, @"^[1-9]\d*$", "" + ub.GetSub("GroupName", xmlPath) + "类型选择错误"));
        string City    = Utils.GetRequest("City", "post", 2, @"^[^\^]{2,8}$", "城市限2-8字");
        string Logo    = Utils.GetRequest("Logo", "post", 3, @"^.+?.(gif|jpg|bmp|jpeg|png)$", "请输入正确的徽章图片地址,可留空");
        string Notes   = Utils.GetRequest("Notes", "post", 3, @"^[^\^]{1,50}$", "宣言限50字内,可留空");
        string Content = Utils.GetRequest("Content", "post", 3, @"^[^\^]{1,800}$", "创建原因限800字内,可留空");
        int    UsID    = int.Parse(Utils.GetRequest("UsID", "post", 2, @"^[1-9]\d*$", "创建ID填写错误"));
        //int iCent = int.Parse(Utils.GetRequest("iCent", "post", 2, @"^[0-9]\d*$", "基金填写错误"));
        int      InType      = int.Parse(Utils.GetRequest("InType", "post", 2, @"^[0-2]$", "加入" + ub.GetSub("GroupName", xmlPath) + "限制选择错误"));
        int      ForumId     = int.Parse(Utils.GetRequest("ForumId", "post", 2, @"^[0-9]\d*$", "关联论坛ID填写错误"));
        int      ForumStatus = int.Parse(Utils.GetRequest("ForumStatus", "post", 2, @"^[0-2]$", "论坛设置选择错误"));
        int      ChatStatus  = int.Parse(Utils.GetRequest("ChatStatus", "post", 2, @"^[0-2]$", "发言性质选择错误"));
        int      SignCent    = int.Parse(Utils.GetRequest("SignCent", "post", 2, @"^[0-9]\d*$", "签到得币填写错误"));
        DateTime AddTime     = Utils.ParseTime(Utils.GetRequest("AddTime", "post", 2, DT.RegexTime, "创建时间格式填写出错,正确格式如" + DT.FormatDate(DateTime.Now, 0) + ""));
        string   sExTime     = Utils.GetRequest("ExTime", "post", 1, "", "");
        DateTime ExTime      = DateTime.Parse("1990-01-01 00:00:00");

        if (sExTime != "0")
        {
            ExTime = Utils.ParseTime(Utils.GetRequest("ExTime", "post", 2, DT.RegexTime, "过期时间填写错误,永不过期请填写0"));
        }


        BCW.Model.Group m = new BCW.BLL.Group().GetGroup(id);
        if (m == null)
        {
            Utils.Error("不存在的" + ub.GetSub("GroupName", xmlPath) + "记录", "");
        }

        if (!new BCW.BLL.User().Exists(UsID))
        {
            Utils.Error("不存在的会员ID", "");
        }
        int uid = new BCW.BLL.Group().GetUsID(id);

        if (UsID != uid && new BCW.BLL.Group().ExistsUsID(UsID))
        {
            Utils.Error("ID" + UsID + "已是其它" + ub.GetSub("GroupName", xmlPath) + "的圈主..", "");
        }
        string allCity = "#" + BCW.User.City.GetCity() + "#";

        if (allCity.IndexOf("#" + City + "#") == -1)
        {
            Utils.Error("不存在的城市名称", "");
        }
        BCW.Model.Group model = new BCW.Model.Group();
        model.ID          = id;
        model.Title       = Title;
        model.Types       = Types;
        model.City        = City;
        model.Logo        = Logo;
        model.Notes       = Notes;
        model.Content     = Content;
        model.UsID        = UsID;
        model.iCent       = m.iCent;
        model.InType      = InType;
        model.ForumId     = ForumId;
        model.ChatId      = 0;
        model.ForumStatus = ForumStatus;
        model.ChatStatus  = ChatStatus;
        model.SignCent    = SignCent;
        model.ExTime      = ExTime;
        model.AddTime     = DateTime.Now;
        new BCW.BLL.Group().Update(model);
        Utils.Success("编辑" + ub.GetSub("GroupName", xmlPath) + "", "编辑" + ub.GetSub("GroupName", xmlPath) + "成功..", Utils.getUrl("group.aspx?act=edit&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + ""), "1");
    }
Example #8
0
    /// <summary>
    /// 论坛版面
    /// </summary>
    private void ListPage(int forumid)
    {
        if (!new BCW.BLL.Forum().Exists2(forumid))
        {
            Utils.Success("访问论坛", "该论坛不存在或已暂停使用", Utils.getUrl("forum.aspx"), "1");
        }
        int meid = new BCW.User.Users().GetUsId();

        BCW.Model.Forum model   = new BCW.BLL.Forum().GetForum(forumid);
        BCW.Model.Group modelgr = null;
        if (model.GroupId > 0)
        {
            if (meid == 0)
            {
                Utils.Login();
            }

            modelgr = new BCW.BLL.Group().GetGroupMe(model.GroupId);
            if (modelgr == null)
            {
                Utils.Error("不存在的" + ub.GetSub("GroupName", "/Controls/group.xml") + "", "");
            }
            else if (DT.FormatDate(modelgr.ExTime, 0) != "1990-01-01 00:00:00" && modelgr.ExTime < DateTime.Now)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "已过期", "");
            }
            if (modelgr.ForumStatus == 2)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛已关闭", "");
            }
            string GroupId = new BCW.BLL.User().GetGroupId(meid);
            if (modelgr.ForumStatus == 1)
            {
                bool Isvi = false;
                //能够穿透的ID
                string CTID = "#" + ub.GetSub("GroupCTID", "/Controls/group.xml") + "#";
                if (CTID.IndexOf("#" + meid + "#") != -1)
                {
                    Isvi = true;
                }
                if (GroupId.IndexOf("#" + model.GroupId + "#") == -1 && Isvi == false)
                {
                    Utils.Error("非成员不能访问" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛!<br /><a href=\"" + Utils.getUrl("/bbs/group.aspx?act=addin&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">加入本" + ub.GetSub("GroupName", "/Controls/group.xml") + "</a>", "");
                }
            }
            int VipLeven = BCW.User.Users.VipLeven(meid);
            if (VipLeven == 0)
            {
                int DqNum = (Utils.GetStringNum(GroupId.Replace("##", "#"), "#") - 1);
                if (DqNum > 5)
                {
                    Utils.Error("您的VIP会员已过期,请进行续费才能同时加入5个以上的" + ub.GetSub("GroupName", "/Controls/group.xml") + ",否则只能同时加入5个才可以使用" + ub.GetSub("GroupName", "/Controls/group.xml") + "<br /><a href=\"" + Utils.getUrl("finance.aspx?act=addvip&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;我现在要续费VIP</a><br /><a href=\"" + Utils.getUrl("group.aspx?act=me&amp;backurl=" + Utils.PostPage(1) + "") + "\">&lt;&lt;我要退出一些圈子</a>", "");
                }
            }
        }
        BCW.User.Users.ShowForumLimit(meid, model.Gradelt, model.Visitlt, model.VisitId, model.IsPc);
        Master.Title = model.Title;
        //个性设置
        int FsPageSize = 10;

        if (meid > 0)
        {
            string ForumSet = new BCW.BLL.User().GetForumSet(meid);
            FsPageSize = BCW.User.Users.GetForumSet(ForumSet, 0);
        }
        int    pageIndex;
        int    recordCount;
        int    pageSize = FsPageSize;
        string strWhere = string.Empty;
        string strOrder = string.Empty;

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

        if (pageIndex == 1)
        {
            if (!string.IsNullOrEmpty(model.Logo) && Utils.IsMobileUa() == true)
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("<img src=\"" + model.Logo + "\" alt=\"load\"/>");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            //拾物随机
            builder.Append(BCW.User.Game.GiftFlows.ShowGiftFlows(1));
            //顶部滚动
            builder.Append(BCW.User.Master.OutTopRand(3));

            if (!string.IsNullOrEmpty(model.TopUbb))
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(model.TopUbb)));
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            //全区滚动
            BCW.Model.Text flow = new BCW.BLL.Text().GetTextFlow();
            if (flow != null)
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("<a href=\"" + Utils.getUrl("manager.aspx?act=flow&amp;forumid=" + flow.ForumId + "&amp;bid=" + flow.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Out.USB(TrueStrLength.cutTrueLength(flow.Title, 20, "…")) + "</a> ");
                builder.Append(Out.Tab("</div>", "<br />"));
            }

            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/addThread.aspx?forumid=" + forumid + "") + "\">发帖</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/manwork.aspx?forumid=" + forumid + "") + "\">版务</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/sktype.aspx?forumid=" + forumid + "") + "\">精华</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/forumts.aspx?forumid=" + forumid + "") + "\">专题</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/search.aspx?act=forum&amp;forumid=" + forumid + "") + "\">搜索</a> ");
            if (new BCW.User.ForumInc().IsForumGSIDS(forumid) == true)
            {
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/Gstoplist.aspx?forumid=" + forumid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">高手</a>");
            }
            builder.Append(Out.Tab("</div>", ""));
            if (model.GroupId > 0)
            {
                builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=info&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">主页</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=fund&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">基金</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=view&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">资料</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=groupid&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">成员列表</a> ");
                builder.Append(Out.Tab("</div>", ""));
            }
            //本版滚动
            flow = new BCW.BLL.Text().GetTextFlow(forumid);
            if (flow != null)
            {
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("manwork.aspx?act=flow&amp;forumid=" + forumid + "&amp;bid=" + flow.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Out.USB(TrueStrLength.cutTrueLength(flow.Title, 20, "…")) + "</a> ");
                builder.Append(Out.Tab("</div>", ""));
            }
        }

        //查询条件
        //string strWhe = "=" + forumid + "";
        //是否显示下级版块帖子
        //if (model.ShowType == 1)
        //{
        //    if (!string.IsNullOrEmpty(model.DoNode))
        //    {
        //        strWhe = "in (" + forumid + "," + model.DoNode + ")";
        //    }
        //}
        //strWhere = "IsDel=0 and (ForumId " + strWhe + " OR IsTop=2)";

        //查询条件
        strWhere = "ForumId =" + forumid + " and IsDel=0 and IsTop=0";
        //排序条件
        strOrder = "ReTime Desc";//Istop Desc,
        // 开始读取列表
        IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTexts(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listText.Count > 0)
        {
            if (pageIndex != 1)
            {
                //算出总页数
                int pageTotal = BasePage.CalcPageCount(recordCount, pageSize, ref pageIndex);
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                if (pageTotal > pageIndex)
                {
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + forumid + "&amp;page=" + (pageIndex + 1) + "&amp;backurl=" + Utils.getPage(0) + "") + "\">下一页</a>|");
                }

                builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + forumid + "&amp;page=1&amp;backurl=" + Utils.getPage(0) + "") + "\">返回首页</a> ");
                builder.Append(Out.Tab("</div>", ""));
            }
            else
            {
                //全区置顶帖子
                int     j     = 1;
                DataSet dsTop = new BCW.BLL.Text().GetList("Top 3 ID,ForumId,Title,UsID,UsName,ReplyNum,ReadNum", "IsTop=2 and IsDel=0 ORDER BY NEWID()");
                if (dsTop != null && dsTop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsTop.Tables[0].Rows.Count; i++)
                    {
                        if (j % 2 == 0)
                        {
                            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                        }
                        else
                        {
                            builder.Append(Out.Tab("<div>", "<br />"));
                        }

                        builder.AppendFormat("<i><b>[顶]</b></i><a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}", dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), Out.TitleUBB(dsTop.Tables[0].Rows[i]["Title"].ToString()));
                        builder.Append("</a><br />" + dsTop.Tables[0].Rows[i]["UsName"].ToString());
                        builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", dsTop.Tables[0].Rows[i]["ReadNum"].ToString(), dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), dsTop.Tables[0].Rows[i]["ReplyNum"].ToString());
                        j++;
                        builder.Append(Out.Tab("</div>", ""));
                    }
                }

                //本坛置顶帖子
                j     = 1;
                dsTop = new BCW.BLL.Text().GetList("Top 5 ID,ForumId,Title,UsID,UsName,ReplyNum,ReadNum", "ForumId=" + forumid + " and IsTop=1 and IsDel=0 ORDER BY ReTime Desc");
                if (dsTop != null && dsTop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsTop.Tables[0].Rows.Count; i++)
                    {
                        if (j % 2 == 0)
                        {
                            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                        }
                        else
                        {
                            builder.Append(Out.Tab("<div>", "<br />"));
                        }

                        builder.AppendFormat("<b>[顶]</b><a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}", dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), Out.TitleUBB(dsTop.Tables[0].Rows[i]["Title"].ToString()));
                        builder.Append("</a><br />" + dsTop.Tables[0].Rows[i]["UsName"].ToString());
                        builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", dsTop.Tables[0].Rows[i]["ReadNum"].ToString(), dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), dsTop.Tables[0].Rows[i]["ReplyNum"].ToString());
                        j++;
                        builder.Append(Out.Tab("</div>", ""));
                    }
                }
            }


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

                builder.Append(BCW.User.AppCase.CaseIsTop(n.IsTop));
                builder.Append(BCW.User.AppCase.CaseIsGood(n.IsGood));
                builder.Append(BCW.User.AppCase.CaseIsRecom(n.IsRecom));
                builder.Append(BCW.User.AppCase.CaseIsLock(n.IsLock));
                builder.Append(BCW.User.AppCase.CaseIsOver(n.IsOver));
                // builder.Append(BCW.User.AppCase.CaseText(n.Types)); //派币
                if (n.Types == 3)
                {
                    builder.Append("<img src=\"/files/face/money.gif\" width=\"20\" height=\"25\"  alt=\"load\"/>"); //派币
                }
                else
                {
                    builder.Append(BCW.User.AppCase.CaseText(n.Types)); //派币/附件
                }
                string TextTab = string.Empty;
                if (n.IsTop != 2)
                {
                    TextTab = BCW.User.AppCase.CaseLabel(n.LabelId, model.Label);
                }

                builder.AppendFormat("<a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}.{3}{4}", n.ForumId, n.ID, (pageIndex - 1) * pageSize + k, TextTab, n.Title);
                if (n.Types == 8)
                {
                    builder.Append("[" + n.Gaddnum + "中" + n.Gwinnum + "]");
                }
                builder.Append("</a><br />" + n.UsName);
                builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", n.ReadNum, n.ForumId, n.ID, n.ReplyNum);

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

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

        builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/addThread.aspx?forumid=" + forumid + "") + "\">发帖</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/sktype.aspx?act=text&amp;forumid=" + forumid + "") + "\">我帖</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/sktype.aspx?forumid=" + forumid + "") + "\">模式</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/forumstat.aspx?act=top&amp;forumid=" + forumid + "") + "\">排行</a>");
        builder.Append(Out.Tab("</div>", ""));

        if (!string.IsNullOrEmpty(model.Notes))
        {
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append(model.Notes);
            builder.Append(Out.Tab("</div>", ""));
        }
        //更新版块在线人数
        if (pageIndex == 1)
        {
            new BCW.BLL.User().UpdateEndForumID(meid, forumid);
            int ForumLine = new BCW.BLL.User().GetForumNum(forumid);
            if (ForumLine != model.Line)
            {
                new BCW.BLL.Forum().UpdateLine(forumid, ForumLine);
            }
        }
        builder.Append(Out.Tab("<div>", ""));
        if (ub.GetSub("BbsIsOnline", "/Controls/bbs.xml") == "0")
        {
            builder.Append(Out.Tab("", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/online.aspx?forumid=" + forumid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">在线" + model.Line + "人.最高" + model.TopLine + "人</a>");
        }
        //下级版块
        builder.Append(BCW.User.Users.ShowForumNode(model.IsNode, forumid));
        builder.Append(Out.Tab("</div>", ""));

        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        if (model.GroupId > 0)
        {
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=info&amp;id=" + model.GroupId + "") + "\">" + ub.GetSub("GroupName", "/Controls/group.xml") + "主页</a>");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + model.NodeId + "") + "\">上级论坛</a>");
        }

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

        if (!string.IsNullOrEmpty(model.FootUbb))
        {
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(model.FootUbb)));
            builder.Append(Out.Tab("</div>", ""));
        }
    }