<% local msg = {} if _SESSION["logined"] ~= nil then local name = _POST["name"] local result = c_DeleteSMTP(name) if result == true then c_AddAdminLog("administrator '".._SESSION["admin"].."' deleted smtp config ["..name.."].",ADMIN_LOG_OK) rawset(msg, "code", 0) else c_AddAdminLog("administrator '".._SESSION["admin"].."' deleted smtp config ["..name.."] failed.",ADMIN_LOG_ERROR) rawset(msg, "code", -2) rawset(msg, "error", "deleted smtp config ["..name.."] failed.") end print(json.encode(msg)) else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>