added addodb dependency
fixed php open tags and code formating
code refactoring