6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
14 require_once('../functions/i18n.php');
15 require_once('../functions/auth.php');
16 require_once('../functions/strings.php');
20 /* Remove all slashes for form values. */
21 if (get_magic_quotes_gpc()) {
22 global $REQUEST_METHOD;
24 if ($REQUEST_METHOD == 'POST') {
25 global $HTTP_POST_VARS;
26 RemoveSlashes($HTTP_POST_VARS);
27 } else if ($REQUEST_METHOD == 'GET') {
28 global $HTTP_GET_VARS;
29 RemoveSlashes($HTTP_GET_VARS);
36 * if $send (the form button's name) contains "\n" as the first char
37 * and the script is compose.php, then trim everything. Otherwise, we
38 * don't have to worry.
40 * This is for a RedHat package bug and a Konqueror (pre 2.1.1?) bug
42 global $send, $PHP_SELF;
44 && (substr($send, 0, 1) == "\n")
45 && (substr($PHP_SELF, -12) == '/compose.php')) {
46 if ($REQUEST_METHOD == 'POST') {
47 global $HTTP_POST_VARS;
48 TrimArray($HTTP_POST_VARS);
50 global $HTTP_GET_VARS;
51 TrimArray($HTTP_GET_VARS);
56 * Everyone needs stuff from config, and config needs stuff from
57 * strings.php, so include them both here. Actually, strings is
58 * included at the top now as the string array functions have
61 * Include them down here instead of at the top so that all config
62 * variables overwrite any passed in variables (for security).
64 require_once('../config/config.php');
65 require_once('../src/load_prefs.php');
66 require_once('../functions/page_header.php');
67 require_once('../functions/prefs.php');
69 /* Set up the language (i18n.php was included by auth.php). */
70 global $username, $data_dir;
71 set_up_language(getPref($data_dir, $username, 'language'));