Should the University of Phoenix lose it's accreditation would that render diplomas earned there invalid?

If you completed the degree while the institution was accredited, than it would be recognized. If the degree was completed while the institution was not regionally accredited then it would not be recognized by other regionally accredited schools, and possibly by some employers.