Exemple #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);
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id  = RequestTool.RequestInt("id", 0);
            int pid = RequestTool.RequestInt("pid", 0);

            model = B_Lebi_Node.GetModel(id);
            if (model == null)
            {
                if (!EX_Admin.Power("usernode_add", "添加自定义结点"))
                {
                    WindowNoPower();
                }
                model = new Lebi_Node();
            }
            else
            {
                if (!EX_Admin.Power("usernode_edit", "编辑自定义结点"))
                {
                    WindowNoPower();
                }
                pid = model.parentid;
            }
            PNode = B_Lebi_Node.GetModel(pid);
            if (PNode == null)
            {
                PNode = new Lebi_Node();
            }
            UserNode = NodePage.GetNodeByCode("UserNode");
        }
Exemple #3
0
 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\">&raquo;</em><a href=\"" + URL("P_Article", "") + "\"><span>" + Tag(parentnode.Name) + "</span></a><em>&raquo;</em><a href=\"" + URL("P_Article", node.id) + "\"><span>" + node.Name + "</span></a><em>&raquo;</em><a href=\"" + URL("P_ArticleDetails", page.id) + "\"><span>" + page.Name + "</span></a>";
 }
Exemple #4
0
        /// <summary>
        /// 取得管理首页,自动继承上级设置
        /// </summary>
        /// <param name="node"></param>
        /// <param name="TypeFlag"></param>
        /// <returns></returns>
        static string GetIndexPage(Lebi_Node node, int TypeFlag)
        {
            string url = "";

            switch (TypeFlag)
            {
            case 3:
                if (node.AdminPage != "")
                {
                    url = node.AdminPage;
                }
                else
                {
                    node = B_Lebi_Node.GetModel(node.parentid);
                    url  = GetIndexPage(node, TypeFlag);
                }
                break;

            default:
                if (node.AdminPage != "")
                {
                    url = node.AdminPage_Index;
                }
                else
                {
                    node = B_Lebi_Node.GetModel(node.parentid);
                    url  = GetIndexPage(node, TypeFlag);
                }
                break;
            }
            return(url);
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("usernode_add", "添加自定义结点"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            int Node_id = RequestTool.RequestInt("Node_id", 0);

            UserNode = B_Lebi_Node.GetModel(Node_id);
            lang     = RequestTool.RequestString("lang");
            key      = RequestTool.RequestString("key");
            if (UserNode == null)
            {
                code = RequestTool.RequestString("code");
                if (code == "")
                {
                    code = "UserNode";
                }
                UserNode = NodePage.GetNodeByCode(code);
            }
            if (UserNode.Code == "Help")
            {
                PageCode = "P_Help";
            }
        }
Exemple #6
0
 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\">&raquo;</em><a href=\"" + URL("P_Article", "") + "\"><span>" + Tag(parentnode.Name) + "</span></a>";
     if (node != null)
     {
         path += "<em>&raquo;</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);
     FootPage     = PageString;
     NextPage     = "?id=" + id + "&page=" + (pageindex + 1) + "";
 }
Exemple #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int Node_id = RequestTool.RequestInt("Node_id", 0);
            int Page_id = RequestTool.RequestInt("Page_id", 0);

            page = B_Lebi_Page.GetModel(Page_id);
            if (page != null)
            {
                if (!EX_Admin.Power("page_edit", "编辑结点内容"))
                {
                    PageReturnMsg = PageNoPowerMsg();
                }

                Node_id = page.Node_id;
            }
            else
            {
                if (!EX_Admin.Power("page_add", "添加结点内容"))
                {
                    PageReturnMsg = PageNoPowerMsg();
                }

                page = new Lebi_Page();
            }
            node = B_Lebi_Node.GetModel(Node_id);
            if (node == null)
            {
                node = new Lebi_Node();
            }
            pnode = B_Lebi_Node.GetModel(node.parentid);
            if (pnode == null)
            {
                pnode = new Lebi_Node();
            }
        }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("image_del", "删除图库"))
            {
                PageNoPower();
            }
            PageSize = RequestTool.getpageSize(25);
            int Node_id = RequestTool.RequestInt("Node_id", 0);

            node = B_Lebi_Node.GetModel(Node_id);
            if (node == null)
            {
                Response.Write("参数错误");
                Response.End();
            }
            pnode = B_Lebi_Node.GetModel(node.parentid);
            if (pnode == null)
            {
                pnode = new Lebi_Node();
            }
            string where = "Node_id=" + node.id + "";
            int recordCount = B_Lebi_Page.Counts(where);

            pages      = B_Lebi_Page.GetList(where, "Sort desc,id desc", PageSize, page);
            PageString = Pager.GetPaginationString("?page={0}", page, PageSize, recordCount);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int id  = RequestTool.RequestInt("id", 0);
            int pid = RequestTool.RequestInt("pid", 0);

            model = B_Lebi_Node.GetModel(id);
            if (model == null)
            {
                if (!EX_Admin.Power("usernode_add", "添加自定义结点"))
                {
                    WindowNoPower();
                }
                model = new Lebi_Node();
                model.Type_id_PublishType = 120;
                model.haveson             = 1;
            }
            else
            {
                if (!EX_Admin.Power("usernode_edit", "编辑自定义结点"))
                {
                    WindowNoPower();
                }
                pid = model.parentid;
            }
            PNode = B_Lebi_Node.GetModel(pid);
            if (PNode == null)
            {
                PNode = new Lebi_Node();
            }
            string code = RequestTool.RequestString("code");

            Topnode = NodePage.GetNodeByCode(code);
        }
