6 ** Copyright (c) 1999-2001 The SquirrelMail Development Team
7 ** Licensed under the GNU GPL. For full terms see the file COPYING.
12 if (defined ('validate_php')) { return; }
13 define ('validate_php', true);
16 require_once('../functions/i18n.php');
17 require_once('../functions/auth.php');
18 require_once('../functions/strings.php');
22 /* Remove all slashes for form values. */
23 if (get_magic_quotes_gpc()) {
24 global $REQUEST_METHOD;
26 if ($REQUEST_METHOD == "POST") {
27 global $HTTP_POST_VARS;
28 RemoveSlashes($HTTP_POST_VARS);
29 } else if ($REQUEST_METHOD == "GET") {
30 global $HTTP_GET_VARS;
31 RemoveSlashes($HTTP_GET_VARS);
38 * if $send (the form button's name) contains "\n" as the first char
39 * and the script is compose.php, then trim everything. Otherwise, we
40 * don't have to worry.
42 * This is for a RedHat package bug and a Konqueror (pre 2.1.1?) bug
44 global $send, $PHP_SELF;
46 && (substr($send, 0, 1) == "\n")
47 && (substr($PHP_SELF, -12) == '/compose.php')) {
48 if ($REQUEST_METHOD == "POST") {
49 global $HTTP_POST_VARS;
50 TrimArray($HTTP_POST_VARS);
52 global $HTTP_GET_VARS;
53 TrimArray($HTTP_GET_VARS);
58 * Everyone needs stuff from config, and config needs stuff from
59 * strings.php, so include them both here. Actually, strings is
60 * included at the top now as the string array functions have
63 * Include them down here instead of at the top so that all config
64 * variables overwrite any passed in variables (for security).
66 require_once('../config/config.php');
67 require_once('../src/load_prefs.php');
68 require_once('../functions/page_header.php');
69 require_once('../functions/prefs.php');
71 /* Set up the language (i18n.php was included by auth.php). */
72 global $username, $data_dir;
73 set_up_language(getPref($data_dir, $username, 'language'));