<% local msg = {} if _SESSION["logined"] ~= nil then local domain = _GET["domain"] or _POST["domain"] if domain == nil then rawset(msg, "code", -2) rawset(msg, "error", "Domain does not exist!") print(json.encode(msg)) else local data= {} rawset(data, "sfv_list", c_GetSfvDirList(domain)) rawset(data, "enable_sfv", c_GetOptionInt(domain,DOPTION_ENABLE_SFVCHECK_INT) == 1) rawset(data, "enable_create_missing", c_GetOptionInt(domain,DOPTION_SFVCHECK_CREATMISSING_INT) == 1) rawset(data, "enable_send_result", c_GetOptionInt(domain,DOPTION_SFVCHECK_SENDRESULT_INT) == 1) rawset(data, "bad_file", c_GetOptionInt(domain,DOPTION_SFVCHECK_BADFILE_INT)) rawset(data, "create_progress", c_GetOptionInt(domain,DOPTION_SFVCHECK_PROGRESS_INT)) rawset(msg, "code", 0) rawset(msg, "data", data) print(json.encode(msg)) end else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>