leaning toilet

The photo below is of a bath toilet in a 20+ year old house. Water had been leaking at the base of the toilet where it connects to the drain line. Everytime the toilet was flushed water would soak the floor under and around the toilet. The leaning toilet is the result of the subfloor and floor joist underneath that rotted from the constant wetting.