<% local msg = {} if _SESSION["logined"] ~= nil then local domain = _POST["domain"] local filemask = _POST["filemask"] local filemasks = json.decode(filemask) local domain_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(domain_filemasks,temp) end end c_SetFileMaskList(domain,domain_filemasks) rawset(msg, "code", 0) print(json.encode(msg)) else rawset(msg, "code", -1) rawset(msg, "error", "Not logged in") print(json.encode(msg)) end %>