Sol–gel systems with controlled structure formed in surfactant media