Spontaneous emission and nonlinear effects in photonic bandgap materials