init($db); $args = explode('/', rawurldecode($_SERVER['REQUEST_URI'])); $i = 1; foreach($args as $key => $seg) { if($seg != "") { $args[$key] = mb_strtolower($seg, 'UTF-8'); uri($i, enc($args[$key])); $i++; } else unset($args[$key]); } if (!uri(1)) $args = array(MAIN_PAGE, MAIN_METHOD); if (($content = $Route->get_controller($args)) === false) // We not found this page.... $content = $Route->get_controller(array(MAIN_PAGE, "page404")); if(!isAjax() && !isset($_GET['callback'])) include ((uri(1) == 'admin' ? (BASE_URL.'lib/templates/admin.php') : (BASE_URL.'lib/templates/index.php') )); else echo $content; $time = microtime(true) - $start; printf('', $time);