Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 100 lines (86 sloc) 3.625 kB
<?
ini_set("log_errors","false");
// Set some config vars automatically and setup some globals.
$domain = rtrim($bigtree["config"]["domain"],"/");
// This is set now in index.php but is left for backwards compatibility.
$server_root = isset($server_root) ? $server_root : str_replace("core/bootstrap.php","",strtr(__FILE__, "\\", "/"));
$site_root = $server_root."site/";
$www_root = $bigtree["config"]["www_root"];
$static_root = isset($bigtree["config"]["static_root"]) ? $bigtree["config"]["static_root"] : $www_root;
$secure_root = str_replace("http://","https://",$www_root);
define("WWW_ROOT",$www_root);
define("STATIC_ROOT",$static_root);
define("SECURE_ROOT",$secure_root);
define("DOMAIN",$domain);
define("SERVER_ROOT",$server_root);
define("SITE_ROOT",$site_root);
// Include required utility functions
if (file_exists(SERVER_ROOT."custom/inc/bigtree/utils.php")) {
include SERVER_ROOT."custom/inc/bigtree/utils.php";
} else {
include SERVER_ROOT."core/inc/bigtree/utils.php";
}
// Connect to MySQL and include the shorterner functions
include BigTree::path("inc/utils/mysql.inc.php");
// Setup our connections as disconnected by default.
$bigtree["mysql_read_connection"] = "disconnected";
$bigtree["mysql_write_connection"] = "disconnected";
// Turn on debugging if we're in debug mode.
if ($bigtree["config"]["debug"]) {
error_reporting(E_ALL ^ E_NOTICE);
ini_set("display_errors","on");
} else {
ini_set("display_errors","off");
}
// Load Up BigTree!
include BigTree::path("inc/bigtree/core.php");
if (BIGTREE_CUSTOM_BASE_CLASS) {
include BIGTREE_CUSTOM_BASE_CLASS_PATH;
eval('$cms = new '.BIGTREE_CUSTOM_BASE_CLASS.';');
} else {
$cms = new BigTreeCMS;
}
// Lazy loading of modules
$bigtree["module_list"] = $cms->ModuleClassList;
$bigtree["other_classes"] = array(
"CSSMin" => "inc/utils/CSSMin.php",
"htmlMimeMail" => "inc/utils/html-mail.inc.php",
"JSMin" => "inc/utils/JSMin.php",
"PasswordHash" => "inc/utils/PasswordHash.php",
"TextStatistics" => "inc/utils/text-statistics.php",
"BigTreeUploadService" => "inc/bigtree/upload-service.php",
"BigTreePaymentGateway" => "inc/bigtree/payment-gateway.php",
"BigTreeAdmin" => "inc/bigtree/admin.php",
"BigTreeGoogleAnalytics" => "inc/bigtree/google-analytics.php",
"BigTreeAutoModule" => "inc/bigtree/auto-modules.php",
"S3" => "inc/utils/amazon-s3.php",
"CF_Authentication" => "inc/utils/rackspace-cloud.php"
);
if (BIGTREE_CUSTOM_ADMIN_CLASS) {
$bigtree["other_classes"][BIGTREE_CUSTOM_ADMIN_CLASS] = BIGTREE_CUSTOM_ADMIN_CLASS_PATH;
}
function __autoload($class) {
global $bigtree;
if (isset($bigtree["other_classes"][$class])) {
include_once BigTree::path($bigtree["other_classes"][$class]);
} elseif (file_exists(SERVER_ROOT."custom/inc/modules/".$bigtree["module_list"][$class].".php")) {
include_once SERVER_ROOT."custom/inc/modules/".$bigtree["module_list"][$class].".php";
} elseif (file_exists(SERVER_ROOT."core/inc/modules/".$bigtree["module_list"][$class].".php")) {
include_once SERVER_ROOT."core/inc/modules/".$bigtree["module_list"][$class].".php";
}
}
// Load everything in the custom extras folder.
$d = opendir(SERVER_ROOT."custom/inc/required/");
$custom_required_includes = array();
while ($f = readdir($d)) {
if ($f != "." && $f != ".." && !is_dir(SERVER_ROOT."custom/inc/required/$f")) {
$custom_required_includes[] = SERVER_ROOT."custom/inc/required/$f";
}
}
closedir($d);
foreach ($custom_required_includes as $r) {
include $r;
}
// Clean up
unset($d,$r,$custom_required_includes);
?>
Jump to Line
Something went wrong with that request. Please try again.