<% local msg = {} if _SESSION["logined"] ~= nil then local data = {} rawset(data, "enable_list_cache", c_GetGlobalOptionInt(GOPTION_ENABLE_LIST_CACHE_INT) == 1) rawset(data, "enable_systemlog", c_GetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_ENABLE_INT) == 1) rawset(data, "systemlog_filename", c_GetGlobalOptionStr(GOPTION_SYSTEM_LOGFILE_FILENAME_STR)) rawset(data, "systemlog_maxsize", c_GetGlobalOptionInt(GOPTION_SYSTEM_LOGFILE_MAXSIZE_INT)) rawset(data, "enable_auditing", c_GetGlobalOptionInt(GOPTION_AUDIT_ENABLE_INT) == 1) rawset(data, "audit_db_filename", c_GetGlobalOptionStr(GOPTION_AUDITDB_FILENAME_STR)) rawset(data, "enable_thumbnail", c_GetGlobalOptionInt(GOPTION_ENABLE_THUMBNAIL_INT) == 1) rawset(data, "enable_online_edit", c_GetGlobalOptionInt(GOPTION_ENABLE_ONLINE_EDIT_INT) == 1) rawset(data, "disable_tlsv1", c_GetGlobalOptionInt(GOPTION_DISABLE_TLSV1) == 1) rawset(data, "disable_tlsv11", c_GetGlobalOptionInt(GOPTION_DISABLE_TLSV11) == 1) rawset(data, "no_resumption", c_GetGlobalOptionInt(GOPTION_OPENSSL_NO_RESUMPTION) == 1) rawset(data, "no_renegotiation", c_GetGlobalOptionInt(GOPTION_OPENSSL_NO_RENEGOTIATION) == 1) rawset(data, "no_cache", c_GetGlobalOptionInt(GOPTION_OPENSSL_NO_CACHE) == 1) rawset(data, "enable_fips", c_GetGlobalOptionInt(GOPTION_ENABLE_FIPS) == 1) rawset(data, "restrict_session_ip", c_GetGlobalOptionInt(GOPTION_RESTRICT_SESSION_IP) == 1) rawset(data, "enable_mfmt", c_GetGlobalOptionInt(GOPTION_ENABLE_MFMT) == 1) rawset(data, "disable_ecdsakey", c_GetGlobalOptionInt(GOPTION_DISABLE_ECDSA_KEY) == 1) rawset(data, "real_owner_group", c_GetGlobalOptionInt(GOPTION_LIST_WITH_REAL_USERGROUP) == 1) rawset(data, "enable_chmod", c_GetGlobalOptionInt(GOPTION_ENABLE_CHMOD) == 1) rawset(data, "max_download_speed", c_GetGlobalOptionInt(GOPTION_MAX_DOWNLOAD_SPEED_INT)) rawset(data, "max_upload_speed", c_GetGlobalOptionInt(GOPTION_MAX_UPLOAD_SPEED_INT)) rawset(data, "max_thread_num", c_GetGlobalOptionInt(GOPTION_MAX_THREADPOOL_INT)) rawset(data, "ipmasks", c_GetGlobalIPMaskList()) rawset(data, "filemasks", c_GetGlobalFileMaskList()) rawset(data, "file_permissions", c_GetGlobalOptionStr(GOPTION_DEFAULT_FILE_PERM)) rawset(data, "folder_permissions", c_GetGlobalOptionStr(GOPTION_DEFAULT_FOLDER_PERM)) rawset(data, "opensslciphers", c_GetGlobalOptionStr(GOPTION_OPENSSL_CIPHERS)) rawset(data, "sftp_kex_algos", c_GetGlobalOptionStr(GOPTION_SFTP_KEX_ALGOS)) rawset(data, "sftp_enc_algos", c_GetGlobalOptionStr(GOPTION_SFTP_ENC_ALGOS)) rawset(data, "sftp_mac_algos", c_GetGlobalOptionStr(GOPTION_SFTP_MAC_ALGOS)) rawset(data, "sftp_hostkey_algos", c_GetGlobalOptionStr(GOPTION_SFTP_HOST_KEY)) rawset(data, "sftplog_level", c_GetGlobalOptionInt(GOPTION_SSHLOG_LEVEL)) rawset(data, "weblink_path", c_GetGlobalOptionStr(GOPTION_WEBLINK_PATH)) rawset(data, "uploadlink_path", c_GetGlobalOptionStr(GOPTION_UPLOADLINK_PATH)) rawset(data, "sqlite_path", c_GetGlobalOptionStr(GOPTION_SQLITE_DB_FOLDER)) rawset(data, "enable_old_webadmin", c_GetGlobalOptionInt(GOPTION_OLD_WEBADMIN) == 1) rawset(data, "log_permission", c_GetGlobalOptionStr(GOPTION_LOG_FILE_PERM)) rawset(msg, "code", 0) rawset(msg, "data", data) else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") end print(json.encode(msg)) %>