Hyundai Repair: p0171 code, hyundai santa fe, maneger


Question
I just bought a used 2001 hyundai santa fe. The check engine light keeps coming back on. The code keeps saying p0171, which to my knowledge and code reading machine indicates "system to lean bank 1"...my friend who is an air force mechanic said that it might be a bad 02 sensor. so i replaced it. After replacing it the code still came back on. then we discovered a huge crack in the exhaust manifold. a mechanic told me that the crack is leaking air and might be the reason for the code so i spent $900 to replace the exhaust manifold. i drove it for 40 mins and the light came back on. I dont have no more money to throw away on this, please help me anyway you can. i just want to know the real problem so i can get it fixed. THANKS

Answer
This question is too long and involved for me to help with i am very sorry but the problem do's lay with the computer getting a lean code an i cant just pick  one thing out an say thats it. best thing i know you dont want to hear this is dealer help being it might be under warenty so try the DPSM Distric parts an service maneger can help you at the deal get this taken care of.hope thyis helps