Example #1
0
    define('SENDSTUDIO_APPLICATION_URL', false);
    define('SENDSTUDIO_LICENSEKEY', false);
    define('SENDSTUDIO_DEFAULTCHARSET', 'UTF-8');
}
/**
 * If the app is set up, we can include the addons and also the storage interfaces.
 * Once we have included those, we need to include the event system.
 *
 * We need to include the addon system first so the storage/event systems have the class/objects they need to work with.
 *
 * Then, include the database files and set up the db connection.
 * This is done before including the user object so the database object is 'complete' and not invalid.
 */
if (SENDSTUDIO_IS_SETUP) {
    require_once SENDSTUDIO_BASE_DIRECTORY . '/addons/interspire_addons.php';
    Interspire_Addons::SetUrl(SENDSTUDIO_APPLICATION_URL . '/admin');
    require_once SENDSTUDIO_API_DIRECTORY . '/settings.php';
    $settings_api = new Settings_API();
}
// SENDSTUDIO_SERVERTIMEZONE is no longer stored in database, rather it will be defined here pending deprecation
// TODO depracate in favour of IEM framework
if (!defined('SENDSTUDIO_SERVERTIMEZONE')) {
    $tempTimeZone = preg_replace('/^([+-])0?(\\d{1,2})(\\d\\d)/', '$1$2:$3', date('O'));
    if ($tempTimeZone == '+0:00') {
        $tempTimeZone = '';
    }
    define('SENDSTUDIO_SERVERTIMEZONE', "GMT{$tempTimeZone}");
}
if (SENDSTUDIO_IS_SETUP) {
    require_once IEM_PATH . '/ext/interspire_log/interspire_log.php';
    if (!IEM::isUpgrading()) {