From 09d92a37447e54c61f74d377d473b2988865e107 Mon Sep 17 00:00:00 2001 From: mrpete Date: Sun, 4 Mar 2007 21:49:06 +0000 Subject: [PATCH] Support debug of errors, and unknown error handling --- error.php | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/error.php b/error.php index 1aa46eb7b..5675523bc 100644 --- a/error.php +++ b/error.php @@ -11,18 +11,25 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/error.php,v $ -| $Revision: 1.2 $ -| $Date: 2006-12-07 17:20:13 $ -| $Author: sweetas $ +| $Revision: 1.3 $ +| $Date: 2007-03-04 21:49:06 $ +| $Author: mrpete $ +----------------------------------------------------------------------------+ */ require_once("class2.php"); - if(!e_QUERY || (e_QUERY != 401 && e_QUERY != 403 && e_QUERY != 404 && e_QUERY != 500)) { - echo "\n"; - header("location: ".e_HTTP."index.php"); - exit; + if (E107_DEBUG_LEVEL) + { + echo LAN_ERROR_33."
\n";
+		print_r($_SERVER);
+		print_r($_REQUEST);
+		echo "\n
\n"; + } else { + echo "\n"; + header("location: ".e_HTTP."index.php"); + exit; + } } require_once(HEADERF); @@ -36,13 +43,12 @@ switch(e_QUERY) { $text = "
Error Icon ".LAN_ERROR_1."

".LAN_ERROR_2."

".LAN_ERROR_3."

".LAN_ERROR_2."".LAN_ERROR_20."
"; break; + case 403: header("HTTP/1.1 403 Forbidden"); $text = "
Error Icon ".LAN_ERROR_4."

".LAN_ERROR_5."

".LAN_ERROR_6."

".LAN_ERROR_2."".LAN_ERROR_20."
"; break; - default: - case 404: header("HTTP/1.1 404 Not Found"); @@ -54,10 +60,8 @@ switch(e_QUERY) { $text .= "
".LAN_ERROR_20."
"; $text .= "".LAN_ERROR_22."

"; - break; - case 500: header("HTTP/1.1 500 Internal Server Error"); $text = "
Error Icon ".LAN_ERROR_10."

".LAN_ERROR_11."

".LAN_ERROR_12."
@@ -65,6 +69,10 @@ switch(e_QUERY) { break; $text = "
".LAN_ERROR_13." (".$_SERVER['QUERY_STRING'].")

".LAN_ERROR_14."

".LAN_ERROR_15."

".LAN_ERROR_2."".LAN_ERROR_20."
"; + + default: + $text = LAN_ERROR_34." e_QUERY = '".e_QUERY."'
".LAN_ERROR_20.""; + break; } $ns->tablerender(PAGE_NAME, $text);