***************************************************************************************************/ if (strrpos($_SERVER['REQUEST_URI'], 'controller.php') !== false) { header('Location: ./'); exit; } /*************************************************************************************************** * * INCLUDES AND STARTUP * ***************************************************************************************************/ require_once __DIR__ . '/constants.php'; // instead of the previous require_once(CASH_PLATFORM_PATH) call, we manually // load CASHSystem and set admin_primary_cash_request to the first CASHRequest set include_once dirname(CASH_PLATFORM_PATH) . '/classes/core/CASHSystem.php'; include_once dirname(CASH_PLATFORM_PATH) . '/lib/mustache/Mustache.php'; $admin_primary_cash_request = CASHSystem::startUp(true); // admin-specific autoloader function cash_admin_autoloadCore($classname) { $file = ADMIN_BASE_PATH . '/classes/' . $classname . '.php'; if (file_exists($file)) { require_once $file; } } spl_autoload_register('cash_admin_autoloadCore'); // make an object to use throughout the pages $cash_admin = new AdminCore($admin_primary_cash_request->sessionGet('cash_effective_user'), $admin_primary_cash_request); $cash_admin->mustache_groomer = new Mustache(); $cash_admin->page_data['www_path'] = ADMIN_WWW_BASE_PATH; $cash_admin->page_data['public_url'] = CASH_PUBLIC_URL; $cash_admin->page_data['platform_version'] = CASHRequest::$version;
<?php /** * * This is the framework bootstrap script. It preps the environment (strips out * stupid shit like magic quotes), includes required classes, and instantiates * a CASH request ready to use — pre-populated with any REQUEST data that may * have been passed to the page. * * (Usage: included at the top of all pages.) * * @package diy.org.cashmusic * @author CASH Music * @link http://cashmusic.org/ * * Copyright (c) 2011, CASH Music * Licensed under the Affero General Public License version 3. * See http://www.gnu.org/licenses/agpl-3.0.html * **/ require 'classes/core/CASHSystem.php'; CASHSystem::startUp();