DTcms.Web/admin/settings/plugin_list.aspx.cs

(开头部分) 9KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.IO;
using System.Xml;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;

namespace DTcms.Web.admin.settings
{
    public partial class plugin_list : DTcms.Web.UI.ManagePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_plugin", DTEnums.ActionEnum.View.ToString()); //检查权限
                RptBind();
            }
        }

        #region 插件列表绑定
        private void RptBind()
        {
            List<Model.plugin> lt = new List<Model.plugin>();
            BLL.plugin bll = new BLL.plugin();

            this.rptList.DataSource = bll.GetList(Utils.GetMapPath("../../plugins/"));
            this.rptList.DataBind();
        }
        #endregion

        #region 生成插件模板
        private void MarkTemplates(string dirName)
        {
            BLL.url_rewrite bll = new BLL.url_rewrite();
            List<Model.url_rewrite> ls = bll.GetList("");
            //插件目录
            string pluginPath = Utils.GetMapPath("../../plugins/" + dirName + "/templet/");
            if (!Directory.Exists(pluginPath))
            {
                return;
            }
            DirectoryInfo dirInfo = new DirectoryInfo(pluginPath);
            foreach (FileInfo file in dirInfo.GetFiles())
            {
                if (!file.Name.StartsWith("_") && file.Name.EndsWith(".html"))
                {
                    foreach (Model.url_rewrite model in ls)
                    {
                        if (file.Name.ToLower() == model.templet && !string.IsNullOrEmpty(model.inherit))
                        {
                            //生成模板文件
                            PageTemplate.GetTemplate(siteConfig.webpath, "plugins/" + dirName, "templet", model.templet, model.page, model.inherit, 0, 1);
                        }
                    }
                }
            }
        }
后面还有 164 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。