db->fetchRecord("SELECT *
FROM ".PX."objects, ".PX."objects_prefs
WHERE url = '$uri'
AND status = '1'
AND object = obj_ref_type");
if (!$rs)
{
// try again with site root
$rs = $OBJ->db->fetchRecord("SELECT *
FROM ".PX."objects, ".PX."objects_prefs
WHERE url = '/'
AND status = '1'
AND object = obj_ref_type");
// we don't search engines indexing this
header("HTTP/1.1 404 Not Found");
// we need a formal error page
if (!$rs) echo 'Page not found error here.';
}
// autoload 'plugins' folder
include DIRNAME.BASENAME.'/site/plugin/index.php';
// additional variables
// perhaps we should port these differently?
$rs['baseurl'] = BASEURL;
$rs['basename'] = BASENAME;
$rs['basefiles'] = BASEFILES;
$rs['gimgs'] = GIMGS;
// get the front end helper class
$OBJ->lib_class('front');
// time for some action
if ($rs['obj_theme'] == 'eatock')
{
$contents = $OBJ->front->front_eatock();
}
else
{
$filename = DIRNAME . BASENAME . '/site/' . $rs['obj_theme'] . '/index.php';
$fp = @fopen($filename, 'r');
$contents = fread($fp, filesize($filename));
fclose($fp);
}
// makin' stuff happen
$PARSE =& load_class('parse', TRUE, 'lib');
$PARSE->vars = $rs;
$PARSE->code = $contents;
echo $PARSE->parsing();
// do stats if they are wanted
if ($default['statistics'] == TRUE) load_class('statistics', TRUE, 'lib');
exit;
?>