$rule) {
if (preg_match('~^'.$rule.'$~i', $uri, $params)) {
include('includes/views.inc.php');
$r = eval('return views::' . $action . '($params);');
switch ($r[0]) {
case 0:
exit;
case 404:
break;
default:
if ($r > 9000) die('
It\'s over 9000!
');
header("HTTP/1.1 500 Internal Server Error", true, 500);
exit('500 Internal Server Error
');
}
}
}
// No match? Send 404!
header($_SERVER['SERVER_PROTOCOL'] . " 404 Not Found");
if (isset($r[1])) $tpl->assign('type', $r[1]);
$tpl->display('error404.html');