Absorption and emission spectra of thulium and erbium in borate and phosphate glasses