<% if _SESSION["logined"] ~= nil then if (_SESSION["admin_readonly"] ~= nil and _SESSION["admin_readonly"] == 1) or (_SESSION["admin_domainadmin"] ~= nil and _SESSION["admin_domainadmin"] == 1) then exit() end local enable_systemlog = _POST["enable_systemlog"] local systemlog_filename = _POST["systemlog_filename"] local systemlog_maxsize = _POST["systemlog_maxsize"] --local enable_logfile_system = _POST["enable_logfile_system"] --local enable_logscrn_system = _POST["enable_logscrn_system"] --local enable_logfile_task = _POST["enable_logfile_task"] --local enable_logscrn_task = _POST["enable_logscrn_task"] local enable_auditing = _POST["enable_auditing"] local audit_db_filename = _POST["audit_db_filename"] local enable_list_cache = _POST["enable_list_cache"] local enable_thumbnail = _POST["enable_thumbnail"] local enable_ed2k_link = _POST["enable_ed2k_link"] local enable_online_edit = _POST["enable_online_edit"] --local disable_sslv3 = _POST["disable_sslv3"] local disable_tlsv1 = _POST["disable_tlsv1"] local disable_tlsv11 = _POST["disable_tlsv11"] local no_resumption = _POST["no_resumption"] local no_renegotiation = _POST["no_renegotiation"] local no_cache = _POST["no_cache"] local enable_fips = _POST["enable_fips"] local restrict_session_ip = _POST["restrict_session_ip"] local enable_mfmt = _POST["enable_mfmt"] --local disable_ecdsakey = _POST["disable_ecdsakey"] local real_owner_group = _POST["real_owner_group"] local enable_chmod = _POST["enable_chmod"] local max_download_speed = _POST["max_download_speed"] local max_upload_speed = _POST["max_upload_speed"] local max_thread_num = _POST["max_thread_num"] local file_permissions = _POST["file_permissions"] local folder_permissions = _POST["folder_permissions"] local opensslciphers = _POST["opensslciphers"] local sftp_kex_algos = _POST["sftp_kex_algos"] local sftp_enc_algos = _POST["sftp_enc_algos"] local sftp_mac_algos = _POST["sftp_mac_algos"] local sftp_hostkey_algos = _POST["sftp_hostkey_algos"] local sftplog_level = _POST["sftplog_level"] local enable_old_webadmin = _POST["enable_old_webadmin"] local weblink_path = _POST["weblink_path"] or "" if weblink_path ~= "_WEBLINK" and c_IsValidDir(weblink_path) == false then weblink_path = "_WEBLINK" end local uploadlink_path = _POST["uploadlink_path"] or "" if uploadlink_path ~= "_UPLOADLINK" and c_IsValidDir(uploadlink_path) == false then uploadlink_path = "_UPLOADLINK" end local sqlite_path = _POST["sqlite_path"] or "" if sqlite_path ~= "Data" and c_IsValidDir(sqlite_path) == false then sqlite_path = "Data" end local ipmask = _POST["ipmask"] local ipmasks = json.decode(ipmask) local global_ipmasks = {} if type(ipmasks) == "table" then for _,ipmask in pairs(ipmasks) do local temp = {} table.insert(temp,ipmask.ip) table.insert(temp,ipmask.refuse) table.insert(temp,ipmask.comment) table.insert(global_ipmasks,temp) end end local filemask = _POST["filemask"] local filemasks = json.decode(filemask) local global_filemasks = {} if type(filemasks) == "table" then for _,filemask in pairs(filemasks) do local temp = {} table.insert(temp,filemask.filename) table.insert(temp,filemask.refuse) table.insert(global_filemasks,temp) end end c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_ENABLE_INT,enable_systemlog) c_SetGlobalOptionStr(GOPTION_SYSTEM_LOGFILE_FILENAME_STR,systemlog_filename) c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_MAXSIZE_INT,systemlog_maxsize) --c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_SYSTEM_ENABLE_INT,enable_logfile_system) --c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGSCREEN_SYSTEM_ENABLE_INT,enable_logscrn_system) --c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_TASK_ENABLE_INT,enable_logfile_task) --c_SetGlobalOptionInt(GOPTION_SYSTEM_LOGSCREEN_TASK_ENABLE_INT,enable_logscrn_task) c_DisconnectSQLITE() c_SetGlobalOptionInt(GOPTION_AUDIT_ENABLE_INT,enable_auditing) c_SetGlobalOptionStr(GOPTION_AUDITDB_FILENAME_STR,audit_db_filename) c_SetGlobalOptionInt(GOPTION_ENABLE_LIST_CACHE_INT,enable_list_cache) c_SetGlobalOptionInt(GOPTION_ENABLE_THUMBNAIL_INT,enable_thumbnail) c_SetGlobalOptionInt(GOPTION_ENABLE_ED2K_LINK_INT,enable_ed2k_link) c_SetGlobalOptionInt(GOPTION_ENABLE_ONLINE_EDIT_INT,enable_online_edit) --c_SetGlobalOptionInt(GOPTION_DISABLE_OPENSSLV3,disable_sslv3) c_SetGlobalOptionInt(GOPTION_DISABLE_TLSV1,disable_tlsv1) c_SetGlobalOptionInt(GOPTION_DISABLE_TLSV11,disable_tlsv11) c_SetGlobalOptionInt(GOPTION_OPENSSL_NO_RESUMPTION,no_resumption) c_SetGlobalOptionInt(GOPTION_OPENSSL_NO_RENEGOTIATION,no_renegotiation) c_SetGlobalOptionInt(GOPTION_OPENSSL_NO_CACHE,no_cache) c_SetGlobalOptionInt(GOPTION_ENABLE_FIPS,enable_fips) c_SetGlobalOptionInt(GOPTION_RESTRICT_SESSION_IP,restrict_session_ip) c_SetGlobalOptionInt(GOPTION_ENABLE_MFMT,enable_mfmt) --c_SetGlobalOptionInt(GOPTION_DISABLE_ECDSA_KEY,disable_ecdsakey) c_SetGlobalOptionInt(GOPTION_LIST_WITH_REAL_USERGROUP,real_owner_group) c_SetGlobalOptionInt(GOPTION_ENABLE_CHMOD,enable_chmod) c_SetGlobalOptionInt(GOPTION_MAX_DOWNLOAD_SPEED_INT,max_download_speed) c_SetGlobalOptionInt(GOPTION_MAX_UPLOAD_SPEED_INT,max_upload_speed) c_SetGlobalOptionInt(GOPTION_MAX_THREADPOOL_INT,max_thread_num) c_SetGlobalOptionStr(GOPTION_DEFAULT_FILE_PERM,file_permissions) c_SetGlobalOptionStr(GOPTION_DEFAULT_FOLDER_PERM,folder_permissions) c_SetGlobalOptionStr(GOPTION_OPENSSL_CIPHERS,opensslciphers) c_SetGlobalOptionStr(GOPTION_SFTP_KEX_ALGOS,sftp_kex_algos) c_SetGlobalOptionStr(GOPTION_SFTP_ENC_ALGOS,sftp_enc_algos) c_SetGlobalOptionStr(GOPTION_SFTP_MAC_ALGOS,sftp_mac_algos) c_SetGlobalOptionStr(GOPTION_SFTP_HOST_KEY,sftp_hostkey_algos) c_SetGlobalOptionInt(GOPTION_SSHLOG_LEVEL,sftplog_level) c_SetGlobalOptionInt(GOPTION_OLD_WEBADMIN,enable_old_webadmin) c_SetGlobalOptionStr(GOPTION_WEBLINK_PATH,weblink_path) c_SetGlobalOptionStr(GOPTION_UPLOADLINK_PATH,uploadlink_path) local oldSQLiteFolder = c_GetGlobalOptionStr(GOPTION_SQLITE_DB_FOLDER) if sqlite_path ~= oldSQLiteFolder then c_SetGlobalOptionStr(GOPTION_SQLITE_DB_FOLDER,sqlite_path) c_DisconnectSQLITE2() end c_SetGlobalIPMaskList(global_ipmasks) c_SetGlobalFileMaskList(global_filemasks) end %>