+ initial commit of the lib separation branch - based on h.org code
[vsc.git] / index.php
blob79ff1d5bb08f60d2b680858f61e40d800c5c291f
1 <?php
2 require ('config.inc.php');
3 require (LIB_PATH.'functions.inc.php');
4 ob_start();
5 $myRoute = new tsRouter ();
6 $myRoute->addRoute ('index', '', true);
7 $myRoute->addRoute ('habarnam', '/aventurile lui habarnam/i');
8 $myRoute->addRoute ('habarnam2', '/habarnam si orasul soarelui|orasul soarelui/i');
9 /**
10 * REQUEST_URI : /Aventurile+Lui+Habarnam/Cum+a+devenit+Habarnam+muzicant
11 * 1. match pe req_uri : aventurile lui habarnam
12 * habarnam
13 * => to=habarnam
14 * 2. match pe restul req_uri
16 //$to = ctrlFactory::getController ();
17 $to = $myRoute->getController ();
18 //var_dump($to);
19 if ($to instanceof tsController ) {
20 $to->dispatch ();
21 } else {
22 $to = new tsControllerHtml();
23 $to->dispatch();