Amorphous silicon phototransistor on a glass substrate