Sounds like you have more than one problem going on.
No CCU display and/or random fan blowing = bad CCU
Good display with little or no fan = blower regulator (called "final stage" in the catalog) w/ good blower
Neither would make foam come out of the vents. If your car uses R134a you can get everything you need to repair over the counter BUT it helps to have a manual. R12 (pre ~1996) and you'll need an EPA certification.