Cement board backing for the tile. There are drain holes in the drain assembly which could be blocked with mortar. If the pan was installed correctly, i.e., the drain flange even with, or below, the floor, then the water should drain out when the holes are opened. If the flange is above the floor, then a sub base of mortar should be put in that slopes from the sides to the drain, then the new pan installed. Only you can tell if the studs have deteriorated to the point that they need replacing. If you can stick an ice pick or awl deep into the wood easily then they probably do need replacing.