59177427 |
1 | <?php |
ef870322 |
2 | /** |
3 | ** options_submit.php |
4 | ** |
5 | ** Copyright (c) 1999-2000 The SquirrelMail development team |
6 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
7 | ** |
8 | ** This script saves all the options to the proper file when the |
9 | ** submit button is pressed. Also displays conformation message. |
10 | **/ |
11 | |
12 | |
2a32fc83 |
13 | session_start(); |
14 | |
d068c0ec |
15 | if (!isset($config_php)) |
16 | include("../config/config.php"); |
17 | if (!isset($strings_php)) |
18 | include("../functions/strings.php"); |
19 | if (!isset($page_header_php)) |
20 | include("../functions/page_header.php"); |
21 | if (!isset($dipslay_messages_php)) |
22 | include("../functions/display_messages.php"); |
d068c0ec |
23 | if (!isset($array_php)) |
24 | include("../functions/array.php"); |
f33d2f92 |
25 | if (!isset($auth_php)) |
26 | include ("../functions/auth.php"); |
d3cdb279 |
27 | |
28 | include("../src/load_prefs.php"); |
99259b46 |
29 | |
f33d2f92 |
30 | is_logged_in(); |
99259b46 |
31 | |
ebc15534 |
32 | setPref($data_dir, $username, "full_name", stripslashes($full_name)); |
f3585c1a |
33 | setPref($data_dir, $username, "email_address", stripslashes($email_address)); |
ebc15534 |
34 | setPref($data_dir, $username, "reply_to", stripslashes($reply_to)); |
d0747e26 |
35 | setPref($data_dir, $username, "chosen_theme", $chosentheme); |
9c83f905 |
36 | setPref($data_dir, $username, "show_num", $shownum); |
11307a4c |
37 | setPref($data_dir, $username, "wrap_at", $wrapat); |
38 | setPref($data_dir, $username, "editor_size", $editorsize); |
f804972b |
39 | setPref($data_dir, $username, "use_signature", $usesignature); |
469eb37b |
40 | setPref($data_dir, $username, "left_refresh", $leftrefresh); |
d30d79f2 |
41 | setPref($data_dir, $username, "language", $language); |
2848c630 |
42 | setPref($data_dir, $username, "left_size", $leftsize); |
37df47f5 |
43 | setPref($data_dir, $username, "folder_prefix", $folderprefix); |
3806fa52 |
44 | setPref($data_dir, $username, "use_javascript_addr_book", $javascript_abook); |
1e0628fb |
45 | |
46 | if ($trash != "none") { |
47 | setPref($data_dir, $username, "move_to_trash", true); |
48 | setPref($data_dir, $username, "trash_folder", $trash); |
49 | } else { |
50 | setPref($data_dir, $username, "move_to_trash", false); |
51 | setPref($data_dir, $username, "trash_folder", ""); |
52 | } |
53 | |
54 | if ($sent != "none") { |
55 | setPref($data_dir, $username, "move_to_sent", true); |
56 | setPref($data_dir, $username, "sent_folder", $sent); |
57 | } else { |
58 | setPref($data_dir, $username, "move_to_sent", false); |
59 | setPref($data_dir, $username, "sent_folder", ""); |
60 | } |
9c83f905 |
61 | |
4bfed9f3 |
62 | setSig($data_dir, $username, stripslashes($signature_edit)); |
99259b46 |
63 | |
9f2215a1 |
64 | setcookie("squirrelmail_language", $language, time()+2592000); |
71fd5383 |
65 | $squirrelmail_language = $language; |
288491a4 |
66 | |
8b673ac1 |
67 | displayPageHeader($color, "None"); |
a6668eb2 |
68 | echo "<BR><BR><BR><CENTER><B>"; |
69 | echo _("Options Saved!"); |
70 | echo "</B><BR><BR>"; |
71 | echo _("Your options have been saved."); |
9f2215a1 |
72 | echo "<BR><A HREF=\"webmail.php\" TARGET=_top>"; |
a6668eb2 |
73 | echo _("Click here"); |
bd8bf491 |
74 | echo "</A> "; |
a6668eb2 |
75 | echo _("to continue."); |
aae41ae9 |
76 | echo "</CENTER>"; |
99259b46 |
77 | echo "</BODY></HTML>"; |
a6668eb2 |
78 | ?> |