Could be a number of reasons. Your battery needs replacing, or the posts are dirty, or you may need an alternator... See a mechanic and have them scan the computer code.
something may have been jarred loose...though that would be odd as everything is screwed down. Take the back off and re attach everything inside and see if that works. If that doesn't work... try replacing the docking port... then see if the computer recognizes it... if not... its the logic board and you will need a new phone.
DFU mode and restore through iTunes. This will get rid of jailbreak but its the only way to fix your phone. If that doesn't work your out of luck and need a new phone.