My iPhone 5 is broken, constantly shutting off/not turning on and I really need you

So about 4 days ago a pop up kept coming up on my iPhone saying 'Can't Verify Server Identity' Then it would say 'The identity of ''google.com'' can't be verified by Gmail. Review the certificate details to continue.'
After this the entire phone would shut down. For two days the phone would not turn on, id plug it in to charge and the most that would happen would be that the White screen with black apple logo would come on for about 3-4 seconds and then the phone would shut off, I finally got it to turn on yesterday and I completely restored the phone and updated it from iOs8 to the latest iOs9. However, especially when its not plugged in or after a few minutes of using it purple vertical lines cover the screen and then it completely shuts down, unable to turn back on again for several hours AT LEAST. I can't bring this to an apple store as I live nowhere near one! And I also bought this phone second hand last summer. Also to take note, I'm with Vodafone but on the top left of my screen where it usually shows this network, it just says 'Searching…' It also keeps disconnecting from the charger/computer and then completely shuts off, unable to turn back on. I'm so frustrated!
I really need help. Thank you.
ALSO it was jailbroken to being with if that is helpful? But i had it jailbroken last summer and had no problems with that so?

Take it to a service center for inspection and repair. Be aware that it may not be possible to fix it, and be prepared to replace it.