Exemple #10
0
        public static string AdminPage(Lebi_Node node)
        {
            string adminpath = RequestTool.GetConfigKey("AdminPath");
            string url       = GetPage(node);

            url = adminpath + "/" + url + "?Node_id=" + node.id;
            return(url);
        }
Exemple #11
0
        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);
        }
Exemple #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("usernode_add", "添加自定义结点"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            string code = RequestTool.RequestString("code");

            Topnode = NodePage.GetNodeByCode(code);
        }
Exemple #13
0
        public static string AdminIndexPage(int nodeid)
        {
            Lebi_Node node = B_Lebi_Node.GetModel(nodeid);

            if (node == null)
            {
                return("");
            }
            return(AdminIndexPage(node));
        }
Exemple #14
0
        /// <summary>
        /// 根据结点代码返回结点实体
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public static Lebi_Node GetNodeByCode(string code)
        {
            Lebi_Node model = B_Lebi_Node.GetList("code='" + code + "'", "Sort desc").FirstOrDefault();

            if (model == null)
            {
                model = new Lebi_Node();
            }
            return(model);
        }
Exemple #15
0
        public static Lebi_Node GetNodeByCode(string code, int Supplier_id)
        {
            Lebi_Node model = B_Lebi_Node.GetList("Supplier_id = " + Supplier_id + " and code='" + code + "'", "Sort desc").FirstOrDefault();

            if (model == null)
            {
                model = new Lebi_Node();
            }
            return(model);
        }
Exemple #16
0
 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\">&raquo;</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);
 }
Exemple #17
0
        /// <summary>
        /// 结点内容编辑地址
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        public static string AdminPage(Lebi_Node node, Lebi_Page page)
        {
            string adminpath = RequestTool.GetConfigKey("AdminPath");
            string url       = GetPage(node);

            if (page == null)
            {
                page = new Lebi_Page();
            }
            url = adminpath + "/" + url + "?Node_id=" + node.id + "&Page_id=" + page.id;
            return(url);
        }
        /// <summary>
        /// 文章分类
        /// </summary>
        /// <returns></returns>
        public string Article()
        {
            Lebi_Node        node  = NodePage.GetNodeByCode("Info");
            List <Lebi_Node> nodes = B_Lebi_Node.GetList("parentid=" + node.id + "", "");
            string           str   = "<tr><th>" + Tag("类别") + ":</th><td>";

            foreach (Lebi_Node n in nodes)
            {
                str += "<input type=\"checkbox\" name=\"node\" value=\"" + n.id + "\" shop=\"true\" >" + n.Name + "</br>";
            }
            str += "</td></tr>";
            return(str);
        }
Exemple #19
0
        /// <summary>
        /// 取得管理首页,自动继承上级设置
        /// </summary>
        /// <param name="node"></param>
        /// <param name="TypeFlag"></param>
        /// <returns></returns>
        static string GetPage(Lebi_Node node)
        {
            string url = "";

            if (node.AdminPage != "")
            {
                url = node.AdminPage;
            }
            else
            {
                node = B_Lebi_Node.GetModel(node.parentid);
                url  = GetPage(node);
            }
            return(url);
        }
Exemple #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int Page_id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Page.GetModel(Page_id);
            node  = NodePage.GetNodeByCode("shopindeximages");
            if (node == null)
            {
                PageReturnMsg = PageErrorMsg();
            }
            if (model == null)
            {
                model             = new Lebi_Page();
                model.Supplier_id = CurrentSupplier.id;
            }
        }
Exemple #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PageSize = RequestTool.getpageSize(25);

            node = NodePage.GetNodeByCode("shopindeximages");
            if (node == null)
            {
                PageReturnMsg = PageErrorMsg();
            }

            string where = "Node_id=" + node.id + " and Supplier_id=" + CurrentSupplier.id;
            int recordCount = B_Lebi_Page.Counts(where);

            pages      = B_Lebi_Page.GetList(where, "Sort desc,id desc", PageSize, page);
            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}", page, PageSize, recordCount);
        }
