Transient photoinduced current in dye-doped polymer and polymer-dispersed liquid crystals