private void EditPage() { Master.Title = "编辑帖子"; int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "帖子ID错误")); BCW.Model.Text model = new BCW.BLL.Text().GetText(id); if (model == null) { Utils.Error("不存在的帖子记录", ""); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("编辑帖子"); builder.Append(Out.Tab("</div>", "")); //得到论坛列表 string strForum = string.Empty; DataSet ds = new BCW.BLL.Forum().GetList("ID,Title", ""); if (ds != null && ds.Tables[0].Rows.Count != 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strForum += "|" + ds.Tables[0].Rows[i]["ID"] + "|" + ds.Tables[0].Rows[i]["Title"] + ""; } } strForum = Utils.Mid(strForum, 1, strForum.Length); //得到帖子类型 string Label = new BCW.BLL.Forum().GetLabel(model.ForumId); if (Label != "") { Label = "0|综合|" + Label + ""; } else { Label = "0|综合"; } string strText = "主题:/,内容:/,类型:,用户ID:/,用户昵称:/,阅读数:/,精华:,申精缩略图/,推荐:,置顶:,锁定:,结束:,删除:,回帖时间:/,所在版块:/,,"; string strName = "Title,Content,LabelId,UsID,UsName,ReadNum,IsGood,GoodSmallIcon,IsRecom,IsTop,IsLock,IsOver,IsDel,ReTime,ForumID,id,act"; string strType = "text,textarea,select,num,text,num,select,text,select,select,select,select,select,date,select,hidden,hidden"; string strValu = "" + model.Title + "'" + model.Content + "'" + model.LabelId + "'" + model.UsID + "'" + model.UsName + "'" + model.ReadNum + "'" + model.IsGood + "'" + model.GoodSmallIcon + "'" + model.IsRecom + "'" + model.IsTop + "'" + model.IsLock + "'" + model.IsOver + "'" + model.IsDel + "'" + DT.FormatDate(model.ReTime, 0) + "'" + model.ForumId + "'" + id + "'save"; string strEmpt = "false,false," + Label + ",false,false,false,0|普通|1|精华,true,0|普通|1|推荐,-1|固底|0|普通|1|普通置顶|2|全区置顶,0|普通|1|锁定,0|普通|1|结束,0|正常|1|已删,false," + strForum + ",false,false"; string strIdea = "/"; string strOthe = "确定编辑,thread.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "")); builder.Append(" <a href=\"" + Utils.getPage("thread.aspx") + "\">取消</a>"); 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("thread.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 />")); }
/// <summary> /// 添加/编辑菜单 /// </summary> private void Insert4(int leibie, int ptype, int nid, int id, string pName) { if (id != 0) { Master.Title = "编辑" + pName + ""; builder.Append(Out.Div("title", "编辑" + pName + "")); } else { Master.Title = "添加" + pName + ""; builder.Append(Out.Div("title", "添加" + pName + "")); } string strText = "" + pName + "显示名称:/,选择论坛:/,栏目后面:/,显示状态:/,显示顺序:/,,,,"; string strName = "Title,Content,IsBr,Hidden,Paixu,leibie,ptype,nid,id"; string strType = "text,select,select,select,snum,hidden,hidden,hidden,hidden"; string strForum = string.Empty; DataSet ds = new BCW.BLL.Forum().GetList("ID,Title", ""); if (ds == null || ds.Tables[0].Rows.Count == 0) { Utils.Error("你还没有任何版块..<br /><a href=\"" + Utils.getUrl("forum.aspx") + "\">马上添加</a>", ""); } for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strForum += "|" + ds.Tables[0].Rows[i]["ID"] + "|" + ds.Tables[0].Rows[i]["Title"] + "(" + ds.Tables[0].Rows[i]["ID"] + ")"; } strForum = "0|选择版块" + strForum; string strValu = ""; if (id != 0) { //读取菜单 BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); strValu = "" + model.Title + "'" + model.Content + "'" + model.IsBr + "'" + model.Hidden + "'" + model.Paixu + "'" + model.Leibie + "'" + model.Types + "'" + model.NodeId + "'" + id + ""; } else { strValu = "'''0'0'" + leibie + "'" + ptype + "'" + nid + "'" + id + ""; } string strEmpt = "false," + strForum + ",0|换行|1|不换行,0|正常显示|1|登录可见|2|隐藏显示,false,,,,"; string strIdea = "/"; string strOthe = ""; if (id != 0) { strOthe = "确定编辑|reset,classok.aspx,post,1,red|blue"; } else { strOthe = "确定添加|reset,classok.aspx,post,1,red|blue"; } builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); }
protected void Page_Load(object sender, EventArgs e) { int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } int forumid = int.Parse(Utils.GetRequest("forumid", "all", 1, @"^[1-9]\d*$", "0")); string ForumName = new BCW.BLL.Forum().GetTitle(forumid); if (ForumName == "") { Utils.Error("不存在的论坛或此论坛已暂停使用", ""); } string act = Utils.GetRequest("act", "all", 1, "", ""); switch (act) { case "view": ViewPage(forumid, ForumName, meid); break; case "add": AddPage(forumid, ForumName, meid); break; case "edit": EditPage(forumid, ForumName, meid); break; case "save": SavePage(forumid, ForumName, meid); break; case "move": MovePage(forumid, ForumName, meid); break; case "del": DelPage(forumid, ForumName, meid); break; default: ReloadPage(forumid, ForumName, meid); break; } }
private void SavePage() { int id = int.Parse(Utils.GetRequest("id", "post", 2, @"^[0-9]\d*$", "ID错误")); int forumid = int.Parse(Utils.GetRequest("forumid", "post", 2, @"^[0-9]\d*$", "ID错误")); string Title = Utils.GetRequest("Title", "post", 2, @"^[^\^]{1,30}$", "论坛名称不能超30字符"); string Notes = Utils.GetRequest("Notes", "post", 3, @"^[^\^]{1,30}$", "论坛口号不能超50字符"); string Logo = Utils.GetRequest("Logo", "post", 3, @"^[^\^]{1,200}$", "论坛LOGO不能超200字符"); string Content = Utils.GetRequest("Content", "post", 3, @"^[^\^]{1,3000}$", "版块公告不能超3000字符"); string Label = Utils.GetRequest("Label", "post", 3, @"^[^\|]{1,5}(?:\|[^\|]{1,5}){1,500}$", "帖子分类标签填写错误,例子如:1|美图|2|游戏|3|软件"); //----------计算分类合法性开始 if (Label != "") { int GetNum = Utils.GetStringNum(Label, "|"); if (GetNum % 2 == 0) { Utils.Error("帖子分类标签填写错误,例子如:1|美图|2|游戏|3|软件", ""); } string[] sTemp = Label.Split("|".ToCharArray()); for (int j = 0; j < sTemp.Length; j++) { if (j % 2 == 0) { if (sTemp[j] == "0") { Utils.Error("帖子分类标签填写错误,例子如:1|美图|2|游戏|3|软件", ""); break; } try { int a = int.Parse(sTemp[j]); } catch { Utils.Error("帖子分类标签填写错误,例子如:1|美图|2|游戏|3|软件", ""); break; } int b = int.Parse(sTemp[j]); if (j != 0) { if ((b - 1) != int.Parse(sTemp[j - 2])) { Utils.Error("帖子分类标签填写错误,例子如:1|美图|2|游戏|3|软件", ""); break; } } } } } //----------计算分类合法性结束 string TopUbb = Utils.GetRequest("TopUbb", "post", 3, @"^[^\^]{1,800}$", "版块顶部Ubb限800字内"); string FootUbb = Utils.GetRequest("FootUbb", "post", 3, @"^[^\^]{1,800}$", "版块底部Ubb限800字内"); int Postlt = int.Parse(Utils.GetRequest("Postlt", "post", 2, @"^[0-4]$", "发帖限制选择错误")); int Replylt = int.Parse(Utils.GetRequest("Replylt", "post", 2, @"^[0-4]$", "回帖限制选择错误")); int Gradelt = int.Parse(Utils.GetRequest("Gradelt", "post", 2, @"^[0-4]$", "等级级数填写错误")); int Visitlt = int.Parse(Utils.GetRequest("Visitlt", "post", 2, @"^[0-4]$", "访问限制选择错误")); int ShowType = int.Parse(Utils.GetRequest("ShowType", "post", 2, @"^[0-1]$", "显示帖子方式选择错误")); int IsNode = int.Parse(Utils.GetRequest("IsNode", "post", 2, @"^[0-1]$", "显示下级版块选择错误")); string VisitId = Utils.GetRequest("VisitId", "post", 3, @"^[^\#]{1,10}(?:\#[^\#]{1,10}){0,800}$", "限制访问ID填写错误,格式如1234#1111#2222"); int GroupId = int.Parse(Utils.GetRequest("GroupId", "post", 2, @"^[0-9]\d*$", "关联圈子ID填写错误,不关联请填写0")); int IsPc = int.Parse(Utils.GetRequest("IsPc", "post", 2, @"^[0-1]$", "电脑访问选择错误")); int IsActive = int.Parse(Utils.GetRequest("IsActive", "post", 2, @"^[0-1]$", "运行状态选择错误")); int Paixu = int.Parse(Utils.GetRequest("Paixu", "post", 2, @"^[0-9]\d*$", "排序填写错误")); //ID是否可用 if (Request["act"] == "save") { if (id != 0) { if (new BCW.BLL.Forum().Exists(id)) { Utils.Error("此ID已被使用,请选择其它ID或者填0自动分配", ""); } } else { id = new BCW.BLL.Forum().GetMaxId(); } } BCW.Model.Forum model = new BCW.Model.Forum(); model.ID = id; model.NodeId = forumid; model.Title = Title; model.Notes = Notes; model.Logo = Logo; model.Content = Content; model.Label = Label; model.Postlt = Postlt; model.Replylt = Replylt; model.Gradelt = Gradelt; model.Visitlt = Visitlt; model.ShowType = ShowType; model.IsNode = IsNode; model.VisitId = VisitId; model.GroupId = GroupId; model.IsPc = IsPc; model.IsActive = IsActive; model.TopUbb = TopUbb; model.FootUbb = FootUbb; model.Paixu = Paixu; if (Request["act"] == "save") { new BCW.BLL.Forum().Add(model); string ForUrl = string.Empty; if (forumid == 0) { ForUrl = "forum.aspx"; } else { ForUrl = "forum.aspx?act=view&id=" + forumid + ""; } // 更新forumid下级ID集合 if (forumid > 0) { BCW.User.Users.UpdateForumNode(id); } Utils.Success("添加论坛", "添加论坛成功..", Utils.getUrl(ForUrl), "1"); } else { new BCW.BLL.Forum().Update(model); Utils.Success("编辑论坛", "编辑论坛成功..", Utils.getUrl("forum.aspx?act=edit&id=" + id + ""), "1"); } }
/// <summary> /// 点赞统计列表 /// </summary> /// <param name="act"></param> /// <param name="uid"></param> /// <param name="forumid"></param> private void PraiseTopListPage(string act, int uid, int forumid) { string ForumName = "论坛"; if (forumid > 0) { ForumName = new BCW.BLL.Forum().GetTitle(forumid); } Master.Title = "" + ForumName + "TOP100"; int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-6]$", "5"));// 获取失败时 默认为1 int showtype = int.Parse(Utils.GetRequest("showtype", "get", 1, @"^[1-7]$", "6")); builder.Append(Out.Tab("<div class=\"title\">", "")); if (showtype == 6) { builder.Append("主题论坛"); } else if (showtype == 7) { builder.Append("圈子论坛"); } if (ptype == 5) { builder.Append("本月"); } else if (ptype == 6) { builder.Append("本年"); } builder.Append("排行"); 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", "ptype", "showtype", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 if (showtype == 6) //判断是主题还是圈子 { strWhere = "(Select GroupId FROM tb_Forum where ID=ForumID)=0"; } else if (showtype == 7) { strWhere = "(Select GroupId FROM tb_Forum where ID=ForumID)<>0"; } if (forumid > 0) { strWhere += " and forumid=" + forumid + ""; } //if (ptype == 5) strOrder = "sum(Praise)"; //修改strOrder ="sum(pTotal)"; // 开始读取列表 IList <BCW.Model.Text> listForumstat = new BCW.BLL.Text().GetForumstats(pageIndex, pageSize, strWhere, strOrder, ptype, out recordCount); if (listForumstat.Count > 0) { int k = 1; foreach (BCW.Model.Text n in listForumstat) { 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}.", (pageIndex - 1) * pageSize + k); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.UsID) + "(" + n.UsID + ")(" + n.Praise + "个点赞)</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=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); if (forumid > 0) { builder.Append("<a href=\"" + Utils.getPage("forum.aspx?forumid=" + forumid + "") + "\">上级</a>"); } else { builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>"); } builder.Append("-<a href=\"" + Utils.getUrl("forumstat.aspx?act=top&forumid=" + forumid + "") + "\">排行榜</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ReloadPage() { int forumid = int.Parse(Utils.GetRequest("forumid", "all", 2, @"^[0-9]\d*$", "论坛ID错误")); 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("不存在的记录", ""); } int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-2]$", "0")); Master.Title = "高手排行榜"; builder.Append(Out.Tab("<div class=\"title\">", "")); string ForumTitle = new BCW.BLL.Forum().GetTitle(forumid); builder.Append("" + ForumTitle + "-排行榜"); 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("Gstoplist.aspx?forumid=" + forumid + "&ptype=0&backurl=" + Utils.getPage(0) + "") + "\">连中榜</a>|"); } if (ptype == 1) { builder.Append("月中榜|"); } else { builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?forumid=" + forumid + "&ptype=1&backurl=" + Utils.getPage(0) + "") + "\">月中榜</a>|"); } if (ptype == 2) { builder.Append("历史"); } else { builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?forumid=" + forumid + "&ptype=2&backurl=" + Utils.getPage(0) + "") + "\">历史</a>"); } builder.Append("|<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=centlist&forumid=" + forumid + "&backurl=" + Utils.getPage(0) + "") + "\">获奖</a>"); 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", "ptype", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = "ForumId=" + forumid + " and Types=8"; if (ptype == 0) { strWhere += " and Glznum>0"; strOrder = "Glznum DESC"; } else if (ptype == 1) { strWhere += " and Gmnum>0"; strOrder = "Gmnum DESC"; } else if (ptype == 2) { strWhere += " and Gwinnum>0"; strOrder = "Gwinnum DESC"; } string GsAdminID = ub.GetSub("BbsGsAdminID", xmlPath); // 开始读取列表 IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTextsGs(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listText.Count > 0) { int k = 1; foreach (BCW.Model.Text n in listText) { 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) + ".<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>"); if (ptype == 0) { builder.Append("连中" + n.Glznum + ""); } else if (ptype == 1) { builder.Append("月中" + n.Gmnum + ""); } else { builder.Append("" + n.Gaddnum + "中" + n.Gwinnum + ""); } builder.Append("<a href=\"" + Utils.getUrl("topic.aspx?forumid=" + n.ForumId + "&bid=" + n.ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.Title + "</a>"); if (("#" + GsAdminID + "#").Contains("#" + meid + "#")) { builder.Append("|<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=cent&forumid=" + n.ForumId + "&bid=" + n.ID + "&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=\"text\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=top&backurl=" + Utils.getPage(0) + "") + "\">【各坛排行记录】</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=top2&backurl=" + Utils.getPage(0) + "") + "\">【各坛奖励记录】</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.getPage("uinfo.aspx?backurl=" + Utils.getPage(0) + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">论坛</a>"); builder.Append(Out.Tab("</div>", "")); }
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&id=" + id + "&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 + "&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 + "&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>", "")); }
private void ReloadPage() { int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-1]$", "0")); builder.Append(Out.Tab("<div class=\"title\">", "")); 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("forum.aspx?ptype=0") + "\">主题论坛</a>|"); } if (ptype == 1) { builder.Append("圈子论坛"); } else { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?ptype=1") + "\">圈子论坛</a>"); } builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; string strWhere = string.Empty; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string[] pageValUrl = { "ptype" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } if (ptype == 0) { strWhere = "NodeId=0 and GroupId=0"; } else { strWhere = "GroupId>0"; } // 开始读取专题 IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount); if (listForum.Count > 0) { int k = 1; foreach (BCW.Model.Forum n in listForum) { 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("forum.aspx?act=edit&id={0}") + "\">[管理]></a>{1}.<a href=\"" + Utils.getUrl("forum.aspx?act=view&id={0}") + "\">{2}(ID:{0})</a>", n.ID, n.Paixu, n.Title); if (n.GroupId > 0) { builder.Append("(圈坛)"); } builder.Append("[帖子" + new BCW.BLL.Forumstat().GetCount(n.ID, 1, 0) + "/回帖" + new BCW.BLL.Forumstat().GetCount(n.ID, 2, 0) + "/当前在线" + n.Line + "/最高" + n.TopLine + "]"); 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>", "")); if (ptype == 0) { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=add") + "\">添加论坛</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=add&ptype=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 />")); }
private void SavePage() { int id = int.Parse(Utils.GetRequest("id", "post", 2, @"^[0-9]\d*$", "ID错误")); int UsID = int.Parse(Utils.GetRequest("UsID", "post", 2, @"^[1-9]\d*$", "用户ID错误")); string Role = Utils.GetRequest("Role", "post", 2, @"^[\w((;|,)\w)?]+$", "选择权限错误"); Role = Role.Replace(",", ";"); int rDay = int.Parse(Utils.GetRequest("rDay", "post", 2, @"^[0-9]\d*$", "期限填写错误")); string rName = Utils.GetRequest("rName", "post", 2, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,10}$", "职称限10字内,不能使用特别字符"); int Include = int.Parse(Utils.GetRequest("Include", "post", 1, @"^[0-1]$", "0")); if (!new BCW.BLL.User().Exists(UsID)) { Utils.Error("不存在的会员ID", ""); } string ForumName = string.Empty; if (id > 0) { ForumName = new BCW.BLL.Forum().GetTitle(id); if (ForumName == "") { Utils.Error("不存在的版块ID", ""); } if (new BCW.BLL.Role().Exists(UsID, id)) { Utils.Error("ID:" + UsID + "已经是" + ForumName + "的版主", ""); } } else { if (new BCW.BLL.Role().Exists(UsID, 0)) { Utils.Error("ID:" + UsID + "已经是总版主", ""); } if (new BCW.BLL.Role().Exists(UsID, -1)) { Utils.Error("ID:" + UsID + "已经是管理员,管理员与总版不能同时兼职", ""); } } string UsName = new BCW.BLL.User().GetUsName(UsID); BCW.Model.Role model = new BCW.Model.Role(); model.UsID = UsID; model.UsName = UsName; model.ForumID = id; model.ForumName = ForumName; model.Rolece = Role; model.RoleName = rName; model.StartTime = DateTime.Now; if (rDay == 0) { model.OverTime = DateTime.Parse("1990-1-1 00:00:00"); } else { model.OverTime = DateTime.Now.AddDays(rDay); } model.Include = Include; model.Status = 0; new BCW.BLL.Role().Add(model); //发送内线给版主 if (id > 0) { new BCW.BLL.Guest().Add(UsID, UsName, "系统管理员将您设为论坛“" + ForumName + "”的版主"); //任职记录 new BCW.BLL.Forumlog().Add(14, id, "[url=/bbs/uinfo.aspx?uid=" + UsID + "]" + UsName + "(" + UsID + ")[/url]上任时间:" + DT.FormatDate(DateTime.Now, 11) + ""); } Utils.Success("添加版主", "恭喜,添加版主成功,正在返回..", Utils.getPage("moderator.aspx"), "1"); }
private void AddPage() { Master.Title = "添加版主"; int id = int.Parse(Utils.GetRequest("id", "get", 1, @"^[0-9]\d*$", "-1")); int uid = int.Parse(Utils.GetRequest("uid", "get", 1, @"^[0-9]\d*$", "0")); if (id == -1) { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("请选择论坛版块"); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; string strWhere = string.Empty; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string[] pageValUrl = { "act", "uid" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = ""; // 开始读取论坛 IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount); if (listForum.Count > 0) { builder.Append(Out.Tab("<div>", "")); builder.AppendFormat("<a href=\"" + Utils.getUrl("moderator.aspx?act=add&id=0&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">版块总版主</a>"); builder.Append(Out.Tab("</div>", "<br />")); int k = 1; foreach (BCW.Model.Forum n in listForum) { if (k % 2 == 0) { builder.Append(Out.Tab("<div>", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div class=\"text\">", "")); } else { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } } builder.AppendFormat("<a href=\"" + Utils.getUrl("moderator.aspx?act=add&id={0}&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">{1}(ID{0})</a>", n.ID, 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("text", "没有相关记录")); } } else { builder.Append(Out.Tab("<div class=\"title\">", "")); if (id == 0) { builder.Append("添加总版主"); } else { string ForumName = new BCW.BLL.Forum().GetTitle(id); if (ForumName == "") { Utils.Error("不存在的版块ID", ""); } builder.Append("添加" + ForumName + "版主"); } builder.Append(Out.Tab("</div>", "")); string sText = string.Empty; string sName = string.Empty; string sType = string.Empty; string sValu = string.Empty; string sEmpt = string.Empty; string RoleString = BCW.User.Role.GetRoleString(); if (id > 0) { sText = "权限包括下级版:/,"; sName = "Include,"; sType = "select,"; sValu = "0'"; sEmpt = "0|不含|1|包含,"; RoleString = RoleString.Replace("|z|设置版主", ""); } string strText = "输入用户ID:/,选择权限,可多选/,期限(天|填0则无限期):/,职称(如:正版|副版|见习版):/," + sText + ",,"; string strName = "UsID,Role,rDay,rName," + sName + "id,act,backurl"; string strType = "num,multiple,num,text," + sType + "hidden,hidden,hidden"; string strValu = "" + uid + "''0''" + sValu + "" + id + "'save'" + Utils.getPage(0) + ""; string strEmpt = "false," + RoleString + ",false,false," + sEmpt + "false,false,false"; string strIdea = "/"; string strOthe = "添加版主|reset,moderator.aspx,post,1,red|blue"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("温馨提示:<br />"); builder.Append("锁定会员将使会员失去所有的权限.<br />"); builder.Append("总版权限将有所有论坛的管理区域.<br />"); 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.getPage("moderator.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 />")); }
/// <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&id=" + model.GroupId + "&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&backurl=" + Utils.PostPage(1) + "") + "\">>>我现在要续费VIP</a><br /><a href=\"" + Utils.getUrl("group.aspx?act=me&backurl=" + Utils.PostPage(1) + "") + "\"><<我要退出一些圈子</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&forumid=" + flow.ForumId + "&bid=" + flow.ID + "&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&forumid=" + forumid + "") + "\">搜索</a> "); if (new BCW.User.ForumInc().IsForumGSIDS(forumid) == true) { builder.Append("<a href=\"" + Utils.getUrl("/bbs/Gstoplist.aspx?forumid=" + forumid + "&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&id=" + model.GroupId + "&backurl=" + Utils.PostPage(1) + "") + "\">主页</a> "); builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=fund&id=" + model.GroupId + "&backurl=" + Utils.PostPage(1) + "") + "\">基金</a> "); builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=view&id=" + model.GroupId + "&backurl=" + Utils.PostPage(1) + "") + "\">资料</a> "); builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=groupid&id=" + model.GroupId + "&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&forumid=" + forumid + "&bid=" + flow.ID + "&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 + "&page=" + (pageIndex + 1) + "&backurl=" + Utils.getPage(0) + "") + "\">下一页</a>|"); } builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + forumid + "&page=1&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}&bid={1}&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}&bid={2}&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}&bid={1}&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}&bid={2}&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}&bid={1}&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}&bid={2}&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&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&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 + "&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&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>", "")); } }
protected void Page_Load(object sender, EventArgs e) { int uid = int.Parse(Utils.GetRequest("uid", "all", 1, @"^[0-9]\d*$", "0")); int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } if (uid == 0) { uid = meid; } int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-3]\d*$", "1")); int showtype = int.Parse(Utils.GetRequest("showtype", "all", 1, @"^[0-9]\d*$", "0")); int ordertype = int.Parse(Utils.GetRequest("ordertype", "all", 1, @"^[0-9]\d*$", "1")); if (ptype == 1) { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>>帖子"); builder.Append(Out.Tab("</div>", "<br />")); Master.Title = "查看主题帖子"; //string strText = "排序:,,,,"; //string strName = "ordertype,ptype,uid,showtype,backurl"; //string strType = "select,hidden,hidden,hidden,hidden"; //string strValu = "" + ordertype + "'" + ptype + "'" + uid + "'" + showtype + "'" + Utils.getPage(0) + ""; //string strEmpt = "1|按发帖时间|2|按最后跟贴|3|按帖子浏览量|4|按帖子跟贴量,,,,"; //string strIdea = ""; //string strOthe = "确定,moreThread.aspx,post,3,red"; //builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = string.Empty; string strOrder = string.Empty; string[] pageValUrl = { "uid", "ptype", "showtype", "ordertype", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere = "UsID=" + uid + ""; if (showtype == 1) { strWhere += " and IsGood=1"; } else if (showtype == 2) { strWhere += " and IsRecom=1"; } strWhere += " and IsDel=0"; //if (ordertype == 1) strOrder = "AddTime Desc"; //else if (ordertype == 2) // strOrder = "ReTime Desc"; //else if (ordertype == 3) // strOrder = "ReadNum Desc"; //else if (ordertype == 4) // strOrder = "ReplyNum Desc"; // 开始读取列表 IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTextsMe(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listText.Count > 0) { int k = 1; foreach (BCW.Model.Text n in listText) { 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("topic.aspx?forumid=" + n.ForumId + "&bid={0}&backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>{3}", n.ID, (pageIndex - 1) * pageSize + k, n.Title, DT.FormatDate(n.AddTime, 2)); 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\">", "<br />")); if (showtype != 0) { builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">全部帖</a> "); } if (showtype != 1) { builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&uid=" + uid + "&showtype=1&backurl=" + Utils.getPage(0) + "") + "\">精华帖</a> "); } if (showtype != 2) { builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&uid=" + uid + "&showtype=2&backurl=" + Utils.getPage(0) + "") + "\">推荐帖</a>"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=2&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">回帖</a>"); builder.Append(Out.Tab("</div>", "")); } else if (ptype == 2) { Master.Title = "查看回帖"; int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = string.Empty; string strOrder = string.Empty; string[] pageValUrl = { "uid", "ptype", "forumid", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>>回帖"); builder.Append(Out.Tab("</div>", "<br />")); //查询条件 strWhere = "UsID=" + uid + ""; if (meid != uid) { strWhere += " and ForumId<>88 and ForumId<>100 and ForumId<>14 and ForumId<>99 and ForumId<>77"; } strWhere += " and IsDel=0"; strOrder = "ID Desc"; // 开始读取列表 IList <BCW.Model.Reply> listReply = new BCW.BLL.Reply().GetReplysMe(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listReply.Count > 0) { int k = 1; foreach (BCW.Model.Reply n in listReply) { 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("reply.aspx?act=view&forumid=" + n.ForumId + "&bid=" + n.Bid + "&reid=" + n.Floor + "&backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>{3}", n.ID, (pageIndex - 1) * pageSize + k, Out.USB(TrueStrLength.cutTrueLength(n.Content, 20, "…")), DT.FormatDate(n.AddTime, 2)); 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\">", "<br />")); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=3&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">按论坛查看回帖>></a>"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=2&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">回帖</a>"); builder.Append(Out.Tab("</div>", "")); } else if (ptype == 3) { Master.Title = "查看回帖"; int pageIndex; int recordCount; int pageSize = 4; string strWhere = "IsActive=0"; string strOrder = string.Empty; string[] pageValUrl = { "uid", "ptype", "forumid", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } int forumid = int.Parse(Utils.GetRequest("forumid", "get", 1, @"^[0-9]\d*$", "0")); if (forumid == 0) { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>>回帖"); builder.Append(Out.Tab("</div>", "<br />")); // 开始读取论坛 IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount); if (listForum.Count > 0) { int k = 1; foreach (BCW.Model.Forum n in listForum) { 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("moreThread.aspx?ptype=" + ptype + "&uid=" + uid + "&forumid={0}&backurl=" + Utils.getPage(0) + "") + "\">[{1}]</a>", n.ID, n.Title); builder.Append("<br />参与" + new BCW.BLL.Reply().GetCount(uid, 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("text", "没有相关记录")); } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=1&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">帖子</a>"); builder.Append(Out.Tab("</div>", "")); } else { pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string BbsName = new BCW.BLL.Forum().GetTitle(forumid); if (BbsName == "") { Utils.Error("不存在的论坛", ""); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>>" + BbsName + "回帖"); builder.Append(Out.Tab("</div>", "<br />")); //查询条件 strWhere = "UsID=" + uid + " and forumid=" + forumid + ""; if (meid != uid) { strWhere += " and ForumId<>88 and ForumId<>100 and ForumId<>14 and ForumId<>99 and ForumId<>77"; } if (showtype == 1) { strWhere += " and IsGood=1"; } strWhere += " and IsDel=0"; strOrder = "ID Desc"; // 开始读取列表 IList <BCW.Model.Reply> listReply = new BCW.BLL.Reply().GetReplysMe(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listReply.Count > 0) { int k = 1; foreach (BCW.Model.Reply n in listReply) { 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("reply.aspx?act=view&forumid=" + forumid + "&bid=" + n.Bid + "&reid=" + n.Floor + "&backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>{3}", n.ID, (pageIndex - 1) * pageSize + k, n.Content, DT.FormatDate(n.AddTime, 2)); 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\">", "<br />")); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&uid=" + uid + "&forumid=" + forumid + "&backurl=" + Utils.getPage(0) + "") + "\">全部回帖</a> "); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&uid=" + uid + "&forumid=" + forumid + "&showtype=1&backurl=" + Utils.getPage(0) + "") + "\">精华回帖</a> "); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=2&uid=" + uid + "&backurl=" + Utils.getPage(0) + "") + "\">回帖</a>"); builder.Append(Out.Tab("</div>", "")); } } }
/// <summary> /// 陈志基 2016/08/16 /// 修改统计方式 /// </summary> /// <param name="uid"></param> /// <param name="forumid"></param> #region 论坛统计 ReloadPage private void ReloadPage(int uid, int forumid) { int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "1")); string forum = ""; string ForumName = "主题论坛"; if (ptype == 1) { forum = "(Select GroupId FROM tb_Forum where ID=ForumID)=0 and "; } else { forum = "(Select GroupId FROM tb_Forum where ID=ForumID)<>0 and "; } if (forumid > 0) { ForumName = new BCW.BLL.Forum().GetTitle(forumid); ptype = 0; } else { if (ptype == 2) { ForumName = "圈子论坛"; } } //string strWhe = ""; //DateTime nowtime = DateTime.Now; //string time = nowtime.ToShortDateString(); //string time1 = time + " 00:00:00 "; //string time2 = time + " 23:59:59 "; ////builder.Append("time:" + time1 + "<br/>"); ////builder.Append("time:" + time2 + "<br/>"); //strWhe = forum + " AddTime between '" + time1 + "' and '" + time2 + "' and IsDel = 0"; //DataSet data = new BCW.BLL.Text().GetList("ID", strWhe);//当天发帖 //DataSet data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//当天发帖 ////builder.Append("data:当天?" + data.Tables[0].Rows.Count + "<br/>"); ////builder.Append("data:当天回帖?" + data1.Tables[0].Rows.Count + "<br/>"); Master.Title = "" + ForumName + "统计"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("=" + ForumName + "统计="); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("今日帖子数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 1) + "<br />"); builder.Append("今日回帖数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 1) + ""); builder.Append(Out.Tab("</div>", "<br />")); //DateTime yesterday = nowtime.AddDays(-1); //time = yesterday.ToShortDateString(); //time1 = time + " 00:00:00 "; //time2 = time + " 23:59:59 "; ////builder.Append("yesterday:" + time1 + "<br/>"); ////builder.Append("yesterday:" + time2 + "<br/>"); //strWhe = forum + " AddTime between '" + time1 + "' and '" + time2 + "' and IsDel = 0"; //data = new BCW.BLL.Text().GetList("ID", strWhe);//昨天发帖 //data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//昨天发帖 ////builder.Append("data:昨天?" + data.Tables[0].Rows.Count + "<br/>"); ////builder.Append("data:昨天回帖?" + data1.Tables[0].Rows.Count + "<br/>"); builder.Append(Out.Tab("<div>", "")); builder.Append("昨日帖子数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 2) + "<br />"); builder.Append("昨日回帖数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 2) + ""); builder.Append(Out.Tab("</div>", "<br />")); //string M_Str_mindate = string.Empty; //switch (DateTime.Now.DayOfWeek) //{ // case DayOfWeek.Monday: // M_Str_mindate = DateTime.Now.AddDays(0).ToShortDateString() + ""; // break; // case DayOfWeek.Tuesday: // M_Str_mindate = DateTime.Now.AddDays(-1).ToShortDateString() + ""; // break; // case DayOfWeek.Wednesday: // M_Str_mindate = DateTime.Now.AddDays(-2).ToShortDateString() + ""; // break; // case DayOfWeek.Thursday: // M_Str_mindate = DateTime.Now.AddDays(-3).ToShortDateString() + ""; // break; // case DayOfWeek.Friday: // M_Str_mindate = DateTime.Now.AddDays(-4).ToShortDateString() + ""; // break; // case DayOfWeek.Saturday: // M_Str_mindate = DateTime.Now.AddDays(-5).ToShortDateString() + ""; // break; // case DayOfWeek.Sunday: // M_Str_mindate = DateTime.Now.AddDays(-6).ToShortDateString() + ""; // break; //} //strWhe = forum + " AddTime>='" + M_Str_mindate + "' and IsDel =0"; //data = new BCW.BLL.Text().GetList("ID", strWhe);//本周发帖的 ////builder.Append("data:本周?" + data.Tables[0].Rows.Count + "<br/>"); //data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//本周发帖的 //builder.Append("data:本周回帖?" + data1.Tables[0].Rows.Count + "<br/>"); builder.Append(Out.Tab("<div>", "")); builder.Append("本周帖子数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 3) + "<br />"); builder.Append("本周回帖数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 3) + ""); builder.Append(Out.Tab("</div>", "<br />")); //DateTime ForDate = DateTime.Parse(DateTime.Now.AddDays(-7).ToShortDateString()); //M_Str_mindate = string.Empty; //string M_Str_Maxdate = string.Empty; //switch (ForDate.DayOfWeek) //{ // case DayOfWeek.Monday: // M_Str_mindate = ForDate.AddDays(0).ToShortDateString() + ""; // break; // case DayOfWeek.Tuesday: // M_Str_mindate = ForDate.AddDays(-1).ToShortDateString() + ""; // break; // case DayOfWeek.Wednesday: // M_Str_mindate = ForDate.AddDays(-2).ToShortDateString() + ""; // break; // case DayOfWeek.Thursday: // M_Str_mindate = ForDate.AddDays(-3).ToShortDateString() + ""; // break; // case DayOfWeek.Friday: // M_Str_mindate = ForDate.AddDays(-4).ToShortDateString() + ""; // break; // case DayOfWeek.Saturday: // M_Str_mindate = ForDate.AddDays(-5).ToShortDateString() + ""; // break; // case DayOfWeek.Sunday: // M_Str_mindate = ForDate.AddDays(-6).ToShortDateString() + ""; // break; //} //M_Str_Maxdate = DateTime.Parse(M_Str_mindate).AddDays(6).ToShortDateString(); //strWhe = forum + " AddTime between '" + M_Str_mindate + " 00:00:00' AND '" + M_Str_Maxdate + " 23:59:59' and IsDel =0"; ////builder.Append("M_Str_mindate:" + M_Str_mindate + "<br/>"); ////builder.Append("M_Str_Maxdate:" + M_Str_Maxdate + "<br/>"); //data = new BCW.BLL.Text().GetList("ID", strWhe);//本月发帖的 ////builder.Append("data:上周?" + data.Tables[0].Rows.Count + "<br/>"); //data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//本月发帖的 // builder.Append("data:上周回帖?" + data1.Tables[0].Rows.Count + "<br/>"); builder.Append(Out.Tab("<div>", "")); builder.Append("上周帖子数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 6) + "<br />"); builder.Append("上周回帖数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 6) + ""); builder.Append(Out.Tab("</div>", "<br />")); // strWhe = forum + " Year(AddTime)=" + DateTime.Now.Year + " and Month(AddTime)=" + DateTime.Now.Month + " and IsDel =0"; // data = new BCW.BLL.Text().GetList("ID", strWhe);//本月发帖的 //// builder.Append("data:本月?" + data.Tables[0].Rows.Count + "<br/>"); // data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//本月发帖的 //builder.Append("data:本月回帖?" + data1.Tables[0].Rows.Count + "<br/>"); builder.Append(Out.Tab("<div>", "")); builder.Append("本月帖子数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 4) + "<br />"); builder.Append("本月回帖数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 4) + ""); builder.Append(Out.Tab("</div>", "<br />")); // DateTime ForDate1 = DateTime.Parse(DateTime.Now.AddMonths(-1).ToShortDateString()); // int ForYear = ForDate1.Year; // int ForMonth = ForDate1.Month; // strWhe = forum + " Year(AddTime) = " + (ForYear) + " AND Month(AddTime) = " + (ForMonth) + " and IsDel =0"; // data = new BCW.BLL.Text().GetList("ID", strWhe);//上月发帖的 //// builder.Append("data:上月?" + data.Tables[0].Rows.Count + "<br/>"); // data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//上月发帖的 //builder.Append("data:上月回帖?" + data1.Tables[0].Rows.Count + "<br/>"); builder.Append(Out.Tab("<div>", "")); builder.Append("上月帖子数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 5) + "<br />"); builder.Append("上月回帖数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 5) + ""); builder.Append(Out.Tab("</div>", "<br />")); // strWhe = forum + "IsDel =0"; // data = new BCW.BLL.Text().GetList("ID", strWhe);//上月发帖的 //// builder.Append("data:帖子总数量?" + data.Tables[0].Rows.Count + "<br/>"); // data1 = new BCW.BLL.Reply().GetList("ID", strWhe);//上月发帖的 //builder.Append("data:回帖总数量?" + data1.Tables[0].Rows.Count + "<br/>"); //builder.Append(forumid+"asdfsda"); builder.Append(Out.Tab("<div>", "")); builder.Append("帖子总数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 1, 0) + "<br />"); builder.Append("回帖总数量:" + new BCW.BLL.Forumstat().GetCount2(ptype, forumid, 2, 0) + ""); builder.Append(Out.Tab("</div>", "")); if (forumid > 0) { BCW.Model.Forum m = new BCW.BLL.Forum().GetForumBasic(forumid); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("<a href=\"" + Utils.getUrl("/bbs/online.aspx?forumid=" + forumid + "&backurl=" + Utils.PostPage(1) + "") + "\">当前在线" + m.Line + "人.最高" + m.TopLine + "人</a><br />"); builder.Append("最高记录发生在" + DT.FormatDate(m.TopTime, 5) + ""); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); if (ptype == 2) { builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?ptype=1&backurl=" + Utils.getPage(0) + "") + "\">主题论坛统计>></a>"); } else { builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?ptype=2&backurl=" + Utils.getPage(0) + "") + "\">圈子论坛统计>></a>"); } builder.Append(Out.Tab("</div>", "")); } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?backurl=" + Utils.getPage(0) + "") + "\">论坛</a>"); builder.Append(Out.Tab("</div>", "")); }
/// <summary> /// 总榜统计列表 /// 陈志基 2016/08/11 /// 修改统计方法 /// </summary> /// <param name="act"></param> /// <param name="uid"></param> /// <param name="forumid"></param> private void TopListPage(string act, int uid, int forumid) { string ForumName = "论坛"; if (forumid > 0) { ForumName = new BCW.BLL.Forum().GetTitle(forumid); } Master.Title = "" + ForumName + "TOP100"; int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-4]$", "1"));// 获取失败时 默认为1 int showtype = int.Parse(Utils.GetRequest("showtype", "get", 1, @"^[1-5]$", "1")); builder.Append(Out.Tab("<div class=\"title\">", "")); if (showtype == 1) { builder.Append("总计"); } else if (showtype == 2) { builder.Append("本周"); } else if (showtype == 3) { builder.Append("本月"); } else if (showtype == 4) { builder.Append("上月"); } else if (showtype == 5) { builder.Append("上周"); } if (ptype == 1) { builder.Append("发帖"); } else if (ptype == 2) { builder.Append("回帖"); } else if (ptype == 3) { builder.Append("精华"); } else if (ptype == 4) { builder.Append("推荐"); } builder.Append("排行"); 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", "ptype", "showtype", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 if (act == "toplist") { strWhere = "(Select GroupId FROM tb_Forum where ID=ForumID)=0"; } else { strWhere = "(Select GroupId FROM tb_Forum where ID=ForumID)<>0"; } if (forumid > 0) { strWhere += " and forumid=" + forumid + ""; } if (ptype == 1) { strOrder = "sum(tTotal)"; } else if (ptype == 2) { strOrder = "sum(rTotal)"; } else if (ptype == 3) { strOrder = "sum(gTotal)"; } else if (ptype == 4) { strOrder = "sum(jTotal)"; } #region //// ceshi //if (ptype == 1) //发帖 // strWhere += " and IsDel=0 "; //else if (ptype == 2)//回帖 // strWhere += " and IsDel=0 "; //else if (ptype == 3)//精华 // strWhere += " and IsGood=1 "; //else if (ptype == 4)//推荐 // strWhere += " and IsRecom=1 "; //if (ptype != 2) //不是回帖的 //{ // IList<BCW.Model.Text> list = new BCW.BLL.Text().GetForumstats1(pageIndex, pageSize, strWhere, showtype, out recordCount); // if (list.Count > 0) // { // int k = 1; // foreach (BCW.Model.Text n in list) // { // 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}.", (pageIndex - 1) * pageSize + k); // builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.UsID) + "(" + n.UsID + ")(" + n.ReadNum + "帖)</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", "没有相关记录..")); // } //} //else //{ // IList<BCW.Model.Reply> list = new BCW.BLL.Reply().GetForumstats1(pageIndex, pageSize, strWhere, showtype, out recordCount); // if (list.Count > 0) // { // int k = 1; // foreach (BCW.Model.Reply n in list) // { // 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}.", (pageIndex - 1) * pageSize + k); // builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.UsID) + "(" + n.UsID + ")(" + n.Floor + "帖)</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", "没有相关记录..")); // } //} //if (list.Count > 0) //{ // int k = 1; // foreach (BCW.Model.Text n in list) // { // 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}.", (pageIndex - 1) * pageSize + k); // builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.UsID) + "(" + n.UsID + ")(" + n.ReadNum + "帖)</a>"); // k++; // builder.Append(Out.Tab("</div>", "")); // } //} //else //{ // builder.Append(Out.Div("div", "没有相关记录..")); //} //ceshi #endregion //// 开始读取列表 //// IList<BCW.Model.Text> list = new BCW.BLL.Text().GetForumstats1pageIndex, pageSize, strWhere, strOrder, showtype, out recordCount); IList <BCW.Model.Forumstat> listForumstat = new BCW.BLL.Forumstat().GetForumstats(pageIndex, pageSize, strWhere, strOrder, showtype, out recordCount); if (listForumstat.Count > 0) { int k = 1; foreach (BCW.Model.Forumstat n in listForumstat) { 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}.", (pageIndex - 1) * pageSize + k); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.UsID) + "(" + n.UsID + ")(" + n.tTotal + "帖)</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=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); if (forumid > 0) { builder.Append("<a href=\"" + Utils.getPage("forum.aspx?forumid=" + forumid + "") + "\">上级</a>"); } else { builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>"); } builder.Append("-<a href=\"" + Utils.getUrl("forumstat.aspx?act=top&forumid=" + forumid + "") + "\">排行榜</a>"); builder.Append(Out.Tab("</div>", "")); }
private void DelPage(string act) { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); string info = Utils.GetRequest("info", "all", 1, "", ""); if (!new BCW.BLL.Forum().Exists(id)) { Utils.Error("不存在的记录", ""); } if (new BCW.BLL.Forum().ExistsNodeId(id)) { Utils.Error("请先删除下级版块", ""); } if (info != "ok") { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("确定要删除论坛吗?不可恢复,请慎重操作"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=move2&id=" + id + "") + "\">先转移版块帖子</a>"); if (act == "del") { builder.Append("<br /><a href=\"" + Utils.getUrl("forum.aspx?info=ok&act=del&id=" + id + "") + "\">确定删除(含版块帖子/回帖)</a>"); } else { builder.Append("<br /><a href=\"" + Utils.getUrl("forum.aspx?info=ok&act=del2&id=" + id + "") + "\">确定清空帖子/回帖</a>"); } builder.Append("<br /><a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + id + "") + "\">先留着吧..</a>"); builder.Append(Out.Tab("</div>", "<br />")); } else { if (act == "del") { int NodeId = new BCW.BLL.Forum().GetNodeId(id); string ForUrl = string.Empty; if (NodeId != 0) { ForUrl = "forum.aspx?act=view&id=" + NodeId + ""; } else { ForUrl = "forum.aspx"; } //删除论坛 new BCW.BLL.Forum().Delete(id); //更新下级版块ID集合 BCW.User.Users.UpdateDoNode(); //关联数据删除 new BCW.BLL.Text().DeleteStr("ForumId=" + id + ""); new BCW.BLL.Reply().DeleteStr("ForumId=" + id + ""); new BCW.BLL.Forumstat().DeleteStr("ForumId=" + id + ""); Utils.Success("删除论坛", "删除论坛成功..", Utils.getUrl(ForUrl), "1"); } else { new BCW.BLL.Text().DeleteStr("ForumId=" + id + ""); new BCW.BLL.Reply().DeleteStr("ForumId=" + id + ""); new BCW.BLL.Forumstat().DeleteStr("ForumId=" + id + ""); Utils.Success("清空帖子/回帖", "清空帖子/回帖成功..", Utils.getUrl("forum.aspx?act=view&id=" + id + ""), "1"); } } }
private void MovePage() { Master.Title = "转移论坛"; int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); int nid = int.Parse(Utils.GetRequest("nid", "get", 1, @"^[0-9]\d*$", "-1")); if (!new BCW.BLL.Forum().Exists(id)) { Utils.Error("不存在的记录", ""); } if (nid != -1) { if (!new BCW.BLL.Forum().Exists(id)) { Utils.Error("不存在的记录", ""); } string info = Utils.GetRequest("info", "all", 1, "", ""); if (info == "") { string goFourm = string.Empty; if (nid > 0) { goFourm = "《" + new BCW.BLL.Forum().GetTitle(nid) + "》的下级论坛"; } else { goFourm = "根目录"; } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("确定把《" + new BCW.BLL.Forum().GetTitle(id) + "》转成" + goFourm + "吗?"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?info=ok&act=move&id=" + id + "&nid=" + nid + "") + "\">确定转移</a>"); builder.Append("<br /><a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + id + "") + "\">再看看吧..</a>"); builder.Append(Out.Tab("</div>", "<br />")); } else { //不能转移到自己下级的版块 if (nid > 0) { int NodeId2 = new BCW.BLL.Forum().GetNodeId(nid); string DoNode = new BCW.BLL.Forum().GetDoNode(id); if (id == NodeId2) { Utils.Error("不能转移到此版下级版块", ""); } if (("," + DoNode + ",").Contains("," + nid + ",")) { Utils.Error("不能转移到此版下级版块", ""); } } //得到节点ID int NodeId = new BCW.BLL.Forum().GetNodeId(id); //转移版块 new BCW.BLL.Forum().UpdateNodeId(id, nid); //更新下级版块ID集合 BCW.User.Users.UpdateDoNode(); Utils.Success("转移论坛", "转移论坛成功..", Utils.getUrl("forum.aspx?act=view&id=" + id + ""), "1"); } } else { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.AppendFormat("请选择转移到的论坛"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=move&id=" + id + "&nid=0") + "\">移到根目录←</a>"); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; string strWhere = string.Empty; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string[] pageValUrl = { "act", "id", "nid" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = "id<>" + id + " and GroupId=0"; // 开始读取论坛 IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount); if (listForum.Count > 0) { int k = 1; foreach (BCW.Model.Forum n in listForum) { 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}<a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + id + "") + "\">{1} ID{2}</a>.<a href=\"" + Utils.getUrl("forum.aspx?act=move&id=" + id + "&nid={2}") + "\">[移]</a>", "", n.Title, 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("forum.aspx?act=view&id=" + id + "") + "\">返回上一级</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 />")); } }
private void EditSavePage() { string ac = Utils.ToSChinese(Utils.GetRequest("ac", "post", 1, @"", "")); int id = int.Parse(Utils.GetRequest("id", "post", 2, @"^[0-9]\d*$", "ID错误")); string GetRole = string.Empty; if (ac == "编辑管理员") { string Roleall = Utils.GetRequest("Roleall", "post", 3, @"^[\w((;|,)\w)?]+$", "选择全局权限错误"); Roleall = Roleall.Replace(",", ";"); string Role = Utils.GetRequest("Role", "post", 3, @"^[\w((;|,)\w)?]+$", "选择权限错误"); Role = Role.Replace(",", ";"); GetRole = Roleall + ";" + Role; if (Roleall == "") { GetRole = Utils.Mid(GetRole, 1, GetRole.Length); } } else { string Role = Utils.GetRequest("Role", "post", 2, @"^[\w((;|,)\w)?]+$", "选择权限错误"); Role = Role.Replace(",", ";"); GetRole = Role; } DateTime sDay = Utils.ParseTime(Utils.GetRequest("sDay", "post", 2, DT.RegexTime, "上任时间填写错误")); string rDay = Utils.GetRequest("rDay", "post", 2, "", ""); string rName = Utils.GetRequest("rName", "post", 2, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,10}$", "职称限10字内,不能使用特别字符"); int Include = int.Parse(Utils.GetRequest("Include", "post", 1, @"^[0-1]$", "0")); int Status = int.Parse(Utils.GetRequest("Status", "post", 2, @"^[0-1]$", "权限状态选择错误")); if (rDay == "0") { rDay = "1990-1-1 00:00:00"; } else { if (!Utils.IsRegex(rDay, DT.RegexTime)) { Utils.Error("卸任时间填写错误", ""); } } BCW.Model.Role m = new BCW.BLL.Role().GetRole(id); if (m == null) { Utils.Error("不存在的记录", ""); } //取用户昵称 string UsName = new BCW.BLL.User().GetUsName(m.UsID); //取论坛名称 string ForumName = new BCW.BLL.Forum().GetTitle(m.ForumID); BCW.Model.Role model = new BCW.Model.Role(); model.ID = id; model.UsName = UsName; model.Rolece = GetRole; model.RoleName = rName; model.ForumName = ForumName; model.StartTime = sDay; model.OverTime = DateTime.Parse(rDay); model.Include = Include; model.Status = Status; new BCW.BLL.Role().Update(model); if (ac == "编辑管理员") { new BCW.BLL.Guest().Add(m.UsID, UsName, "系统管理员编辑您的管理员权限"); Utils.Success("编辑管理员", "恭喜,编辑管理员成功,正在返回..", Utils.getPage("moderator.aspx"), "1"); } else { new BCW.BLL.Guest().Add(m.UsID, UsName, "系统管理员编辑您在论坛“" + ForumName + "”的版主权限"); Utils.Success("编辑版主", "恭喜,编辑版主成功,正在返回..", Utils.getPage("moderator.aspx"), "1"); } }
private void Move2Page() { Master.Title = "批量转移帖子"; int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); int nid = int.Parse(Utils.GetRequest("nid", "get", 1, @"^[0-9]\d*$", "0")); if (!new BCW.BLL.Forum().Exists(id)) { Utils.Error("不存在的记录", ""); } if (nid > 0) { if (!new BCW.BLL.Forum().Exists(id)) { Utils.Error("不存在的记录", ""); } string info = Utils.GetRequest("info", "all", 1, "", ""); if (info == "") { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("确定把《" + new BCW.BLL.Forum().GetTitle(id) + "》的帖子转移到《" + new BCW.BLL.Forum().GetTitle(nid) + "》论坛吗?"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?info=ok&act=move2&id=" + id + "&nid=" + nid + "") + "\">确定转移</a>"); builder.Append("<br /><a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + id + "") + "\">再看看吧..</a>"); builder.Append(Out.Tab("</div>", "<br />")); } else { new BCW.BLL.Text().UpdateForumID2(id, nid); new BCW.BLL.Reply().UpdateForumID2(id, nid); //论坛统计更新 new BCW.BLL.Forumstat().UpdateForumID(id, nid); Utils.Success("批量转移帖子", "批量转移帖子成功..", Utils.getUrl("forum.aspx?act=view&id=" + id + ""), "1"); } } else { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.AppendFormat("请选择转移到的论坛"); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; string strWhere = string.Empty; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string[] pageValUrl = { "act", "id", "nid" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = "id<>" + id + ""; // 开始读取论坛 IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount); if (listForum.Count > 0) { int k = 1; foreach (BCW.Model.Forum n in listForum) { 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("forum.aspx?act=move2&id=" + id + "&nid={2}") + "\">{1} ID{2}</a>.<a href=\"" + Utils.getUrl("forum.aspx?act=move2&id=" + id + "&nid={2}") + "\">[移]</a>", "", n.Title, 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("forum.aspx?act=view&id=" + id + "") + "\">返回上一级</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 />")); } }
private void TopListPage() { int forumid = int.Parse(Utils.GetRequest("forumid", "get", 1, @"^[0-9]\d*$", "0")); int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-2]$", "0")); Master.Title = "高手排行榜"; builder.Append(Out.Tab("<div class=\"title\">", "")); string ForumTitle = new BCW.BLL.Forum().GetTitle(forumid); builder.Append("" + ForumTitle + "-排行榜"); 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("Gsadmin.aspx?act=toplist&forumid=" + forumid + "&ptype=0") + "\">连中榜</a>|"); } if (ptype == 1) { builder.Append("月中榜|"); } else { builder.Append("<a href=\"" + Utils.getUrl("Gsadmin.aspx?act=toplist&forumid=" + forumid + "&ptype=1") + "\">月中榜</a>|"); } if (ptype == 2) { builder.Append("历史"); } else { builder.Append("<a href=\"" + Utils.getUrl("Gsadmin.aspx?act=toplist&forumid=" + forumid + "&ptype=2") + "\">历史</a>"); } 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", "ptype", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = "ForumId=" + forumid + " and Types=8"; if (ptype == 0) { strWhere += " and Glznum>0"; strOrder = "Glznum DESC"; } else if (ptype == 1) { strWhere += " and Gmnum>0"; strOrder = "Gmnum DESC"; } else if (ptype == 2) { strWhere += " and Gwinnum>0"; strOrder = "Gwinnum DESC"; } // 开始读取列表 IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTextsGs(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listText.Count > 0) { int k = 1; foreach (BCW.Model.Text n in listText) { 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) + ".<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.UsID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>"); if (ptype == 0) { builder.Append("连中" + n.Glznum + ""); } else if (ptype == 1) { builder.Append("月中" + n.Gmnum + ""); } else { builder.Append("" + n.Gaddnum + "中" + n.Gwinnum + ""); } builder.Append("<a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid=" + n.ForumId + "&bid=" + n.ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.Title + "</a>"); builder.Append("|<a href=\"" + Utils.getUrl("Gsadmin.aspx?act=centlist&forumid=" + n.ForumId + "&hid=" + n.UsID + "&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.getUrl("Gsadmin.aspx?act=top") + "\">返回上级</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 />")); }
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 + "&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 + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a><br />"); } builder.Append("主题:<a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid=" + n.ForumId + "&bid=" + n.BID + "&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&id=" + n.ID + "&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 />")); }
private void ReloadPage() { int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "0")); int forumid = int.Parse(Utils.GetRequest("forumid", "get", 1, @"^[1-9]\d*$", "0")); BCW.Model.Forum m = null; Master.Title = "在线会员"; if (forumid > 0) { if (ub.GetSub("BbsIsOnline", "/Controls/bbs.xml") != "0") { Utils.Error("未开放此功能", ""); } m = new BCW.BLL.Forum().GetForumBasic(forumid); if (m == null) { Utils.Error("不存在的论坛记录", ""); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">" + m.Title + "</a>>在线会员"); builder.Append(Out.Tab("</div>", "<br />")); } else { builder.Append(Out.Tab("<div class=\"title\">", "")); if (ptype == 1) { builder.Append("全站美女在线"); } else if (ptype == 2) { builder.Append("全站帅哥在线"); } else { builder.Append("全站在线会员"); } builder.Append(Out.Tab("</div>", "<br />")); } int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "ptype", "forumid", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } if (forumid > 0) { strWhere += "EndForumID=" + forumid + " and EndTime>='" + DateTime.Now.AddMinutes(-Convert.ToInt32(ub.Get("SiteExTime"))) + "'"; } else { //查询条件 if (ptype == 1) { strWhere = "Sex<=1 and"; } else if (ptype == 2) { strWhere = "Sex=2 and"; } strWhere += " EndTime>='" + DateTime.Now.AddMinutes(-Convert.ToInt32(ub.Get("SiteExTime"))) + "'"; } // 开始读取列表 IList <BCW.Model.User> listUser = new BCW.BLL.User().GetUsers(pageIndex, pageSize, strWhere, out recordCount); if (listUser.Count > 0) { int k = 1; foreach (BCW.Model.User n in listUser) { 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 />")); } } //if (n.State == 1) // builder.Append("" + ((pageIndex - 1) * pageSize + k) + ".隐身会员"); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.ID) + "(" + n.ID + ")</a>"); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 1)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } builder.Append(Out.Tab("<div>", "<br />")); if (forumid > 0) { builder.Append("最高" + m.TopLine + "人,发生在" + DT.FormatDate(m.TopTime, 5) + "<br />"); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">返回" + m.Title + "</a>"); } else { builder.Append("帅哥<a href=\"" + Utils.getUrl("online.aspx?ptype=2&backurl=" + Utils.getPage(0) + "") + "\">" + new BCW.BLL.User().GetNum(2) + "</a>|美女<a href=\"" + Utils.getUrl("online.aspx?ptype=1&backurl=" + Utils.getPage(0) + "") + "\">" + new BCW.BLL.User().GetNum(1) + "</a>"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>"); builder.Append(Out.Tab("</div>", "")); }
private void Add2Page() { string RadioType = "multiple"; int ptype = int.Parse(Utils.GetRequest("ptype", "get", 2, @"^[1-9]\d*$", "类型选择错误")); int leibie = int.Parse(Utils.GetRequest("leibie", "all", 1, @"^[0-9]\d*$", "0")); int nid = int.Parse(Utils.GetRequest("nid", "all", 1, @"^[0-9]\d*$", "0")); int p = int.Parse(Utils.GetRequest("p", "get", 2, @"^[0-9]\d*$", "类型选择错误")); string strEmptyValue = string.Empty; DataSet ds = null; if (ptype <= 4) { //查询条件 string strWhere = string.Empty; if (ptype == 1) { strWhere = "Types=11"; } else if (ptype == 2) { strWhere = "Types=12"; } else if (ptype == 3) { strWhere = "Types=13"; } else if (ptype == 4) { strWhere = "Types=14"; } ds = new BCW.BLL.Topics().GetList("ID,Title", strWhere); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["Title"].ToString() + ""; } strEmptyValue = "0|全部栏目" + strEmptyValue; } else { strEmptyValue = "0|全部栏目"; } } else if (ptype == 5) { strEmptyValue = "0|全部栏目"; } else if (ptype == 6) { strEmptyValue = "0|全部分类|" + ub.GetSub("LinkLeibie", "/Controls/link.xml") + ""; } else if (ptype == 7 || ptype == 15)//论坛 { if (ptype == 7) { ds = new BCW.BLL.Forum().GetList("ID,Title", "IsActive=0"); } else { ds = new BCW.BLL.Forum().GetList("ID,Title", "IsActive=0 and GroupId>0"); } if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["Title"].ToString() + ""; } strEmptyValue = "0|全部论坛" + strEmptyValue; } else { strEmptyValue = "0|全部论坛"; } } else if (ptype == 8 || ptype == 9) { strEmptyValue = "0|全部分类"; } else if (ptype == 10) { if (p != 2) { strEmptyValue = "0|全部记录"; } else { RadioType = "select"; strEmptyValue = "0|全部游戏|1|剪刀石头|2|ktv789|3|猜猜乐|4|竞拍|6|幸运二八|8|疯狂彩球|9|挖宝竞猜|10|跑马游戏|11|上证竞猜|12|社区商城"; if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288")) { strEmptyValue += "|13|大小庄"; strEmptyValue += "|14|疯狂吹牛"; } strEmptyValue += "|15|结婚系统"; if (Utils.GetDomain().Contains("168yy") || Utils.GetDomain().Contains("tl88")) { strEmptyValue += "|16|猜拳游戏"; } } } else if (ptype == 11) { strEmptyValue = "0|全部记录"; } else if (ptype == 12) { ds = new BCW.BLL.Chat().GetList("ID,ChatName", "Types=0"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["ChatName"].ToString() + ""; } strEmptyValue = "0|全部聊室" + strEmptyValue; } else { strEmptyValue = "0|全部聊室"; } } else if (ptype == 13) { if (p < 4) { //查询条件 string strWhere = string.Empty; if (p == 0) { strWhere = "Types=11"; } else if (p == 1) { strWhere = "Types=13"; } else if (p == 2) { strWhere = "Types=12"; } else if (p == 3) { strWhere = "Types=14"; } ds = new BCW.BLL.Topics().GetList("ID,Title", strWhere); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["Title"].ToString().Replace("|", "") + ""; } strEmptyValue = "0|全部栏目" + strEmptyValue; } else { strEmptyValue = "0|全部栏目"; } } else { strEmptyValue = "0|全部记录"; } } else if (ptype == 14) { strEmptyValue = "0|全部记录"; } builder.Append(Out.Tab("<div class=\"title\">选择调用栏目</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append("选择调用栏目:"); builder.Append(Out.Tab("</div>", "")); string strText = ",,,,,,,"; string strName = "NodeId,ptype,p,leibie,nid,act,backurl"; string strType = "" + RadioType + ",hidden,hidden,hidden,hidden,hidden,hidden"; string strValu = ""; if (ptype != 13) { strValu = "0'" + ptype + "'" + p + "'" + leibie + "'" + nid + "'add3'" + Utils.getPage(0) + ""; } else { strValu = "0'" + ptype + "'" + p + "'" + leibie + "'" + nid + "'add6'" + Utils.getPage(0) + ""; } string strEmpt = "" + strEmptyValue + ",false,false,false,false,false,false"; string strIdea = "/"; string strOthe = "下一步,smart.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("smart.aspx?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 />")); }
private void ViewPage() { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); if (!new BCW.BLL.Forum().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Forum model = new BCW.BLL.Forum().GetForum(id); Master.Title = "" + model.Title + "管理"; builder.Append(Out.Tab("<div class=\"title\">版块:" + model.Title + "</div>", "")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=add&forumid=" + id + "") + "\">添加</a>.<a href=\"" + Utils.getUrl("../bbs/forum.aspx?forumid=" + id + "&backurl=" + Utils.PostPage(1) + "") + "\">预览</a>"); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; string strWhere = string.Empty; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string[] pageValUrl = { "" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = "NodeId=" + id + ""; // 开始读取专题 IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount); if (listForum.Count > 0) { int k = 1; foreach (BCW.Model.Forum n in listForum) { 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("forum.aspx?act=edit&id={0}") + "\">[管理]></a>{1}.<a href=\"" + Utils.getUrl("forum.aspx?act=view&id={0}") + "\">{2}(ID:{0})</a>", n.ID, n.Paixu, 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("forum.aspx?act=edit&id=" + id + "") + "\">编辑论坛</a><br />"); if (model.GroupId == 0) { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=move&id=" + id + "") + "\">转移论坛</a><br />"); } builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=move2&id=" + id + "") + "\">转移帖子</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=del2&id=" + id + "") + "\">清空帖子</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=del&id=" + id + "") + "\">删除论坛</a><br />"); if (model.NodeId != 0) { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + model.NodeId + "") + "\">返回上一级</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("forum.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 />")); }
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 + "&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 + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a><br />"); } builder.Append("主题:<a href=\"" + Utils.getUrl("topic.aspx?forumid=" + n.ForumId + "&bid=" + n.BID + "&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&forumid=" + forumid + "&backurl=" + Utils.getPage(0) + "") + "\">本坛奖励记录>></a><br />"); } else { if (forumid > 0) { builder.Append("<a href=\"" + Utils.getUrl("Gstoplist.aspx?act=centlist&backurl=" + Utils.getPage(0) + "") + "\">全部奖励记录>></a><br />"); } } builder.Append("<a href=\"" + Utils.getPage("forum.aspx?forumid=" + forumid + "") + "\"><<返回上级</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>", "")); }
private void AddPage() { int id = int.Parse(Utils.GetRequest("id", "get", 1, @"^[0-9]\d*$", "0")); int forumid = int.Parse(Utils.GetRequest("forumid", "get", 1, @"^[0-9]\d*$", "0")); string PostName = string.Empty; if (id != 0) { PostName = "编辑"; } else { PostName = "添加"; } BCW.Model.Forum model = null; int NodeId = 0; //添加状态时的显示 string sText = string.Empty; string sName = string.Empty; string sType = string.Empty; string sValu = string.Empty; string sEmpt = string.Empty; if (id == 0) { sText = "*分配论坛ID(填0则自动分配):/,"; sName = "id,"; sType = "num,"; sValu = "0'"; sEmpt = "false,"; } else { model = new BCW.BLL.Forum().GetForum(id); if (model == null) { Utils.Error("不存在的论坛记录", ""); } NodeId = model.NodeId; sText = ","; sName = "id,"; sType = "hidden,"; sValu = "" + model.ID + "'"; sEmpt = "false,"; } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("" + PostName + "论坛版块"); builder.Append(Out.Tab("</div>", "")); strText = "" + sText + "*论坛名称:/,论坛口号:/,论坛LOGO:/,版规公告:/,帖子分类标签:(可空)/,版块顶部Ubb:/,版块底部Ubb:/,发帖限制:/,回帖限制:/,等级限制(级):/,访问限制:/,显示帖子方式:/,显示下级版块:/,允许访问的ID(用#分开):/,关联圈子ID(不关联请填0):/,电脑访问:/,运行状态:/,排序:/,,"; strName = "" + sName + "Title,Notes,Logo,Content,Label,TopUbb,FootUbb,Postlt,Replylt,Gradelt,Visitlt,ShowType,IsNode,VisitId,GroupId,IsPc,IsActive,Paixu,forumid,act"; strType = "" + sType + "text,text,text,textarea,text,textarea,textarea,select,select,num,select,select,select,text,num,select,select,num,hidden,hidden"; if (id == 0) { strValu = "" + sValu + "'''''''0'0'0'0'0'0''0'0'0'0'" + forumid + "'save"; } else { strValu = "" + sValu + "" + model.Title + "'" + model.Notes + "'" + model.Logo + "'" + model.Content + "'" + model.Label + "'" + model.TopUbb + "'" + model.FootUbb + "'" + model.Postlt + "'" + model.Replylt + "'" + model.Gradelt + "'" + model.Visitlt + "'" + model.ShowType + "'" + model.IsNode + "'" + model.VisitId + "'" + model.GroupId + "'" + model.IsPc + "'" + model.IsActive + "'" + model.Paixu + "'" + model.NodeId + "'editsave"; } strEmpt = "" + sEmpt + "false,true,true,true,true,true,true,0|不限制|1|VIP会员|2|限版主|3|限管理员|4|禁止发帖,0|不限制|1|VIP会员|2|限版主|3|限管理员|4|禁止回帖,false,0|不限制|1|限会员|2|VIP会员|3|限版主|4|限管理员,0|只显本版贴|1|显示下级帖,0|不显示|1|显示,true,false,0|开启电脑访问|1|关闭电脑访问,0|正常运行|1|暂停运行,false,false"; strIdea = "/"; strOthe = "确定" + PostName + "|reset,forum.aspx,post,1,red|blue"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("温馨提示:<br />1.帖子标签格式:1|美图|2|游戏|3|软件,其中1、2、3是编号,设置后请慎重修改.<br />2.允许访问的ID留空时则不限制.<br />3.不管限制如何,版主和管理员都可以穿透限制."); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); if (id != 0) { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + id + "") + "\">查看论坛</a><br />"); } if (NodeId != 0) { builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?act=view&id=" + NodeId + "") + "\">返回上一级</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("forum.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 />")); }
/// <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&id=" + Forummodel.GroupId + "&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 + "&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 + "&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 + "&bid=" + bid + "]" + Title + "[/URL]"); } else { new BCW.BLL.Action().Add(-2, 0, meid, mename, "在圈坛-" + Forummodel.Title + "发表了文件帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&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 + "&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 + "&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 + "&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 + "&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 + "&bid=" + bid + "")) + "\">返回主题</a><br /><a href=\"" + ReplaceWap(Utils.getUrl("reply.aspx?forumid=" + forumid + "&bid=" + bid + "")) + "\">回复列表</a>", ReplaceWap(Utils.getUrl("reply.aspx?forumid=" + forumid + "&bid=" + bid + "")), "2"); } } }
private void TopPage(string act, int uid, int forumid) { // int bid = int.Parse(Utils.GetRequest("bid", "all", 1, @"^[0-9]\d*$", "0")); string ForumName = "主题论坛"; if (act == "top") { act = "toplist"; } else { act = "toplist2"; ForumName = "圈子论坛"; } if (forumid > 0) { ForumName = new BCW.BLL.Forum().GetTitle(forumid); int GroupId = new BCW.BLL.Forum().GetGroupId(forumid); if (GroupId > 0) { act = "toplist2"; } else { act = "toplist"; } } // BCW.Model.Forumstat a = new BCW.Model.Forumstat(); // a. Master.Title = "" + ForumName + "排行"; // //builder.Append(act + "<br/>"); //builder.Append(forumid + "<br/>"); //builder.Append(bid + "<br/>"); // builder.Append(Out.Tab("<div class=\"title\">" + ForumName + "排行</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append("+|总排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=1&showtype=1&backurl=" + Utils.getPage(0) + "") + "\">发帖最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=2&showtype=1&backurl=" + Utils.getPage(0) + "") + "\">回帖最多</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=3&showtype=1&backurl=" + Utils.getPage(0) + "") + "\">精华最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=4&showtype=1&backurl=" + Utils.getPage(0) + "") + "\">推荐最多</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("+|本周排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=1&showtype=2&backurl=" + Utils.getPage(0) + "") + "\">发帖最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=2&showtype=2&backurl=" + Utils.getPage(0) + "") + "\">回帖最多</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=3&showtype=2&backurl=" + Utils.getPage(0) + "") + "\">精华最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=4&showtype=2&backurl=" + Utils.getPage(0) + "") + "\">推荐最多</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("+|上周排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=1&showtype=5&backurl=" + Utils.getPage(0) + "") + "\">发帖最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=2&showtype=5&backurl=" + Utils.getPage(0) + "") + "\">回帖最多</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=3&showtype=5&backurl=" + Utils.getPage(0) + "") + "\">精华最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=4&showtype=5&backurl=" + Utils.getPage(0) + "") + "\">推荐最多</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("+|本月排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=1&showtype=3&backurl=" + Utils.getPage(0) + "") + "\">发帖最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=2&showtype=3&backurl=" + Utils.getPage(0) + "") + "\">回帖最多</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=3&showtype=3&backurl=" + Utils.getPage(0) + "") + "\">精华最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=4&showtype=3&backurl=" + Utils.getPage(0) + "") + "\">推荐最多</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("+|上月排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=1&showtype=4&backurl=" + Utils.getPage(0) + "") + "\">发帖最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=2&showtype=4&backurl=" + Utils.getPage(0) + "") + "\">回帖最多</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=3&showtype=4&backurl=" + Utils.getPage(0) + "") + "\">精华最多</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=" + act + "&forumid=" + forumid + "&ptype=4&showtype=4&backurl=" + Utils.getPage(0) + "") + "\">推荐最多</a>"); builder.Append(Out.Tab("</div>", "<br />")); if (act == "toplist") { builder.Append(Out.Tab("<div>", "")); builder.Append("+|" + ForumName + "点赞排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=praisetoplist&forumid=" + forumid + "&ptype=5&showtype=6&backurl=" + Utils.getPage(0) + "") + "\">本月</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=praisetoplist&forumid=" + forumid + "&ptype=6&showtype=6&backurl=" + Utils.getPage(0) + "") + "\">本年</a>"); builder.Append(Out.Tab("</div>", "<br />")); if (!(forumid > 0)) { builder.Append(Out.Tab("<div>", "")); builder.Append("+|圈子论坛点赞排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=praisetoplist&forumid=" + forumid + "&ptype=5&showtype=7&backurl=" + Utils.getPage(0) + "") + "\">本月</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=praisetoplist&forumid=" + forumid + "&ptype=6&showtype=7&backurl=" + Utils.getPage(0) + "") + "\">本年</a>"); builder.Append(Out.Tab("</div>", "<br />")); } } if (act == "toplist2")//是圈子 { builder.Append(Out.Tab("<div>", "")); builder.Append("+|" + ForumName + "点赞排行榜<br />"); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=praisetoplist&forumid=" + forumid + "&ptype=5&showtype=7&backurl=" + Utils.getPage(0) + "") + "\">本月</a>."); builder.Append("<a href=\"" + Utils.getUrl("forumstat.aspx?act=praisetoplist&forumid=" + forumid + "&ptype=6&showtype=7&backurl=" + Utils.getPage(0) + "") + "\">本年</a>"); builder.Append(Out.Tab("</div>", "<br />")); } builder.Append(Out.Tab("<div>", "")); builder.Append("注:本周和本月排行榜指帖子发布时间在本周或本月的帖子"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("", Out.Hr())); if (forumid > 0) { builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">返回" + ForumName + "</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("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("sktype.aspx?forumid=" + forumid + "") + "\">更多帖子</a>"); builder.Append(Out.Tab("</div>", "")); }