/// <summary> /// 闲聊记录 /// </summary> private void SpeakPage() { int id = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0")); string StName = string.Empty; if (id != 0) { if (!new BCW.BLL.Game.Stone().Exists(id)) { Utils.Error("不存在的记录", ""); } StName = new BCW.BLL.Game.Stone().GetStName(id); } Master.Title = "" + StName + "闲聊记录"; builder.Append(Out.Tab("<div class=\"title\">" + StName + "闲聊记录</div>", "")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "id", "act" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 if (id != 0) { strWhere = "Types=1 and NodeId=" + id + ""; } else { strWhere = "Types=1"; } // 开始读取列表 IList <BCW.Model.Speak> listSpeak = new BCW.BLL.Speak().GetSpeaks(pageIndex, pageSize, strWhere, out recordCount); if (listSpeak.Count > 0) { int k = 1; foreach (BCW.Model.Speak n in listSpeak) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.AppendFormat("{0}{1}({2}前)", "系统:", n.Notes, DT.DateDiff(DateTime.Now, n.AddTime)); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=clearspeak&id=" + id + "") + "\">清空闲聊</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("stone.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 ListPage() { Master.Title = "闲聊管理"; int id = int.Parse(Utils.GetRequest("id", "all", 1, @"^[1-9]\d*$", "0")); int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-9]\d*$", "0")); int uid = int.Parse(Utils.GetRequest("uid", "all", 1, @"^[1-9]\d*$", "0")); if (sName.Length < ptype) { Utils.Error("不存在的类型", ""); } builder.Append(Out.Tab("<div class=\"title\">", "")); if (ptype > 0) { builder.Append("" + sName[ptype - 1] + "闲聊"); } else { builder.Append("单独闲聊"); } builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "act", "ptype", "id", "uid" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 if (uid > 0) { strWhere += "usid=" + uid + ""; } if (uid > 0 && id > 0) { strWhere += " and "; } //if (ptype > 0) strWhere += "Types=" + id + ""; // 开始读取列表 IList <BCW.Model.Speak> listSpeak = new BCW.BLL.Speak().GetSpeaks(pageIndex, pageSize, strWhere, out recordCount); if (listSpeak.Count > 0) { int k = 1; foreach (BCW.Model.Speak n in listSpeak) { 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("uinfo.aspx?uid={1}&backurl=" + Utils.PostPage(1) + "") + "\">{2}</a>说:{3}", BCW.User.AppCase.CaseAction(n.Types), n.UsId, n.UsName, Out.UBB(n.Notes)); if (n.ToId > 0) { builder.Append("→<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.ToId + "&backurl=" + Utils.PostPage(1) + "") + "\">" + n.ToName + "</a>"); } builder.Append("(" + DT.FormatDate(n.AddTime, 5) + ")"); builder.Append("<a href=\"" + Utils.getUrl("speak.aspx?act=del&ptype=" + n.Types + "&uid=" + n.UsId + "&backurl=" + Utils.PostPage(1) + "") + "\">[删]</a>"); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } string strText = "输入用户ID:/,,,"; string strName = "uid,ptype,id,act"; string strType = "num,hidden,hidden,hidden"; string strValu = "'" + ptype + "'" + id + "'list"; string strEmpt = "true,false,false,false"; string strIdea = "/"; string strOthe = "搜闲聊,speak.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("speak.aspx?act=clear&ptype=" + ptype + "&id=" + id + "&backurl=" + Utils.PostPage(1) + "") + "\">清空记录</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("speak.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 />")); }