<% local msg = {} if _SESSION["logined"] ~= nil then local ipmask = _POST["ipmask"] local ipmasks = json.decode(ipmask) local admin_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(admin_ipmasks,temp) end end c_SetAdminIPMaskList(admin_ipmasks) rawset(msg, "code", 0) print(json.encode(msg)) else rawset(msg, "code", -1) rawset(msg, "error", "Not logged in") print(json.encode(msg)) end %>