}
}
- $GLOBALS['basename'] = $basename;
+ $GLOBALS['wfpl_basename'] = $basename;
$html_file = "$basename.html";
$php_file = "$basename.php";
if(file_exists('template.html')) {
$GLOBALS['wfpl_main_template'] = new tem();
$GLOBALS['wfpl_main_template']->load("template.html");
- $GLOBALS['wfpl_main_template']->set('basename', $basename);
-
- # This helps put in a stylesheet link if you have pages with custom css
- if(file_exists("$basename.css")) {
- $GLOBALS['wfpl_main_template']->set('css_link', "$basename.css");
- $GLOBALS['wfpl_main_template']->sub('css_links');
+ $GLOBALS['wfpl_main_template']->set('$basename', $basename);
+ if(preg_match('/([.]l(ocal)?$)|^[0-9.]*$/', $_SERVER['HTTP_HOST'])) {
+ $GLOBALS['wfpl_main_template']->set('$running_locally');
}
}
run_php('error_404');
return;
} else {
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
+ echo '<!DOCTYPE html><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
exit();
}
}