private void DelJuanPage() { string info = Utils.GetRequest("info", "all", 1, "", ""); int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); int nid = int.Parse(Utils.GetRequest("nid", "get", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 2, @"^[0-9]\d*$", "ID错误")); Book.Model.Contents model = new Book.BLL.Contents().GetContents(jid); if (model == null) { Utils.Error("不存在的记录", ""); } if (info != "ok") { Master.Title = "删除分卷"; 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("bookman.aspx?info=ok&act=deljuan&id=" + id + "&nid=" + nid + "&jid=" + jid + "&backurl=" + Utils.getPage(0) + "") + "\">确定删除</a><br />"); builder.Append("<a href=\"" + Utils.getPage("bookman.aspx?act=view&id=" + id + "&nid=" + nid + "") + "\">先留着吧..</a>"); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">返回书城中心</a>"); builder.Append(Out.Tab("</div>", "")); } else { //删除 new Book.BLL.Contents().Delete(jid); new Book.BLL.Contents().Delete("jid=" + jid + ""); Utils.Success("删除分卷", "删除分卷成功..", Utils.getPage("bookman.aspx?act=view&id=" + id + "&nid=" + nid + ""), "1"); } }
private void PsOk2Page() { Master.Title = "审核本页记录"; int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "all", 1, @"^[0-1]$", "0")); int page = int.Parse(Utils.GetRequest("page", "get", 1, @"^[1-9]\d*$", "页面ID错误")); string info = Utils.GetRequest("info", "get", 1, "", ""); 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("bookps.aspx?act=psok2&info=ok&ptype=" + ptype + "&page=" + page + "&backurl=" + Utils.getPage(0) + "") + "\">确定审核</a><br />"); builder.Append("<a href=\"" + Utils.getPage("bookps.aspx?act=ps&ptype=" + ptype + "") + "\">再看看吧..</a>"); builder.Append(Out.Tab("</div>", "")); } else { int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; pageIndex = page; if (pageIndex == 0) { pageIndex = 1; } strWhere = "state=0 and isdel=0"; // 开始读取列表 if (ptype == 0) { IList <Book.Model.ShuMu> listShuMu = new Book.BLL.ShuMu().GetShuMus(pageIndex, pageSize, strWhere, out recordCount); if (listShuMu.Count > 0) { foreach (Book.Model.ShuMu n in listShuMu) { new Book.BLL.ShuMu().Updatestate(n.id, 1); } } } else { IList <Book.Model.Contents> listContents = new Book.BLL.Contents().GetContentss(pageIndex, pageSize, strWhere, out recordCount); if (listContents.Count > 0) { foreach (Book.Model.Contents n in listContents) { new Book.BLL.Contents().Updatestate(n.id, 1); } } } Utils.Success("审核本页记录", "审核本页记录成功,正在返回..", Utils.getPage("bookps.aspx?act=ps&ptype=" + ptype + ""), "1"); } }
private void EditContentPage() { int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int nid = Utils.ParseInt(Utils.GetRequest("nid", "all", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 2, @"^[0-9]\d*$", "ID错误")); Book.Model.Navigation model = new Book.BLL.Navigation().GetNavigation(id); if (model == null) { Utils.Error("不存在的分类", ""); } Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(nid); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } Book.Model.Contents n = new Book.BLL.Contents().GetContents(jid); if (n == null) { Utils.Error("不存在的章节", ""); } if (n.isdel == 1) { Utils.Error("不存在的记录", ""); } Master.Title = "修改书本章节"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=view&id=" + id + "&nid=" + nid + "") + "\">书本</a>>"); builder.Append("编辑章节"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append(m.title); builder.Append(Out.Tab("</div>", "")); string strText = "章节名称:/,章节内容:/,搜索关键词(多个用#分开):/,添加时间:/,排序(越大越向上|默认自动):/,,,,,"; string strName = "title,contents,tags,addtime,pid,id,nid,jid,act,backurl"; string strType = "text,big,hidden,hidden,num,hidden,hidden,hidden,hidden,hidden"; string strValu = "" + n.title + "'" + n.contents + "'" + n.tags + "'" + DT.FormatDate(n.addtime, 0) + "'" + n.pid + "'" + id + "'" + nid + "'" + jid + "'editcontentsave'" + Utils.getPage(0) + ""; string strEmpt = "true,true,true,false,false,false,false,false,false,false"; string strIdea = "/"; string strOthe = "修改章节,bookps.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getPage("bookps.aspx?act=view&id=" + id + "&nid=" + nid + "&jid=" + jid + "") + "\">返回上级</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>", "")); }
private void AddContentPage(int meid) { int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int nid = Utils.ParseInt(Utils.GetRequest("nid", "all", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 2, @"^[0-9]\d*$", "ID错误")); Book.Model.Navigation model = new Book.BLL.Navigation().GetNavigation(id); if (model == null) { Utils.Error("不存在的分类", ""); } Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(nid); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } if (m.aid != meid) { Utils.Error("不存在的记录", ""); } Master.Title = "添加书本章节"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("bookman.aspx?act=list&id=" + id + "") + "\">" + model.Name + "</a>>"); builder.Append("<a href=\"" + Utils.getUrl("bookman.aspx?act=view&id=" + id + "&nid=" + nid + "") + "\">书本</a>>"); builder.Append("添加章节"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append(m.title); builder.Append(Out.Tab("</div>", "")); //得到排序 int pid = new Book.BLL.Contents().GetCount(nid, jid, 0); pid = (pid + 1) * 10; string strText = "章节名称:/,章节内容:/,搜索关键词(多个用#分开):/,排序(越大越向上|默认自动):/,,,,"; string strName = "title,contents,tags,pid,id,nid,jid,act"; string strType = "text,big,hidden,num,hidden,hidden,hidden,hidden"; string strValu = "'''" + pid + "'" + id + "'" + nid + "'" + jid + "'addcontentsave"; string strEmpt = "true,true,true,false,false,false,false"; string strIdea = "/"; string strOthe = "添加章节,bookman.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getPage("bookman.aspx?act=view&id=" + id + "&nid=" + nid + "&jid=" + jid + "") + "\">返回上级</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>", "")); }
private void EditContentSavePage(int meid) { int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int nid = Utils.ParseInt(Utils.GetRequest("nid", "all", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 2, @"^[0-9]\d*$", "ID错误")); Book.Model.Navigation model = new Book.BLL.Navigation().GetNavigation(id); if (model == null) { Utils.Error("不存在的分类", ""); } Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(nid); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } if (m.aid != meid) { Utils.Error("不存在的记录", ""); } Book.Model.Contents n = new Book.BLL.Contents().GetContents(jid); if (n == null) { Utils.Error("不存在的章节", ""); } if (n.isdel == 1) { Utils.Error("不存在的记录", ""); } if (n.aid != meid) { Utils.Error("不存在的记录", ""); } string title = Utils.GetRequest("title", "all", 2, @"^[\s\S]{1,50}$", "章节名称限1-50字"); string contents = Utils.GetRequest("contents", "all", 2, @"^[\s\S]{1,}$", "章节内容不能为空"); string tags = Utils.GetRequest("tags", "all", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "多个搜索关键词请用#分开,不能为空"); DateTime addtime = Utils.ParseTime(Utils.GetRequest("addtime", "post", 2, DT.RegexTime, "时间填写错误")); int state = Utils.ParseInt(ub.GetSub("BookIsContents2", xmlPath)); int pid = Utils.ParseInt(Utils.GetRequest("pid", "all", 2, @"^[0-9]\d*$", "排序填写错误")); n.id = jid; n.shi = nid; n.state = state; n.summary = ""; n.tags = tags; n.title = title; n.addtime = addtime; n.contents = contents; n.aid = m.aid; n.pid = pid; new Book.BLL.Contents().Update(n); Utils.Success("编辑章节", "修改章节成功,正在返回..", Utils.getPage("bookman.aspx?act=view&id=" + id + "&nid=" + nid + "&jid=" + n.jid + ""), "1"); }
private void EditJuanSavePage(int meid) { int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int nid = Utils.ParseInt(Utils.GetRequest("nid", "all", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 2, @"^[0-9]\d*$", "ID错误")); Book.Model.Navigation model = new Book.BLL.Navigation().GetNavigation(id); if (model == null) { Utils.Error("不存在的分类", ""); } Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(nid); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } if (m.aid != meid) { Utils.Error("不存在的记录", ""); } Book.Model.Contents n = new Book.BLL.Contents().GetContents(jid); if (n == null) { Utils.Error("不存在的分卷", ""); } if (n.isdel == 1) { Utils.Error("不存在的记录", ""); } if (n.aid != meid) { Utils.Error("不存在的记录", ""); } string title = Utils.GetRequest("title", "all", 2, @"^[\s\S]{1,50}$", "分卷名称限1-50字"); int pid = Utils.ParseInt(Utils.GetRequest("pid", "all", 2, @"^[0-9]\d*$", "排序错误")); n.id = jid; n.jid = -1; n.shi = nid; n.state = 1; n.summary = ""; n.tags = ""; n.title = title; n.addtime = DateTime.Now; n.contents = ""; n.aid = m.aid; n.pid = pid; new Book.BLL.Contents().Update(n); Utils.Success("编辑分卷", "修改分卷成功,正在返回..", Utils.getUrl("bookman.aspx?act=view&id=" + id + "&nid=" + nid + ""), "1"); }
private void PsOkPage() { int p = Utils.ParseInt(Utils.GetRequest("p", "all", 2, @"^[0-1]$", "选择错误")); int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "all", 1, @"^[0-1]$", "0")); if (ptype == 0) { Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(id); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } new Book.BLL.ShuMu().Updatestate(id, p); } else { Book.Model.Contents n = new Book.BLL.Contents().GetContents(id); if (n == null) { Utils.Error("不存在的分卷", ""); } if (n.isdel == 1) { Utils.Error("不存在的记录", ""); } new Book.BLL.Contents().Updatestate(id, p); } if (p == 1) { Utils.Success("审核", "审核成功,正在返回..", Utils.getPage("bookps.aspx?act=ps&ptype=" + ptype + ""), "1"); } else { Utils.Success("取消审核", "取消审核成功,正在返回..", Utils.getPage("bookps.aspx?act=ps&ptype=" + ptype + ""), "1"); } }
private void PsPage() { int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "all", 1, @"^[0-3]$", "0")); Master.Title = "管理未审核"; 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("bookps.aspx?act=ps&ptype=0") + "\">未审书本</a>|"); } if (ptype == 1) { builder.Append("未审章节|"); } else { builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=ps&ptype=1") + "\">未审章节</a>|"); } if (ptype == 2) { builder.Append("已审书本|"); } else { builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=ps&ptype=2") + "\">已审书本</a>|"); } if (ptype == 3) { builder.Append("已审章节"); } else { builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=ps&ptype=3") + "\">已审章节</a>"); } builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "act", "ptype", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } strWhere = "isdel=0"; // 开始读取列表 if (ptype == 0 || ptype == 2) { if (ptype == 2) { strWhere += " and state=1"; } else { strWhere += " and state=0"; } IList <Book.Model.ShuMu> listShuMu = new Book.BLL.ShuMu().GetShuMus(pageIndex, pageSize, strWhere, out recordCount); if (listShuMu.Count > 0) { int k = 1; foreach (Book.Model.ShuMu n in listShuMu) { 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("<a href=\"" + Utils.getUrl("bookps.aspx?act=editshumu&id=" + n.nid + "&nid=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">[管理]></a>"); builder.AppendFormat("{0}.<a href=\"" + Utils.getUrl("bookps.aspx?act=view&id={1}&nid={2}&backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", (pageIndex - 1) * pageSize + k, n.nid, n.id, n.title); if (ptype == 2) { builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=psok&p=0&id=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">取消审核</a>]"); } else { builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=psok&p=1&id=" + n.id + "&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", "没有相关记录..")); } } else { if (ptype == 3) { strWhere += " and state=1"; } else { strWhere += " and state=0"; } IList <Book.Model.Contents> listContents = new Book.BLL.Contents().GetContentss(pageIndex, pageSize, strWhere, out recordCount); if (listContents.Count > 0) { int k = 1; foreach (Book.Model.Contents n in listContents) { 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 />")); } } int nid = new Book.BLL.ShuMu().Getnid(n.shi); builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=editcontent&id=" + nid + "&nid=" + n.shi + "&jid=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">[管理]></a>"); builder.AppendFormat("{0}.<a href=\"" + Utils.getUrl("bookps.aspx?act=view&id={1}&nid={2}&backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", (pageIndex - 1) * pageSize + k, nid, n.shi, n.title); if (ptype == 3) { builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=psok&ptype=1&p=0&id=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">取消审核</a>]"); } else { builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=psok&ptype=1&p=1&&id=" + n.id + "&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", "没有相关记录..")); } } builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); if (ptype < 2) { builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=psok2&ptype=" + ptype + "&page=" + pageIndex + "&backurl=" + Utils.PostPage(1) + "") + "\">[审核本页记录]</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>", "")); }
private void ViewPage() { int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int nid = Utils.ParseInt(Utils.GetRequest("nid", "all", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 1, @"^[0-9]\d*$", "0")); Book.Model.Navigation model = new Book.BLL.Navigation().GetNavigation(id); if (model == null) { Utils.Error("不存在的分类", ""); } Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(nid); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } Master.Title = "查看书本"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("查看书本"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append(m.title); builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"text\">", "<br />")); builder.Append("=本章目录="); builder.Append(Out.Tab("</div>", "<br />")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "act", "id", "nid", "jid", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere = "shi=" + nid + " and isdel=0"; if (jid == 0) { strWhere += " and jid<=0"; } else { strWhere += " and jid=" + jid + ""; } // 开始读取列表 IList <Book.Model.Contents> listContents = new Book.BLL.Contents().GetContentss(pageIndex, pageSize, strWhere, out recordCount); if (listContents.Count > 0) { int k = 1; foreach (Book.Model.Contents n in listContents) { 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.jid == -1) { builder.AppendFormat("[{0}][分卷]<a href=\"" + Utils.getUrl("bookps.aspx?act=view&id={1}&nid={2}&jid={3}&backurl=" + Utils.PostPage(1) + "") + "\">{4}</a>", n.pid, id, nid, n.id, n.title); builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=editjuan&id=" + id + "&nid=" + nid + "&jid=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">改</a>]"); builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=deljuan&id=" + id + "&nid=" + nid + "&jid=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">删</a>]"); } else { builder.AppendFormat("[{0}][章节]<a href=\"" + Utils.getUrl("bookps.aspx?act=editcontent&id={1}&nid={2}&jid={3}&backurl=" + Utils.PostPage(1) + "") + "\">{4}</a>", n.pid, id, nid, n.id, n.title); builder.Append("(" + n.contents.Length + "字)"); if (n.state == 0) { builder.Append("[未审核]"); } builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=editcontent&id=" + id + "&nid=" + nid + "&jid=" + n.id + "&backurl=" + Utils.PostPage(1) + "") + "\">改</a>]"); builder.Append("[<a href=\"" + Utils.getUrl("bookps.aspx?act=delcontent&id=" + id + "&nid=" + nid + "&jid=" + n.id + "&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", "没有相关记录..")); } if (jid > 0) { builder.Append(Out.Tab("<div class=\"title2\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("bookps.aspx?act=view&id=" + id + "&nid=" + nid + "") + "\">书卷目录</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.getPage("bookps.aspx?act=list&id=" + id + "") + "\">返回上级</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>", "")); }
private void EditJuanPage(int meid) { int id = Utils.ParseInt(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误")); int nid = Utils.ParseInt(Utils.GetRequest("nid", "all", 2, @"^[0-9]\d*$", "ID错误")); int jid = Utils.ParseInt(Utils.GetRequest("jid", "all", 2, @"^[0-9]\d*$", "ID错误")); Book.Model.Navigation model = new Book.BLL.Navigation().GetNavigation(id); if (model == null) { Utils.Error("不存在的分类", ""); } Book.Model.ShuMu m = new Book.BLL.ShuMu().GetShuMu(nid); if (m == null) { Utils.Error("不存在的书本", ""); } if (m.isdel == 1) { Utils.Error("不存在的记录", ""); } if (m.aid != meid) { Utils.Error("不存在的记录", ""); } Book.Model.Contents n = new Book.BLL.Contents().GetContents(jid); if (n == null) { Utils.Error("不存在的分卷", ""); } if (n.isdel == 1) { Utils.Error("不存在的记录", ""); } Master.Title = "修改书本分卷"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("bookman.aspx?act=list&id=" + id + "") + "\">" + model.Name + "</a>>"); builder.Append("<a href=\"" + Utils.getUrl("bookman.aspx?act=view&id=" + id + "&nid=" + nid + "") + "\">书本</a>>"); builder.Append("修改分卷"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append(m.title); builder.Append(Out.Tab("</div>", "")); string strText = "分卷名称:/,排序(越大越向上|默认自动):/,,,,,"; string strName = "title,pid,id,nid,jid,act,backurl"; string strType = "text,num,hidden,hidden,hidden,hidden,hidden"; string strValu = "" + n.title + "'" + n.pid + "'" + id + "'" + nid + "'" + jid + "'editjuansave'" + Utils.getPage(0) + ""; string strEmpt = "true,false,false,false,false,false,false"; string strIdea = "/"; string strOthe = "修改分卷,bookman.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getPage("bookman.aspx?act=view&id=" + id + "&nid=" + nid + "") + "\">返回上级</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>", "")); }