index.php
define('TIME_START', microtime(true)); define('MAINTENANCE_MODE', false); define('DEBUG_MODE', false); //development error_reporting(E_ALL|E_STRICT); ini_set('display_errors', 1); //live site //error_reporting(0); //ini_set('display_errors', 0); date_default_timezone_set('America/Phoenix'); // domain - ie: localhost, example.com, demo.example.com,... define('DOMAIN', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']); //protocol - ie: http, https,... define('PROTOCOL', isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] === 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ? 'https' : 'http'); // port - ie: 80, 8080,... define('PORT', $_SERVER['SERVER_PORT']); // theme name (folder) define('THEME', 'default'); /***** trailing slashes are added to all below path defines *****/ // defines the web root ie: /folder/folder/ define('WEB_ROOT', substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], 'index.php'))); //site root - ie: http://example.com/folder/, http://localhost/example/folder/,... define('WEB_ROOT_FULL', PROTOCOL . '://' . DOMAIN . (PORT === '80' ? '' : ':' . PORT) . WEB_ROOT); // defines the path to the files define('ROOT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR); // defines the platform path define('PLATFORM_PATH', ROOT_PATH.'fastcycle'.DIRECTORY_SEPARATOR); // defines the platform path define('PLATFORM_BASE_PATH', PLATFORM_PATH.'base'.DIRECTORY_SEPARATOR); // defines the theme path define('THEME_PATH', ROOT_PATH.'themes'.DIRECTORY_SEPARATOR.THEME.DIRECTORY_SEPARATOR); // defines the theme url define('THEME_URL', WEB_ROOT.'themes/'.THEME.'/'); // defines the theme url define('THEME_URL_FULL', WEB_ROOT_FULL.'themes/'.THEME.'/'); // defines the uploads path define('UPLOADS_PATH', ROOT_PATH.'uploads'.DIRECTORY_SEPARATOR); // defines the uploads url define('UPLOADS_URL', WEB_ROOT.'uploads/'); // defines the uploads url define('UPLOADS_URL_FULL', WEB_ROOT_FULL.'uploads/');
fastcycle/config/routes.php
$routes = array( '/' => 'site/index', 'search' => 'site/search', 'documentation' => 'site/documentation', 'login' => 'user/login', 'logout' => 'user/logout', 'lookup' => 'lookup/save', 'users' => 'user/index', 'user' => 'user/index', 'user/save' => 'user/save', 'user/save/:id' => 'user/save', 'user/view/:id' => 'user/view' );