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