XANES and IR spectroscopy study of the electronic structure and chemical composition of porous silicon on n- and p-type substrates