* modified the loader so it triggers a 404 error when the to is not found
[vsc.git] / _res / loader.php
blobfa5ae8a017b0f2f9716a84f93ea4118935d1bc2d
1 <?php
2 require (LIB_PATH.'functions.inc.php');
3 /*
4 * Some general code manipulation
5 */
7 $to = tsPage::getRequest(NAV_VAR);
8 if (!empty($to) && is_dir(PAGE_PATH . $to) && is_file(PAGE_PATH . $to . DIRECTORY_SEPARATOR . 'code.php')) {
9 include (PAGE_PATH . $to . DIRECTORY_SEPARATOR . 'code.php');
10 }elseif (empty($to)) {
11 $to = 'index';
12 include (PAGE_PATH . $to . DIRECTORY_SEPARATOR . 'code.php');
13 } else {
14 $to = 'tsPage';
17 $to = tsPage::getInstance ($to);
18 $to->dispatch ();