cvs: phpweb /include errors.inc

From: Date: Sat, 06 Sep 2003 19:04:39 +0000
Subject: cvs: phpweb /include errors.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-20860@lists.php.net to get a copy of this message
goba Sat Sep 6 15:04:39 2003 EDT Modified files: /phpweb/include errors.inc Log: Add servername to error message so we know what server has problems if someone copy-pastes the error message to us... Index: phpweb/include/errors.inc diff -u phpweb/include/errors.inc:1.1 phpweb/include/errors.inc:1.2 --- phpweb/include/errors.inc:1.1 Sat Sep 6 05:14:58 2003 +++ phpweb/include/errors.inc Sat Sep 6 15:04:39 2003 @@ -1,5 +1,5 @@ <?php -// $Id: errors.inc,v 1.1 2003/09/06 09:14:58 goba Exp $ +// $Id: errors.inc,v 1.2 2003/09/06 19:04:39 goba Exp $ /* This script provides functions to print out @@ -10,10 +10,11 @@ // A 'good looking' 404 error message page function error_404() { + global $MYSITE; status_header(404); site_header('404 Not Found', array("noindex")); - echo "<h1>Not Found</h1>\n" . - "<p><strong>" . htmlspecialchars($_SERVER['REQUEST_URI']) . + echo "<h1>Not Found</h1>\n<p><strong>" . + htmlspecialchars(substr($MYSITE, 0, -1) . $_SERVER['REQUEST_URI']) . "</strong> not found on this server.</p>\n"; site_footer(); exit; @@ -22,11 +23,12 @@ // A 'good looking' 404 error message page for manual pages function error_404_manual() { + global $MYSITE; status_header(404); site_header('404 Not Found', array("noindex")); echo "<h1>Not Found</h1>\n" . "<p>The manual page you are looking for (<strong>" . - htmlspecialchars($_SERVER['REQUEST_URI']) . + htmlspecialchars(substr($MYSITE, 0, -1) . $_SERVER['REQUEST_URI']) . "</strong>) is not available on this server right now. " . "Please check back later, or if the problem persist, " . "<a href=\"/copyright.php#contact\">contact the webmasters</a>.</p>\n"; @@ -37,10 +39,11 @@ // This service is not working right now function error_noservice() { + global $MYSITE; site_header('Service not working', array("noindex")); echo "<h1>Service not working</h1>\n" . "<p>The service you tried to access with the URL: <strong>" . - htmlspecialchars($_SERVER['REQUEST_URI']) . + htmlspecialchars(substr($MYSITE, 0, -1) . $_SERVER['REQUEST_URI']) . "</strong> is not available on this server right now. " . "Please check back later, or if the problem persist, " . "<a href=\"/copyright.php#contact\">contact the webmasters</a>.</p>\n";

« previous php.mirrors (#20860) next »