protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { LoadTheme(themecode, siteid, languagecode, pcode); CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_ArticleDetails'"); id = Rint_Para("0"); parentnode = Node("Info"); nodes = B_Lebi_Node.GetList("Parentid=" + parentnode.id + " and ','+Language_ids+',' like '%," + CurrentLanguage.id + ",%'", "Sort desc"); page = B_Lebi_Page.GetModel(id); if (page == null) { node = nodes.FirstOrDefault(); page = NodePage.GetPageByNode(node); if (page == null) { PageError(); } } else { page.Count_Views += 1; B_Lebi_Page.Update(page); node = B_Lebi_Node.GetModel(page.Node_id); } path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("Ê×Ò³") + "\"><span>" + Tag("Ê×Ò³") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_Article", "") + "\"><span>" + Tag(parentnode.Name) + "</span></a><em>»</em><a href=\"" + URL("P_Article", node.id) + "\"><span>" + node.Name + "</span></a><em>»</em><a href=\"" + URL("P_ArticleDetails", page.id) + "\"><span>" + page.Name + "</span></a>"; }
/// <summary> /// 生成帮助中心 /// </summary> /// <param name="page"></param> /// <returns></returns> public static bool Greate_Help(Lebi_Theme_Page page) { string url; Site site = new Site(); Lebi_Node pnode = NodePage.GetNodeByCode("Help"); List <Lebi_Language> langs = Language.AllLanguages(); string urlpath = "http://" + HttpContext.Current.Request.Url.Authority + site.WebPath; foreach (Lebi_Language lang in langs) { string path = lang.Path + "/" + page.StaticPath + "/" + page.StaticPageName; string file = ""; List <Lebi_Node> nodes = B_Lebi_Node.GetList("parentid=" + pnode.id + " and Language_Code like '%" + lang.Code + "%'", ""); foreach (Lebi_Node node in nodes) { url = page.PageName + "?" + page.PageParameter; url = url.Replace("{0}", node.id.ToString()); url = urlpath + "/" + url; file = path.Replace("{0}", node.id.ToString()); file = RegexTool.ReplaceRegValue(file, @"{.*?}", ""); url = RegexTool.ReplaceRegValue(url, @"{.*?}", ""); url = ThemeUrl.CheckURL(url); HtmlEngine.Instance.CreatHtml(url, file); } } return(true); }
public string CMSMenu(string code) { string str = ""; Lebi_Node node = B_Lebi_Node.GetModel("Code='" + code + "'"); if (node == null) { return(""); } List <Lebi_Node> nodes = B_Lebi_Node.GetList("parentid=" + node.id + "", "Sort desc"); int i = 1; foreach (Lebi_Node n in nodes) { str += "<li name=\"News\" id=\"News" + i + "\"><a href=\"" + NodePage.AdminIndexPage(n) + "\"><span>" + Tag(n.Name) + "</span></a> </li>"; i++; } return(str); }
public List <shopindeximage> Getindeximages(int top) { List <shopindeximage> indeximgaes = new List <shopindeximage>(); Lebi_Node node = NodePage.GetNodeByCode("shopindeximages"); if (node != null) { List <Lebi_Page> ps = B_Lebi_Page.GetList("Node_id=" + node.id + " and Supplier_id=" + supplier.id + "", "Sort desc", top, 1); foreach (Lebi_Page p in ps) { shopindeximage img = new shopindeximage(); img.image = p.ImageOriginal; img.title = p.Name; img.url = p.url; indeximgaes.Add(img); } } return(indeximgaes); }
/// <summary> /// 根据结点代码返回结点 /// </summary> /// <param name="code"></param> /// <returns></returns> public Lebi_Node Node(string code) { return(NodePage.GetNodeByCode(code)); }