2
0
mirror of https://github.com/boostorg/website.git synced 2026-01-24 06:22:15 +00:00
Files
website/common/code/boost_error_page.php
Daniel James 860cb21970 Custom html_encode to use UTF-8.
PHP 5.4 uses UTF-8 by default, but PHP 5.3 uses ISO-8859-1 so character
encoding is going wrong there. So replace htmlentities with a function
that uses the correct encoding.
2014-07-20 23:36:24 +01:00

81 lines
2.1 KiB
PHP

<?php
require_once(__DIR__.'/boost.php');
function error_page_404($location = null) {
if(!$location && isset($_SERVER['REQUEST_URI'])) {
$location = $_SERVER['REQUEST_URI'];
}
error_page('HTTP/1.0 404 Not Found', '404 Not Found',
$location ? 'File "' . $location . '" not found.' : null);
}
function error_page($header, $title, $message) {
if($header) header($header);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title><?php print html_encode($title); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="/favicon.ico" type="image/ico" />
<link rel="stylesheet" type="text/css" href="/style-v2/section-boost.css" />
<!--[if IE 7]> <style type="text/css"> body { behavior: url(/style-v2/csshover3.htc); } </style> <![endif]-->
</head>
<body>
<div id="heading">
<?php virtual("/common/heading.html"); ?>
</div>
<div id="body">
<div id="body-inner">
<div id="content">
<div class="section" id="intro">
<div class="section-0">
<div class="section-title">
<h1><?php print html_encode($title); ?></h1>
</div>
<?php if($message) : ?>
<div class="section-body">
<p><?php print html_encode($message); ?></p>
</div>
<?php endif ?>
</div>
</div>
</div>
<div id="sidebar">
<?php virtual("/common/sidebar-common.html"); ?><?php virtual("/common/sidebar-boost.html"); ?>
</div>
<div class="clear"></div>
</div>
</div>
<div id="footer">
<div id="footer-left">
<div id="revised">
<p>Revised $Date$</p>
</div>
<div id="copyright">
<p>Copyright Rene Rivera 2006-2007.</p>
</div><?php virtual("/common/footer-license.html"); ?>
</div>
<div id="footer-right">
<?php virtual("/common/footer-banners.html"); ?>
</div>
<div class="clear"></div>
</div>
</body>
</html>
<?php
}
?>