// make a connection to the database... now
olc_db_connect() or die('Unable to connect to database server!');
// set the application parameters
$configuration_query = olc_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
while ($configuration = olc_db_fetch_array($configuration_query)) {
    define($configuration['cfgKey'], $configuration['cfgValue']);
}
// define general functions used application-wide
require DIR_WS_FUNCTIONS . 'general.php';
require DIR_WS_FUNCTIONS . 'html_output.php';
// some code to solve compatibility issues
require DIR_WS_FUNCTIONS . 'compatibility.php';
// define how the session functions will be used
require DIR_WS_FUNCTIONS . 'sessions.php';
// include currencies class and create an instance
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// include the mail classes
require DIR_WS_CLASSES . 'mime.php';
require DIR_WS_CLASSES . 'email.php';
include PAYPAL_IPN_DIR . 'Classes/osC/Order.class.php';
$PayPal_osC_Order = new PayPal_osC_Order();
$PayPal_osC_Order->loadTransactionSessionInfo($_POST['custom']);
if (isset($PayPal_osC_Order->language)) {
    // include the language translations
    $language = $PayPal_osC_Order->language;
    include DIR_WS_LANGUAGES . $language . PHP;
} else {
    //later on change to Store Default
    include PAYPAL_IPN_DIR . 'languages/' . SESSION_LANGUAGE . PHP;
}