$allowed = true; break; } } if (!$allowed || count($pieces) == 0) { return Response::code(403); } $path = implode(DS, $pieces); if (!File::exists(J_PATH . $path) || is_dir(J_PATH . $path)) { return Response::code(404); } $im = new Image(J_PATH . $path); $im->resize((int) Request::get("width"), (int) Request::get("height"), Request::get("method", "fit"), Request::get("background", 0xffffff)); $im->header(); }); Router::register("*", "(:all)", function () { Response::code(404); if (Request::isLocal()) { echo "URI: " . URI::full() . "<br>\n"; echo "Path Info: " . Request::pathInfo() . "\n"; } return; }); if (URI::isManager()) { Structure::routes(); } Request::$route = Router::route(Request::method(), URI::current()); Event::fire(J_EVENT_RESPONSE_START); echo Request::$route->call(); Event::fire(J_EVENT_RESPONSE_END); //echo "<br><br>" . round(elapsed_time() * 1000000) / 1000 . "ms";