Well, lets see....you got includes we don't have, database calls we would need to create, and filesystem calls for dir's that don't exist. If you really want someone to go through all the trouble of making the proper enviroment to get this working, you're gonna need to go into more detail than "I can't get it to work"