<% local msg = {} if _SESSION["logined"] ~= nil then local enable_adminlog = _POST["enable_adminlog"] local sha256_password = _POST["sha256_password"] local adminlog_filename = _POST["adminlog_filename"] local adminlog_maxsize = _POST["adminlog_maxsize"] local log_permission = _POST["log_permission"] c_SetAdminOptionInt(ADMIN_OPTION_LOGFILE_ENABLE_INT,enable_adminlog) c_SetAdminOptionInt(ADMIN_OPTION_ENABLE_SHA256,sha256_password) c_SetAdminOptionStr(ADMIN_OPTION_LOGFILE_FILENAME_STR,adminlog_filename) c_SetAdminOptionInt(ADMIN_OPTION_LOGFILE_MAXSIZE_INT,adminlog_maxsize) c_SetAdminOptionStr(ADMIN_OPTION_LOG_FILE_PERM,log_permission) rawset(msg, "code", 0) else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") end print(json.encode(msg)) %>