Changed main configuration setup

Added global environment declarations, and modified database object
Fixed database call

Consolidated the database call
Created config.inc.sample.php

Created sample application configuration file.