7eca643019ee4beee8df397d590a7a7407655df8
6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
12 /* include the mime class before the session start ! otherwise we can't store
13 * messages with a session_register.
16 require_once('../class/mime.class.php');
20 require_once('../functions/i18n.php');
21 require_once('../functions/auth.php');
22 require_once('../functions/strings.php');
23 require_once('../functions/prefs.php');
27 /* Remove all slashes for form values. */
28 if (get_magic_quotes_gpc()) {
29 global $REQUEST_METHOD;
31 if ($REQUEST_METHOD == 'POST') {
32 global $HTTP_POST_VARS;
33 RemoveSlashes($HTTP_POST_VARS);
34 } else if ($REQUEST_METHOD == 'GET') {
35 global $HTTP_GET_VARS;
36 RemoveSlashes($HTTP_GET_VARS);
43 * if $send (the form button's name) contains "\n" as the first char
44 * and the script is compose.php, then trim everything. Otherwise, we
45 * don't have to worry.
47 * This is for a RedHat package bug and a Konqueror (pre 2.1.1?) bug
49 global $send, $PHP_SELF;
51 && (substr($send, 0, 1) == "\n")
52 && (substr($PHP_SELF, -12) == '/compose.php')) {
53 if ($REQUEST_METHOD == 'POST') {
54 global $HTTP_POST_VARS;
55 TrimArray($HTTP_POST_VARS);
57 global $HTTP_GET_VARS;
58 TrimArray($HTTP_GET_VARS);
63 * Everyone needs stuff from config, and config needs stuff from
64 * strings.php, so include them both here. Actually, strings is
65 * included at the top now as the string array functions have
68 * Include them down here instead of at the top so that all config
69 * variables overwrite any passed in variables (for security).
73 * Reset the $theme() array in case a value was passed via a cookie.
74 * This is until theming is rewritten.
80 require_once('../config/config.php');
81 require_once('../src/load_prefs.php');
82 require_once('../functions/page_header.php');
84 /* Set up the language (i18n.php was included by auth.php). */
85 global $username, $data_dir;
86 set_up_language(getPref($data_dir, $username, 'language'));
88 $timeZone = getPref($data_dir, $username, 'timezone');
89 if ( $timeZone != SMPREF_NONE
&& ($timeZone <> '')
90 && !ini_get( 'safe_mode')) {
91 putenv('TZ=' . $timeZone);