A novel class of luminescent polymers obtained by the sol–gel approach