High-Tc superconductivity in a layered system