Mercurial > SimpleWebPresenter
diff common-functions.inc @ 90:aafc23919e79
Validating errorPage.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 17 Oct 2012 21:23:02 +0200 |
| parents | 7a9c45b53866 |
| children | 8aadd7a23b68 |
line wrap: on
line diff
--- a/common-functions.inc Wed Oct 17 20:43:25 2012 +0200 +++ b/common-functions.inc Wed Oct 17 21:23:02 2012 +0200 @@ -115,7 +115,15 @@ function errorPage($errorText, $errorCode = 403) { header(StatusCodes::httpHeaderFor($errorCode)); + print '<?xml version="1.0" encoding="UTF-8"?>'; + print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head>'; + + print '<title>' . StatusCodes::httpHeaderFor($errorCode) . '</title>'; + print '</head><body>'; print "<div id=\"page\"><h1>${errorText}</h1></div>"; + print '</body></html>'; + exit; }
