Problem with civic 2004 xl 4dr

I buy civic 2004 2 months ago. It started showing check engine light so i went to mechanic he check it's diagnostic and told me that it's gas cap fault and reset it after when i refuel it comes up again everytime. Yesterday again i went to him he check it again and reset it. Today everything was ok i was driving I stop and turned off my car for 5 minutes and when i turn it on again i noticed battery light comes up. I drive back to my home 2 minutes drive and try turning it off and on again but it didn't start. So i call my friend and start using boost cables. I keep it turned on for 4-5 minutes and drive around 5-7 minutes And battery signal went away. Then again i refuel and check engine light comes up again with breaks lights and seatbelt light was also on even i was wearing seatbelt . That time i turned off and on 2-3 times to check battery is working fine and to check if lights goes away. Car was starting taking bit long but break check engine and seatbelt lights were on suddenly i notice low power and sterio got turned of and dashboard also stopped working. So i turned it off and after 4-5 hours now it's not starting up but rest of it is working fine when i turn on ignition on. Probably battery is low or dead as it seems to be old. I was checking over Internet there are so many problems related to it m worried that it's just a battery issue or something else? If anyone have any clue please let me know. I'll go to mechanic tommorow. Thanks.