- if (($left_size == 300))
- echo "<option value=300 selected>300 pixels\n";
- else
- echo "<option value=300>300 pixels\n";
-
- echo " </select>";
- echo " </td>";
- echo " </TR>";
-
-
- // LEFT_REFRESH
- echo " <TR>";
- echo " <TD WIDTH=60% ALIGN=RIGHT>";
- echo _("Time between auto refresh of folder list:");
- echo " </TD>";
- echo " <TD WIDTH=40% ALIGN=LEFT>";
- echo " <SELECT name=leftrefresh>";
- if (($left_refresh == "None") || ($left_refresh == ""))
- echo " <OPTION VALUE=None SELECTED>None";
- else
- echo " <OPTION VALUE=None>None";
-
- if (($left_refresh == "10"))
- echo " <OPTION VALUE=10 SELECTED>10 Seconds";
- else
- echo " <OPTION VALUE=10>10 Seconds";
-
- if (($left_refresh == "20"))
- echo " <OPTION VALUE=20 SELECTED>20 Seconds";
- else
- echo " <OPTION VALUE=20>20 Seconds";
-
- if (($left_refresh == "30"))
- echo " <OPTION VALUE=30 SELECTED>30 Seconds";
- else
- echo " <OPTION VALUE=30>30 Seconds";
-
- if (($left_refresh == "60"))
- echo " <OPTION VALUE=60 SELECTED>1 Minute";
- else
- echo " <OPTION VALUE=60>1 Minute";
-
- if (($left_refresh == "120"))
- echo " <OPTION VALUE=120 SELECTED>2 Minutes";
- else
- echo " <OPTION VALUE=120>2 Minutes";
-
- if (($left_refresh == "180"))
- echo " <OPTION VALUE=180 SELECTED>3 Minutes";
- else
- echo " <OPTION VALUE=180>3 Minutes";
-
- if (($left_refresh == "240"))
- echo " <OPTION VALUE=240 SELECTED>4 Minutes";
- else
- echo " <OPTION VALUE=240>4 Minutes";
-
- if (($left_refresh == "300"))
- echo " <OPTION VALUE=300 SELECTED>5 Minutes";
- else
- echo " <OPTION VALUE=300>5 Minutes";
-
- if (($left_refresh == "420"))
- echo " <OPTION VALUE=420 SELECTED>7 Minutes";
- else
- echo " <OPTION VALUE=420>7 Minutes";
-
- if (($left_refresh == "600"))
- echo " <OPTION VALUE=600 SELECTED>10 Minutes";
- else
- echo " <OPTION VALUE=600>10 Minutes";
-
- if (($left_refresh == "720"))
- echo " <OPTION VALUE=720 SELECTED>12 Minutes";
- else
- echo " <OPTION VALUE=720>12 Minutes";
-
- if (($left_refresh == "900"))
- echo " <OPTION VALUE=900 SELECTED>15 Minutes";
- else
- echo " <OPTION VALUE=900>15 Minutes";
-
- if (($left_refresh == "1200"))
- echo " <OPTION VALUE=1200 SELECTED>20 Minutes";
- else
- echo " <OPTION VALUE=1200>20 Minutes";
-
- if (($left_refresh == "1500"))
- echo " <OPTION VALUE=1500 SELECTED>25 Minutes";
- else
- echo " <OPTION VALUE=1500>25 Minutes";
-
- if (($left_refresh == "1800"))
- echo " <OPTION VALUE=1800 SELECTED>30 Minutes";
- else
- echo " <OPTION VALUE=1800>30 Minutes";
+ echo '<br><b>'._("Successfully saved personal information!").'</b><br>';
+ } else if (isset($submit_display)) {
+ // Do checking to make sure $chosentheme is in the array
+ $in_ary = false;
+ for ($i=0; $i < count($theme); $i++)
+ {
+ if ($theme[$i]['PATH'] == $chosentheme)
+ {
+ $in_ary = true;
+ break;
+ }
+ }
+ if (! $in_ary)
+ $chosentheme = '';
+
+ # Save display preferences
+ setPref($data_dir, $username, 'chosen_theme', $chosentheme);
+ setPref($data_dir, $username, 'language', $language);
+ setPref($data_dir, $username, 'use_javascript_addr_book', $javascript_abook);
+ setPref($data_dir, $username, 'show_num', $shownum);
+ setPref($data_dir, $username, 'wrap_at', $wrapat);
+ setPref($data_dir, $username, 'editor_size', $editorsize);
+ setPref($data_dir, $username, 'left_refresh', $leftrefresh);
+ setPref($data_dir, $username, 'location_of_bar', $folder_new_location);
+ setPref($data_dir, $username, 'location_of_buttons', $button_new_location);
+ setPref($data_dir, $username, 'left_size', $leftsize);
+
+ if (isset($altIndexColors) && $altIndexColors == 1) {
+ setPref($data_dir, $username, 'alt_index_colors', 1);
+ } else {
+ setPref($data_dir, $username, 'alt_index_colors', 0);
+ }
+
+ if (isset($showhtmldefault)) {
+ setPref($data_dir, $username, 'show_html_default', 1);
+ } else {
+ removePref($data_dir, $username, 'show_html_default');
+ }
+
+ if (isset($includeselfreplyall)) {
+ setPref($data_dir, $username, 'include_self_reply_all', 1);
+ } else {
+ removePref($data_dir, $username, 'include_self_reply_all');
+ }
+
+ if (isset($pageselector)) {
+ setPref($data_dir, $username, 'page_selector', 1);
+ } else {
+ removePref($data_dir, $username, 'page_selector');
+ }
+
+ do_hook('options_display_save');
+
+ echo '<br><b>'._("Successfully saved display preferences!").'</b><br>';
+ echo '<a href="../src/webmail.php?right_frame=options.php" target=_top>' . _("Refresh Page") . '</a><br>';
+ } else if (isset($submit_folder)) {
+ # Save folder preferences
+ if ($trash != 'none') {
+ setPref($data_dir, $username, 'move_to_trash', true);
+ setPref($data_dir, $username, 'trash_folder', $trash);
+ } else {
+ setPref($data_dir, $username, 'move_to_trash', '0');
+ setPref($data_dir, $username, 'trash_folder', 'none');
+ }
+ if ($sent != 'none') {
+ setPref($data_dir, $username, 'move_to_sent', true);
+ setPref($data_dir, $username, 'sent_folder', $sent);
+ } else {
+ setPref($data_dir, $username, 'move_to_sent', '0');
+ setPref($data_dir, $username, 'sent_folder', 'none');
+ }
+ if (isset($folderprefix)) {
+ setPref($data_dir, $username, 'folder_prefix', $folderprefix);
+ } else {
+ setPref($data_dir, $username, 'folder_prefix', '');
+ }
+ setPref($data_dir, $username, 'unseen_notify', $unseennotify);
+ setPref($data_dir, $username, 'unseen_type', $unseentype);
+ if (isset($collapsefolders))
+ setPref($data_dir, $username, 'collapse_folders', $collapsefolders);
+ else
+ removePref($data_dir, $username, 'collapse_folders');
+ do_hook('options_folders_save');
+ echo '<br><b>'._("Successfully saved folder preferences!").'</b><br>';
+ echo '<a href="../src/left_main.php" target=left>' . _("Refresh Folder List") . '</a><br>';
+ } else {
+ do_hook('options_save');
+ }