From lamellar net to bilayered-lamella and to porous pillared-bilayer: reversible crystal-to-crystal transformation, CO2 adsorption, and fluorescence detection of Fe3+, Al3+, Cr3+, MnO4-, and Cr2O72- in water.