Prediction of ultraviolet absorption spectra of p-block ions in oxide media. Possible application to redox equilibria in glasses and molten salts