added multiple db support for index.php,updated the scripts