Exemple #22
0
        /// <summary>
        /// 新闻详情页面
        /// </summary>
        /// <param name="lang"></param>
        /// <param name="model"></param>
        /// <param name="theme"></param>
        /// <param name="urlpath"></param>
        private void P_NewsDetails(List <Lebi_Language> langs, Lebi_Theme_Page model, string urlpath)
        {
            string    url;
            Lebi_Node pnode     = NodePage.GetNodeByCode("News");
            DateTime  time1     = RequestTool.RequestTime("time1");
            DateTime  time2     = RequestTool.RequestTime("time2");
            int       pageindex = RequestTool.RequestInt("pageindex", 0);
            int       pagesize  = RequestTool.RequestInt("pagesize", 0);
            string    file      = "";

            string where = "Node_id=" + pnode.id + "  and Time_Add>='" + time1 + "' and Time_Add<='" + time2 + "'";
            List <Lebi_Page> pages = B_Lebi_Page.GetList(where, "", pagesize, pageindex);
            int count     = B_Lebi_Page.Counts(where);
            int pagecount = Pager.GetPageCount(pagesize, count);
            int per       = 100;

            if (pagecount > 0)
            {
                per = Convert.ToInt32(pageindex * 100 / pagecount);
            }
            List <Lebi_Site> sites = GetSites();
            Lebi_Site        site;

            foreach (Lebi_Page page in pages)
            {
                foreach (Lebi_Language lang in langs)
                {
                    if (page.Language.ToLower().Contains(lang.Code.ToLower()))
                    {
                        site = GetSite(sites, lang.Site_id);
                        file = site.Path + "/" + lang.Path + "/" + model.StaticPath + "/" + model.StaticPageName;
                        file = file.Replace("{0}", page.id.ToString());
                        file = ThemeUrl.CheckPath(file);

                        url = model.PageName + "?" + model.PageParameter;
                        url = url.Replace("{0}", page.id.ToString());
                        url = urlpath + "/" + site.Path + "/" + lang.Path + "/" + url;
                        url = ThemeUrl.CheckURL(url);
                        HtmlEngine.Instance.CreatHtml(url, file);
                    }
                }
            }
            Response.Write("{\"msg\":\"OK\",\"per\":\"" + per + "\"}");
        }
Exemple #23
0
        /// <summary>
        /// 帮助中心页面
        /// </summary>
        /// <param name="lang"></param>
        /// <param name="model"></param>
        /// <param name="theme"></param>
        /// <param name="urlpath"></param>
        private void P_Help(List <Lebi_Language> langs, Lebi_Theme_Page model, string urlpath)
        {
            string    url;
            Lebi_Node pnode     = NodePage.GetNodeByCode("Help");
            string    file      = "";
            int       pageindex = RequestTool.RequestInt("pageindex", 0);
            int       pagesize  = RequestTool.RequestInt("pagesize", 0);

            string where = "parentid=" + pnode.id + "";
            List <Lebi_Node> nodes = B_Lebi_Node.GetList(where, "", pagesize, pageindex);
            int count     = B_Lebi_Node.Counts(where);
            int pagecount = Pager.GetPageCount(pagesize, count);
            int per       = 100;

            if (pagecount > 0)
            {
                per = Convert.ToInt32(pageindex * 100 / pagecount);
            }
            List <Lebi_Site> sites = GetSites();
            Lebi_Site        site;

            foreach (Lebi_Node node in nodes)
            {
                foreach (Lebi_Language lang in langs)
                {
                    if (node.Language.ToLower().Contains(lang.Code.ToLower()))
                    {
                        site = GetSite(sites, lang.Site_id);
                        file = site.Path + "/" + lang.Path + "/" + model.StaticPath + "/" + model.StaticPageName;
                        file = file.Replace("{0}", node.id.ToString());
                        file = RegexTool.ReplaceRegValue(file, @"{.*?}", "");
                        file = ThemeUrl.CheckPath(file);

                        url = model.PageName + "?" + model.PageParameter;
                        url = url.Replace("{0}", node.id.ToString());
                        url = urlpath + "/" + site.Path + "/" + lang.Path + "/" + url;
                        url = RegexTool.ReplaceRegValue(url, @"{.*?}", "");
                        url = ThemeUrl.CheckURL(url);
                        HtmlEngine.Instance.CreatHtml(url, file);
                    }
                }
            }
            Response.Write("{\"msg\":\"OK\",\"per\":\"" + per + "\"}");
        }
Exemple #24
0
        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\">&raquo;</em><a href=\"" + URL("P_News", "") + "\"><span>" + Tag(node.Name) + "</span></a><em>&raquo;</em><a href=\"" + URL("P_NewsDetails", page.id) + "\"><span>" + page.Name + "</span></a>";
        }
Exemple #25
0
        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);
        }
