Studies on ESR and optical spectra of some transition metal and rare-earth ions doped in certain glasses