Пример #1
0
    $route = $base->GET_ROUTES($URI_VAL);
    if ($route) {
        /*
         * get default template 
         */
        $temp_info = $base->GET_DEFAULT_TEMPLATE();
        if ($temp_info) {
            /*
             * get controller 
             */
            if ($route != "system") {
                $execution_info = explode("/", $route);
                $controller = $execution_info[0];
                $method = $execution_info[1];
                require_once CONTROLLERS_PATH . '/' . $controller . ".php";
                /*
                 * execute custom method(without template), if $method != _systemview
                 */
                $Cont = new $controller($temp_info);
                echo $Cont->{$method}();
            } else {
                $html = $base->PARSE_TEMPLATE($temp_info, $URI_VAL);
                echo $html;
            }
        } else {
            die("ERROR>> default template not defined!");
        }
    } else {
        die("ERROR>> URI is not defined.");
    }
}