Discuz.Web/admin/global/global_editorset.aspx.cs

(开头部分) 2KB

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

using System;
using System.Web.UI;
using System.Data;

using Discuz.Control;
using Discuz.Forum;
using Discuz.Config;
using Discuz.Common;
using Discuz.Plugin.Space;
using Discuz.Plugin.Album;
using Discuz.Plugin.Mall;

namespace Discuz.Web.Admin
{
    /// <summary>
    /// 基本设置
    /// </summary>

    public partial class editorset : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                LoadConfigInfo();
            }
        }

        public void LoadConfigInfo()
        {
            #region 加载配置信息
            GeneralConfigInfo configInfo = GeneralConfigs.GetConfig();
            allowswitcheditor.SelectedValue = configInfo.Allowswitcheditor.ToString();
            bbcodemode.SelectedValue = configInfo.Bbcodemode.ToString();
            defaulteditormode.SelectedValue = configInfo.Defaulteditormode.ToString();
            swfupload.SelectedValue = configInfo.Swfupload.ToString();
            #endregion
        }

        private void SaveInfo_Click(object sender, EventArgs e)
        {
            #region 保存信息
            if (this.CheckCookie())
            {  
                GeneralConfigInfo configInfo = GeneralConfigs.GetConfig();
                configInfo.Bbcodemode = TypeConverter.StrToInt(bbcodemode.SelectedValue);
                configInfo.Defaulteditormode = TypeConverter.StrToInt(defaulteditormode.SelectedValue);
                configInfo.Allowswitcheditor = TypeConverter.StrToInt(allowswitcheditor.SelectedValue);
                configInfo.Swfupload = Convert.ToInt16(swfupload.SelectedValue);
                GeneralConfigs.Serialiaze(configInfo, Server.MapPath("../../config/general.config"));
                AdminVistLogs.InsertLog(this.userid, this.username, this.usergroupid, this.grouptitle, this.ip, "编辑器设置", "");
                base.RegisterStartupScript("PAGE", "window.location.href='global_editorset.aspx';");
            }
            #endregion
        }

        #region Web 窗体设计器生成的代码

        protected override void OnInit(EventArgs e)
        {
后面还有 12 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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