Revert "add db.class.php and app.php"

This reverts commit c0793447e0159b34dd2dd3bb04b2aca788b5e8ef.
Revert "Revert "add db.class.php and app.php""

This reverts commit 10d12388281b5674367464023ba6dae1ac8c043d.