59177427 |
1 | <?php |
ef870322 |
2 | /** |
3 | ** options.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 | ** Displays the options page. Pulls from proper user preference files |
9 | ** and config.php. Displays preferences as selected and other options. |
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($display_messages_php)) |
22 | include("../functions/display_messages.php"); |
23 | if (!isset($imap_php)) |
24 | include("../functions/imap.php"); |
25 | if (!isset($array_php)) |
26 | include("../functions/array.php"); |
d30d79f2 |
27 | if (!isset($i18n_php)) |
28 | include("../functions/i18n.php"); |
c36ed9cf |
29 | if (!isset($auth_php)) |
30 | include ("../functions/auth.php"); |
d3cdb279 |
31 | |
c36ed9cf |
32 | if ($language) { |
33 | setcookie("squirrelmail_language", $language, time()+2592000); |
34 | $squirrelmail_language = $language; |
37df47f5 |
35 | } |
1e0628fb |
36 | |
c36ed9cf |
37 | include("../src/load_prefs.php"); |
38 | displayPageHeader($color, "None"); |
39 | is_logged_in(); |
40 | ?> |
11307a4c |
41 | |
c36ed9cf |
42 | <table width=100% cellpadding=2 cellspacing=2 border=0> |
43 | <tr><td bgcolor="<? echo $color[0] ?>"> |
44 | <center><b><? echo _("Options") ?></b></center> |
45 | </td></tr></table> |
46 | <br> |
47 | |
48 | <? |
49 | if ($submit_personal) { |
50 | # Save personal information |
51 | if (isset($full_name)) setPref($data_dir, $username, "full_name", stripslashes($full_name)); |
52 | if (isset($email_address)) setPref($data_dir, $username, "email_address", stripslashes($email_address)); |
53 | if (isset($reply_to)) setPref($data_dir, $username, "reply_to", stripslashes($reply_to)); |
54 | setPref($data_dir, $username, "use_signature", stripslashes($usesignature)); |
55 | if (isset($signature_edit)) setSig($data_dir, $username, stripslashes($signature_edit)); |
2848c630 |
56 | |
c36ed9cf |
57 | echo "<center><b>"._("Successfully saved personal information!")."</b></center><br>"; |
58 | } else if ($submit_display) { |
59 | # Save display preferences |
60 | setPref($data_dir, $username, "chosen_theme", $chosentheme); |
61 | setPref($data_dir, $username, "show_num", $shownum); |
62 | setPref($data_dir, $username, "wrap_at", $wrapat); |
63 | setPref($data_dir, $username, "editor_size", $editorsize); |
64 | setPref($data_dir, $username, "left_refresh", $leftrefresh); |
65 | setPref($data_dir, $username, "language", $language); |
66 | setPref($data_dir, $username, "left_size", $leftsize); |
67 | setPref($data_dir, $username, "use_javascript_addr_book", $javascript_abook); |
68 | |
69 | echo "<center><b>"._("Successfully saved display preferences!")."</b><br>"; |
70 | echo "<a href=\"webmail.php?right_frame=options.php\" target=_top>"._("Refresh Page")."</a></center><br>"; |
71 | } else if ($submit_folder) { |
72 | # Save folder preferences |
73 | if ($trash != "none") { |
74 | setPref($data_dir, $username, "move_to_trash", true); |
75 | setPref($data_dir, $username, "trash_folder", $trash); |
76 | } else { |
77 | setPref($data_dir, $username, "move_to_trash", false); |
78 | setPref($data_dir, $username, "trash_folder", ""); |
9d157cec |
79 | } |
c36ed9cf |
80 | if ($sent != "none") { |
81 | setPref($data_dir, $username, "move_to_sent", true); |
82 | setPref($data_dir, $username, "sent_folder", $sent); |
83 | } else { |
84 | setPref($data_dir, $username, "move_to_sent", false); |
85 | setPref($data_dir, $username, "sent_folder", ""); |
86 | } |
87 | setPref($data_dir, $username, "folder_prefix", $folderprefix); |
88 | echo "<center><b>"._("Successfully saved folder preferences!")."</b><br>"; |
89 | echo "<a href=\"left_main.php\" target=left>"._("Refresh Folders")."</a></center><br>"; |
9d157cec |
90 | } |
c36ed9cf |
91 | ?> |
11307a4c |
92 | |
65b14f90 |
93 | |
c36ed9cf |
94 | <table width=90% cellpadding=0 cellspacing=10 border=0 align=center> |
95 | <tr> |
96 | <td valign=top> |
97 | <table width=100% cellpadding=3 cellspacing=0 border=0> |
98 | <tr> |
99 | <td bgcolor="<? echo $color[9] ?>"> |
100 | <a href="options_personal.php"><? echo _("Personal Information"); ?></a> |
101 | </td> |
102 | </tr> |
103 | <tr> |
104 | <td bgcolor="<? echo $color[0] ?>"> |
105 | <? echo _("This contains personal information about yourself such as your name, your email address, etc.") ?> |
106 | </td> |
107 | </tr> |
108 | </table><br> |
109 | <table width=100% cellpadding=3 cellspacing=0 border=0> |
110 | <tr> |
111 | <td bgcolor="<? echo $color[9] ?>"> |
112 | <a href="options_highlight.php"><? echo _("Message Highlighting"); ?></a> |
113 | </td> |
114 | </tr> |
115 | <tr> |
116 | <td bgcolor="<? echo $color[0] ?>"> |
117 | <? echo _("Based upon given criteria, incoming messages can have different background colors in the message list. This helps to easily distinguish who the messages are from, especially for mailing lists.") ?> |
118 | </td> |
119 | </tr> |
120 | </table><br> |
121 | </td> |
122 | <td valign=top> |
123 | <table width=100% cellpadding=3 cellspacing=0 border=0> |
124 | <tr> |
125 | <td bgcolor="<? echo $color[9] ?>"> |
126 | <a href="options_display.php"><? echo _("Display Preferences"); ?></a> |
127 | </td> |
128 | </tr> |
129 | <tr> |
130 | <td bgcolor="<? echo $color[0] ?>"> |
131 | <? echo _("You can change the way that SquirrelMail looks and displays information to you, such as the colors, the language, and other settings.") ?> |
132 | </td> |
133 | </tr> |
134 | </table><br> |
135 | <table width=100% cellpadding=3 cellspacing=0 border=0> |
136 | <tr> |
137 | <td bgcolor="<? echo $color[9] ?>"> |
138 | <a href="options_folder.php"><? echo _("Folder Preferences"); ?></a> |
139 | </td> |
140 | </tr> |
141 | <tr> |
142 | <td bgcolor="<? echo $color[0] ?>"> |
143 | <? echo _("These settings change the way your folders are displayed and manipulated.") ?> |
144 | </td> |
145 | </tr> |
146 | </table><br> |
147 | </td> |
148 | </tr> |
149 | </table> |
150 | <? |
a6668eb2 |
151 | ?> |
c36ed9cf |
152 | </body></html> |