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