<% if _SESSION["logined"] ~= nil then local domain = _POST["domain"] local user = _POST["user"] local oldname = _POST["oldname"] local resetstat = _POST["resetstat"] or nil if user ~= nil then user = json.decode(user) if oldname ~= user.username then local result = c_UserExist(domain,user.username) if result == true then print("0") else c_DeleteUser(domain,oldname) AddUser(domain,user) print("1") end else if resetstat ~= nil then c_ResetUserStatistic(domain,user.username) end AddUser(domain,user) print("1") end end end %>