<% local msg = {} if _SESSION["logined"] ~= nil then local domain_name = _POST["domain"] if domain_name ~= nil then local result = c_DeleteDomain(domain_name) if result == 1 then for _,domain in pairs(c_GetDomainList()) do local online = tostring(c_IsDomainOnline(domain)) rawset(_SESSION,"online_"..domain,online) end rawset(_SESSION, "online_"..domain_name, nil) SessionModule.save(_SESSION_ID) end if result == 1 then rawset(msg, "code", 0) print(json.encode(msg)) else rawset(msg, "code", -2) print(json.encode(msg)) end end else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>