00001 <?php
00026 error_reporting(E_ALL ^ E_STRICT);
00027 define('START_TIME', microtime(1));
00035 define('APP_PATH', dirname(dirname(__FILE__)) . '/');
00036
00041 define('APP', basename(APP_PATH));
00042
00049 define('CORE_PATH', dirname(APP_PATH) . '/core/');
00050
00057 define('VENDORS_PATH', CORE_PATH . 'vendors/');
00058
00067 if($_SERVER['QUERY_STRING']) {
00068 define('URL_PATH', substr($_SERVER['REQUEST_URI'], 0, -strlen($_SERVER['QUERY_STRING']) + 4));
00069 } else {
00070 define('URL_PATH', $_SERVER['REQUEST_URI']);
00071 }
00072
00081 define('PUBLIC_PATH', URL_PATH);
00082
00086 require CORE_PATH . 'kumbia/kumbia_exception.php';
00090 set_exception_handler(array('KumbiaException', 'handle_exception'));
00091
00095 require CORE_PATH . 'kumbia/config.php';
00099 require CORE_PATH . 'extensions/cache/cache.php';
00103 $config = Config::read('config.ini');
00104
00108 $url = isset($_GET['url']) ? $_GET['url'] : '';
00109
00113 if(!$config['application']['production']) {
00114 Cache::active(false);
00115 } elseif ($template = Cache::get($url, 'kumbia.templates')) {
00116 echo $template;
00117 echo '<!-- Tiempo: '.round(microtime(1)-START_TIME,4).' seg. -->';
00118 exit(0);
00119 }
00120
00124 session_start();
00125
00129 require CORE_PATH . 'kumbia/kumbia.php';
00133 Kumbia::main($url);