4 +-----------------------------------------------------------------------+
5 | program/steps/error.inc |
7 | This file is part of the RoundCube Webmail client |
8 | Copyright (C) 2005, RoundCube Dev. - Switzerland |
9 | Licensed under the GNU GPL |
12 | Display error message page |
14 +-----------------------------------------------------------------------+
15 | Author: Thomas Bruederli <roundcube@gmail.com> |
16 +-----------------------------------------------------------------------+
18 $Id: error.inc 50 2005-10-21 12:12:23Z roundcube $
23 // browser is not compatible with this application
26 $user_agent = $GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT'];
27 $__error_title = 'Your browser does not suit the requirements for this application';
28 $__error_text = <<<EOF
29 <i>Supported browsers:</i><br />
30 » Netscape 7+<br />
31 » Microsoft Internet Explorer 6+<br />
32 » Mozilla Firefox 1.0+<br />
33 » Opera 8.0+<br />
34 » Safari 1.2+<br />
36 » JavaScript enabled<br />
37 » Support for XMLHTTPRequest<br />
39 <p><i>Your configuration:</i><br />
44 // authorization error
45 else if ($ERROR_CODE==401)
47 $__error_title = "AUTHORIZATION FAILED";
48 $__error_text = "Could not verify that you are authorized to access this service!<br />\n".
49 "Please contact your server-administrator.";
52 // failed request (wrong step in URL)
53 else if ($ERROR_CODE==404)
55 $__error_title = "REQUEST FAILED/FILE NOT FOUND";
56 $request_url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
57 $__error_text = <<<EOF
58 The requested page was not found!<br />
59 Please contact your server-administrator.
61 <p><i>Failed request:</i><br />
62 http://$request_url</p>
70 $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!";
71 $__error_text = "Please contact your server-administrator.";
73 if (($CONFIG['debug_level'] & 4) && $ERROR_MESSAGE)
74 $__error_text = $ERROR_MESSAGE;
76 $__error_text = 'Error No. '.dechex($ERROR_CODE).')';
80 // compose page content
82 $__page_content = <<<EOF
84 <h3 class="error-title">$__error_title</h3>
85 <p class="error-text">$__error_text</p>
91 if (template_exists('error'))
93 $OUTPUT->scripts = array();
94 $OUTPUT->script_files = array();
95 parse_template('error');
99 // print system error page
101 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
102 <html xmlns="http://www.w3.org/1999/xhtml"><head>
103 <title>RoundCube|Mail : ERROR $ERROR_CODE</title>
104 <link rel="stylesheet" type="text/css" href="program/style.css" />
108 <table border="0" cellsapcing="0" cellpadding="0" width="100%" height="80%"><tr><td align="center">