We propose a general theory for the critical and pseudogap temperatures Tc and T * dependence on the doping concentration for high-Tc oxides, taking into account the charge inhomogeneities in the CuO2 planes. Several recent experiments have revealed that the charge density ρ in a given compound (mostly underdoped) is intrinsic inhomogeneous with large spatial variations which leads to a local charge density ρ(r). These differences in the local charge concentration yield insulator and metallic regions, either in an intrinsic granular or in a stripe morphology. In the metallic region, the inhomogeneous charge density produces also spatial or local distributions which form Cooper pairs at a local superconducting critical temperatures Tc(r) and zero temperature gap ∆0(r). For a given compound, the measured onset of vanishing gap temperature is identified as the pseudogap temperature, that is, T * , which is the maximum of all Tc(r). Below T * , due to the distribution of Tc(r)'s, there are some superconducting regions surrounded by insulator or metallic medium. The transition to a coherent superconducting state corresponds to the percolation threshold among the superconducting regions with different Tc(r)'s. The charge inhomogeneities have been studied by recent STM/S experiments which provided a model for our phenomenological distribution. To make definite calculations and compare with the experimental results, we derive phase diagrams for the BSCO, LSCO and YBCO families, with a mean field theory for superconductivity using an extended Hubbard Hamiltonian. We show also that this novel approach provides new insights on several experimental features of high-Tc oxides.