Self-powered multifunctional UV and IR photodetector as an artificial electronic eye