It's best to get professional cleaners to work on carpets and floors, if possible, particularly if sewage is involved. In any case, begin cleanup as soon as possible. If the carpet doesn't feel wet but you suspect the subfloor is, pull up one or two corners of the carpet to check. Pull up wet carpets and rugs and drape them outdoors.
Hose carpets down.
With a broom, work a low-sudsing, disinfectant carpetcleaning product deep into soiled spots. To discourage mildew and odors, rinse with a solution of two tablespoons bleach to one gallon water. To avoid further mildew problems and shrinkage, dry carpet and floor thoroughly before replacing carpet. Use fans, vacuum cleaners, and dehumidifiers to speed the drying. Sections of subfloors that separate must be replaced to avoid buckling.