Oil leak on 2002 Volvo S40

Car became sluggish. When I stopped and checked under thee hood, there was oil thrown all over the engine. What could this be and how much to fix? The car has 140,000 miles on it check engine light is on

1 answer
Oil fill cap in place and in good shape?