예제 #1
0
        /// <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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 /// <summary>
 /// 根据结点代码返回结点
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public Lebi_Node Node(string code)
 {
     return(NodePage.GetNodeByCode(code));
 }