Study of the layered phases in the Cd(InxGa1−x)2S4 system