Electron states and luminescence transition in porous silicon