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 | ** |
245a6892 |
11 | ** $Id$ |
ef870322 |
12 | **/ |
13 | |
f740c049 |
14 | include('../src/validate.php'); |
15 | include('../functions/strings.php'); |
16 | include('../config/config.php'); |
17 | include('../functions/page_header.php'); |
18 | include('../functions/display_messages.php'); |
19 | include('../functions/imap.php'); |
20 | include('../functions/array.php'); |
21 | include('../functions/i18n.php'); |
d3cdb279 |
22 | |
7aaa81fc |
23 | if (isset($language)) { |
db5910ac |
24 | setcookie('squirrelmail_language', $language, time()+2592000); |
c36ed9cf |
25 | $squirrelmail_language = $language; |
37df47f5 |
26 | } |
1e0628fb |
27 | |
db5910ac |
28 | include('../src/load_prefs.php'); |
29 | displayPageHeader($color, 'None'); |
f740c049 |
30 | |
c36ed9cf |
31 | ?> |
11307a4c |
32 | |
e9f8ea4e |
33 | <br> |
db5910ac |
34 | <table width="95%" align="center" cellpadding="2" cellspacing="2" border="0"> |
6170c5b6 |
35 | <tr><td bgcolor="<?php echo $color[0] ?>"> |
36 | <center><b><?php echo _("Options") ?></b></center> |
c36ed9cf |
37 | </td></tr></table> |
c36ed9cf |
38 | |
6170c5b6 |
39 | <?php |
245a6892 |
40 | if (isset($submit_personal)) { |
c36ed9cf |
41 | # Save personal information |
db5910ac |
42 | if (isset($full_name)) setPref($data_dir, $username, 'full_name', $full_name); |
43 | if (isset($email_address)) setPref($data_dir, $username, 'email_address', $email_address); |
31ac7db8 |
44 | if (isset($reply_to)) setPref($data_dir, $username, 'reply_to', $reply_to); |
f740c049 |
45 | setPref($data_dir, $username, 'use_signature', $usesignature); |
46 | if (! isset($prefixsig)) |
47 | $prefixsig = 0; |
48 | setPref($data_dir, $username, 'prefix_sig', $prefixsig); |
d51894be |
49 | if (isset($signature_edit)) setSig($data_dir, $username, $signature_edit); |
2848c630 |
50 | |
db5910ac |
51 | do_hook('options_personal_save'); |
ef3c69f0 |
52 | |
db5910ac |
53 | echo '<br><center><b>'._("Successfully saved personal information!").'</b></center><br>'; |
f740c049 |
54 | } else if (isset($submit_display)) { |
55 | // Do checking to make sure $chosentheme is in the array |
56 | $in_ary = false; |
57 | for ($i=0; $i < count($theme); $i++) |
58 | { |
59 | if ($theme[$i]['PATH'] == $chosentheme) |
60 | { |
61 | $in_ary = true; |
62 | break; |
63 | } |
64 | } |
65 | if (! $in_ary) |
66 | $chosentheme = ''; |
67 | |
c36ed9cf |
68 | # Save display preferences |
db5910ac |
69 | setPref($data_dir, $username, 'chosen_theme', $chosentheme); |
70 | setPref($data_dir, $username, 'show_num', $shownum); |
71 | setPref($data_dir, $username, 'wrap_at', $wrapat); |
72 | setPref($data_dir, $username, 'editor_size', $editorsize); |
73 | setPref($data_dir, $username, 'left_refresh', $leftrefresh); |
74 | setPref($data_dir, $username, 'language', $language); |
9a732bb6 |
75 | setPref($data_dir, $username, 'location_of_bar', $folder_new_location); |
441f2d33 |
76 | setPref($data_dir, $username, 'location_of_buttons', $button_new_location); |
db5910ac |
77 | setPref($data_dir, $username, 'left_size', $leftsize); |
78 | setPref($data_dir, $username, 'use_javascript_addr_book', $javascript_abook); |
e2ab93e5 |
79 | if (isset($showhtmldefault)) |
80 | setPref($data_dir, $username, 'show_html_default', 1); |
81 | else |
82 | removePref($data_dir, $username, 'show_html_default'); |
c36ed9cf |
83 | |
db5910ac |
84 | do_hook('options_display_save'); |
ef3c69f0 |
85 | |
db5910ac |
86 | echo '<br><center><b>'._("Successfully saved display preferences!").'</b><br>'; |
87 | echo '<a href="../src/webmail.php" target=_top>' . _("Refresh Page") . '</a></center><br>'; |
245a6892 |
88 | } else if (isset($submit_folder)) { |
c36ed9cf |
89 | # Save folder preferences |
db5910ac |
90 | if ($trash != 'none') { |
91 | setPref($data_dir, $username, 'move_to_trash', true); |
92 | setPref($data_dir, $username, 'trash_folder', $trash); |
c36ed9cf |
93 | } else { |
db5910ac |
94 | setPref($data_dir, $username, 'move_to_trash', '0'); |
95 | setPref($data_dir, $username, 'trash_folder', 'none'); |
9d157cec |
96 | } |
db5910ac |
97 | if ($sent != 'none') { |
98 | setPref($data_dir, $username, 'move_to_sent', true); |
99 | setPref($data_dir, $username, 'sent_folder', $sent); |
c36ed9cf |
100 | } else { |
db5910ac |
101 | setPref($data_dir, $username, 'move_to_sent', '0'); |
102 | setPref($data_dir, $username, 'sent_folder', 'none'); |
c36ed9cf |
103 | } |
f740c049 |
104 | setPref($data_dir, $username, 'folder_prefix', $folderprefix); |
db5910ac |
105 | setPref($data_dir, $username, 'unseen_notify', $unseennotify); |
106 | setPref($data_dir, $username, 'unseen_type', $unseentype); |
235a65d5 |
107 | if (isset($collapsefolders)) |
108 | setPref($data_dir, $username, 'collapse_folders', $collapsefolders); |
109 | else |
110 | removePref($data_dir, $username, 'collapse_folders'); |
db5910ac |
111 | do_hook('options_folders_save'); |
112 | echo '<br><center><b>'._("Successfully saved folder preferences!").'</b><br>'; |
113 | echo '<a href="../src/left_main.php" target=left>' . _("Refresh Folder List") . '</a></center><br>'; |
6b638171 |
114 | } else { |
db5910ac |
115 | do_hook('options_save'); |
9d157cec |
116 | } |
6b638171 |
117 | |
c36ed9cf |
118 | ?> |
11307a4c |
119 | |
65b14f90 |
120 | |
db5910ac |
121 | <table width="90%" cellpadding="0" cellspacing="10" border="0" align="center"> |
c36ed9cf |
122 | <tr> |
db5910ac |
123 | <td width="50%" valign="top"> |
124 | <table width="100%" cellpadding="3" cellspacing="0" border="0"> |
c36ed9cf |
125 | <tr> |
6170c5b6 |
126 | <td bgcolor="<?php echo $color[9] ?>"> |
127 | <a href="options_personal.php"><?php echo _("Personal Information"); ?></a> |
c36ed9cf |
128 | </td> |
129 | </tr> |
130 | <tr> |
6170c5b6 |
131 | <td bgcolor="<?php echo $color[0] ?>"> |
132 | <?php echo _("This contains personal information about yourself such as your name, your email address, etc.") ?> |
c36ed9cf |
133 | </td> |
134 | </tr> |
135 | </table><br> |
db5910ac |
136 | <table width="100%" cellpadding="3" cellspacing="0" border="0"> |
c36ed9cf |
137 | <tr> |
6170c5b6 |
138 | <td bgcolor="<?php echo $color[9] ?>"> |
139 | <a href="options_highlight.php"><?php echo _("Message Highlighting"); ?></a> |
c36ed9cf |
140 | </td> |
141 | </tr> |
142 | <tr> |
6170c5b6 |
143 | <td bgcolor="<?php echo $color[0] ?>"> |
144 | <?php 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.") ?> |
c36ed9cf |
145 | </td> |
146 | </tr> |
147 | </table><br> |
db5910ac |
148 | <table width="100%" cellpadding="3" cellspacing="0" border="0"> |
8e265988 |
149 | <tr> |
150 | <td bgcolor="<?php echo $color[9] ?>"> |
151 | <a href="options_order.php"><?php echo _("Index Order"); ?></a> |
152 | </td> |
153 | </tr> |
154 | <tr> |
155 | <td bgcolor="<?php echo $color[0] ?>"> |
156 | <?php echo _("The order of the message index can be rearanged and changed to contain the headers in any order you want.") ?> |
157 | </td> |
158 | </tr> |
159 | </table><br> |
c36ed9cf |
160 | </td> |
db5910ac |
161 | <td valign="top" width="50%"> |
162 | <table width="100%" cellpadding="3" cellspacing="0" border="0"> |
c36ed9cf |
163 | <tr> |
6170c5b6 |
164 | <td bgcolor="<?php echo $color[9] ?>"> |
165 | <a href="options_display.php"><?php echo _("Display Preferences"); ?></a> |
c36ed9cf |
166 | </td> |
167 | </tr> |
168 | <tr> |
6170c5b6 |
169 | <td bgcolor="<?php echo $color[0] ?>"> |
170 | <?php echo _("You can change the way that SquirrelMail looks and displays information to you, such as the colors, the language, and other settings.") ?> |
c36ed9cf |
171 | </td> |
172 | </tr> |
173 | </table><br> |
db5910ac |
174 | <table width="100%" cellpadding="3" cellspacing="0" border="0"> |
c36ed9cf |
175 | <tr> |
6170c5b6 |
176 | <td bgcolor="<?php echo $color[9] ?>"> |
177 | <a href="options_folder.php"><?php echo _("Folder Preferences"); ?></a> |
c36ed9cf |
178 | </td> |
179 | </tr> |
180 | <tr> |
6170c5b6 |
181 | <td bgcolor="<?php echo $color[0] ?>"> |
182 | <?php echo _("These settings change the way your folders are displayed and manipulated.") ?> |
c36ed9cf |
183 | </td> |
184 | </tr> |
185 | </table><br> |
186 | </td> |
187 | </tr> |
188 | </table> |
8442ac08 |
189 | <?php |
db5910ac |
190 | do_hook('options_link_and_description') |
6b638171 |
191 | ?> |
c36ed9cf |
192 | </body></html> |