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_Article'"); id = Rint_Para("0"); parentnode = Node("Info"); pageindex = RequestTool.RequestInt("page", 1); node = B_Lebi_Node.GetModel(id); nodes = B_Lebi_Node.GetList("parentid=" + parentnode.id + " and ','+Language_ids+',' like '%," + CurrentLanguage.id + ",%'", "Sort desc,id desc"); if (node == null) { node = nodes.FirstOrDefault(); } 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>"; if (node != null) { path += "<em>»</em><a href=\"" + URL("P_Article", node.id) + "\"><span>" + node.Name + "</span></a>"; } if (node == null) { node = new Lebi_Node(); } string where = "Node_id=" + node.id + " and ','+Language_ids+',' like '%," + CurrentLanguage.id + ",%'"; pages = B_Lebi_Page.GetList(where, "Sort desc,id desc", PageSize, pageindex); recordCount = B_Lebi_Page.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?id=" + id + "&page={0}", pageindex, PageSize, recordCount, CurrentLanguage); }
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>"; }
public List <Lebi_Page> TopNews(int pagesize, string order) { string w = "Node_id=" + Node("News").id; List <Lebi_Page> models = B_Lebi_Page.GetList(w, order, pagesize, 1); //int f=models.Count; return(models); }
public static Lebi_Page GetPageByNode(Lebi_Node node, int Supplier_id) { Lebi_Page model = B_Lebi_Page.GetList("Supplier_id = " + Supplier_id + " and Node_id=" + node.id + "", "Sort desc").FirstOrDefault(); if (model == null) { model = new Lebi_Page(); } return(model); }
protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { pageindex = RequestTool.RequestInt("page", 1); LoadTheme(themecode, siteid, languagecode, pcode); CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_News'"); node = Node("News"); path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("Ê×Ò³") + "\"><span>" + Tag("Ê×Ò³") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_News", "") + "\"><span>" + Tag(node.Name) + "</span></a>"; string where = "Node_id=" + node.id + " and ','+Language_ids+',' like '%," + CurrentLanguage.id + ",%'"; pages = B_Lebi_Page.GetList(where, "Sort desc,id desc", PageSize, pageindex); recordCount = B_Lebi_Page.Counts(where); PageString = Shop.Bussiness.Pager.GetPaginationStringForWeb("?page={0}", pageindex, PageSize, recordCount, CurrentLanguage); }
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_NewsDetails'"); int id = Rint_Para("0"); node = Node("News"); page = B_Lebi_Page.GetModel(id); if (page == null) { PageError(); } else { page.Count_Views += 1; B_Lebi_Page.Update(page); } path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("Ê×Ò³") + "\"><span>" + Tag("Ê×Ò³") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_News", "") + "\"><span>" + Tag(node.Name) + "</span></a><em>»</em><a href=\"" + URL("P_NewsDetails", page.id) + "\"><span>" + page.Name + "</span></a>"; }
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="node"></param> /// <returns></returns> public static string AdminIndexPage(Lebi_Node node) { Site site = new Site(); string url = GetIndexPage(node, node.TypeFlag); switch (node.TypeFlag) { case 3: Lebi_Page page = B_Lebi_Page.GetList("Node_id=" + node.id + "", "Sort desc").FirstOrDefault(); if (page == null) { page = new Lebi_Page(); } url = site.AdminPath + "/" + url + "?Node_id=" + node.id + "&Page_id=" + page.id; break; default: url = site.AdminPath + "/" + url + "?Node_id=" + node.id; break; } return(url); }
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_Help'"); id = Rint_Para("0"); pageid = Rint_Para("1"); type = Rstring("type"); parentnode = Node("Help"); nodes = B_Lebi_Node.GetList("Parentid=" + parentnode.id + " and ','+Language_ids+',' like '%," + CurrentLanguage.id + ",%'", "Sort desc"); if (id == 0 && type != "") { node = new Lebi_Node(); if (type == "agreement") { Name = Tag("注册协议"); Content = Lang(SYS.ServiceP).Replace("\n", "<br/>"); } node.Name = Name; path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_Help", "") + "\"><span>" + Tag(parentnode.Name) + "</span></a><em>»</em><a class=\"text\"><span>" + Tag(Name) + "</span></a>"; } else { node = B_Lebi_Node.GetModel(id); if (node == null) { node = nodes.FirstOrDefault(); if (node == null) { node = new Lebi_Node(); //PageError(); } else { id = node.id; } } //else //{ // if (node.id == id) // { // node = nodes.FirstOrDefault(); // } //} pages = B_Lebi_Page.GetList("Node_id=" + node.id + "", "id desc"); if (pages == null) { pages = new List <Lebi_Page>(); } path = "<a href=\"" + CurrentLanguage.Path + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">»</em><a href=\"" + URL("P_Help", "") + "\"><span>" + Tag(parentnode.Name) + "</span></a>"; page = B_Lebi_Page.GetModel("id=" + pageid + ""); if (page == null) { page = pages.FirstOrDefault(); if (pages.FirstOrDefault() == null) { pageid = 0; } else { pageid = page.id; } } else { path += "<em>»</em><a href=\"" + URL("P_Help", node.id) + "\"><span>" + node.Name + "</span></a><em>»</em><a class=\"text\"><span>" + page.Name + "</span></a>"; } //Help_Content.pages = pages; } }