Modified files for PHP5 and adapted variables to the new database.