<?php

$adm = getenv('WEB___DIR') . DIRECTORY_SEPARATOR . 'administrator';

if (file_exists($adm . '/defines.php')) {
    include_once $adm . '/defines.php';
}

if (!defined('_JDEFINES')) {
    define('JPATH_BASE', $adm);
    require_once JPATH_BASE . '/includes/defines.php';
}

//require_once JPATH_BASE . '/includes/framework.php'
// dont include real framework.php when /installation/ folder exist
// simulate require_once JPATH_BASE . '/includes/framework.php';

// System includes
require_once JPATH_LIBRARIES . '/import.legacy.php';

// Bootstrap the CMS libraries.
require_once JPATH_LIBRARIES . '/cms.php';

// Pre-Load configuration. Don't remove the Output Buffering due to BOM issues, see JCode 26026
ob_start();
require_once JPATH_CONFIGURATION . '/configuration.php';
ob_end_clean();