Exemple #26
0
        /// <summary>
        /// 编辑|添加店铺幻灯图片
        /// </summary>
        public void indeximage_Edit()
        {
            int       id    = RequestTool.RequestInt("id", 0);
            Lebi_Page model = B_Lebi_Page.GetModel(id);
            Lebi_Node node  = NodePage.GetNodeByCode("shopindeximages");

            if (model == null)
            {
                model = new Lebi_Page();
            }
            B_Lebi_Page.SafeBindForm(model);
            model.Supplier_id = CurrentSupplier.id;
            model.Node_id     = node.id;
            if (model.id == 0)
            {
                if (!Power("indeximage_add", "添加店铺幻灯"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Page.Add(model);
                id = B_Lebi_Page.GetMaxId();
                string action      = "添加店铺幻灯";
                string description = model.Name;
                Log.Add(action, "Page", id.ToString(), CurrentSupplier, description);
            }
            else
            {
                if (!Power("indeximage_edit", "编辑店铺幻灯"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Page.Update(model);
                string action      = Tag("编辑店铺幻灯");
                string description = model.Name;
                Log.Add(action, "Page", id.ToString(), CurrentSupplier, description);
            }
            //=========================================
            //处理静态页面
            ImageHelper.LebiImagesUsed(model.ImageOriginal, "page", id);
            Response.Write("{\"msg\":\"OK\",\"id\":\"" + id + "\"}");
        }
Exemple #27
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);
        }
Exemple #28
0
        /// <summary>
        /// 编辑自定义结点
        /// </summary>
        public void CustomNode_Edit()
        {
            int       id      = RequestTool.RequestInt("id", 0);
            string    code    = RequestTool.RequestString("parentcode");
            Lebi_Node topnode = NodePage.GetNodeByCode(code);
            Lebi_Node model   = B_Lebi_Node.GetModel(id);

            if (model == null)
            {
                model = new Lebi_Node();
            }
            B_Lebi_Node.BindForm(model);
            if (topnode.IsLanguages == 1)
            {
                model.Name = Language.RequestString("Name");
            }
            if (model.id == 0)
            {
                if (!EX_Admin.Power("usernode_add", "添加自定义结点"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Node.Add(model);
                id = B_Lebi_Node.GetMaxId();
                string action      = Tag("添加自定义结点");
                string description = model.Name;
                Log.Add(action, "Node", model.id.ToString(), CurrentAdmin, description);
            }
            else
            {
                if (!EX_Admin.Power("usernode_edit", "编辑自定义结点"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Node.Update(model);
                string action      = Tag("编辑自定义结点");
                string description = model.Name;
                Log.Add(action, "Node", model.id.ToString(), CurrentAdmin, description);
            }
            Response.Write("{\"msg\":\"OK\",\"id\":\"" + id + "\"}");
        }
Exemple #29
0
        /// <summary>
        /// 删除结点
        /// </summary>
        public void Node_Del()
        {
            if (!EX_Admin.Power("node_del", "删除结点"))
            {
                EX_Admin.NoPower();
                return;
            }
            int       id    = RequestTool.RequestInt("id", 0);
            Lebi_Node model = B_Lebi_Node.GetModel(id);

            if (model == null)
            {
                Response.Write("{\"msg" + Tag("参数错误") + "\"}");
                return;
            }
            string action      = Tag("删除结点");
            string description = Shop.Bussiness.Language.Content(model.Name, "CN");

            Log.Add(action, "Node", id.ToString(), CurrentAdmin, description);
            B_Lebi_Node.Delete(id);
            Response.Write("{\"msg\":\"OK\"}");
        }
Exemple #30
0
        /// <summary>
        /// 编辑用户结点
        /// </summary>
        public void UserNode_Edit()
        {
            int       id    = RequestTool.RequestInt("id", 0);
            Lebi_Node model = B_Lebi_Node.GetModel(id);

            if (model == null)
            {
                model = new Lebi_Node();
            }
            B_Lebi_Node.BindForm(model);
            model.Language = Language.LanuageidsToCodes(model.Language_ids);
            if (model.id == 0)
            {
                if (!EX_Admin.Power("usernode_add", "添加自定义结点"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Node.Add(model);
                id = B_Lebi_Node.GetMaxId();
                string action      = Tag("添加自定义结点");
                string description = model.Name;
                Log.Add(action, "Node", model.id.ToString(), CurrentAdmin, description);
            }
            else
            {
                if (!EX_Admin.Power("usernode_edit", "编辑自定义结点"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Node.Update(model);
                string action      = Tag("编辑自定义结点");
                string description = model.Name;
                Log.Add(action, "Node", model.id.ToString(), CurrentAdmin, description);
            }
            Response.Write("{\"msg\":\"OK\",\"id\":\"" + id + "\"}");
        }