<?php
    include __DIR__ . "/../application/config.php";
    include_once($path["controller"]);

    //$request = $_SERVER['REQUEST_URI'];
    $request = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
    $params = explode('/', $request);
    array_shift($params);
    $uid = "";
    if (count($params) > 0 && preg_match("/\d{7}/", $params[0])){
        $uid = $params[0];
        array_shift($params);
    }

    $controller = new Controller($uid, $params);
?>
