[2 + 2] cycloaddition reaction and luminescent sensing of Fe3+ and Cr2O72- ions by a cadmium-based coordination polymer.