| 1 | <?php |
| 2 | /** |
| 3 | ** options_folder.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 all options relating to folders |
| 9 | ** |
| 10 | **/ |
| 11 | |
| 12 | session_start(); |
| 13 | |
| 14 | if (!isset($config_php)) |
| 15 | include("../config/config.php"); |
| 16 | if (!isset($strings_php)) |
| 17 | include("../functions/strings.php"); |
| 18 | if (!isset($page_header_php)) |
| 19 | include("../functions/page_header.php"); |
| 20 | if (!isset($display_messages_php)) |
| 21 | include("../functions/display_messages.php"); |
| 22 | if (!isset($imap_php)) |
| 23 | include("../functions/imap.php"); |
| 24 | if (!isset($array_php)) |
| 25 | include("../functions/array.php"); |
| 26 | if (!isset($i18n_php)) |
| 27 | include("../functions/i18n.php"); |
| 28 | if (!isset($plugin_php)) |
| 29 | include("../functions/plugin.php"); |
| 30 | |
| 31 | include("../src/load_prefs.php"); |
| 32 | displayPageHeader($color, "None"); |
| 33 | |
| 34 | $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); |
| 35 | $boxes = sqimap_mailbox_list($imapConnection, $boxes); |
| 36 | sqimap_logout($imapConnection); |
| 37 | ?> |
| 38 | <br> |
| 39 | <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>"> |
| 40 | <center><b><?php echo _("Options") . " - " . _("Folder Preferences"); ?></b></center> |
| 41 | </td></tr></table> |
| 42 | |
| 43 | <form name=f action="options.php" method=post> |
| 44 | <table width=100% cellpadding=0 cellspacing=2 border=0> |
| 45 | |
| 46 | <?php if ($show_prefix_option == true) { ?> |
| 47 | <tr> |
| 48 | <td align=right nowrap><?php echo _("Folder Path"); ?>: |
| 49 | </td><td> |
| 50 | <?php if (isset ($folder_prefix)) |
| 51 | echo " <input type=text name=folderprefix value=\"$folder_prefix\" size=35><br>"; |
| 52 | else |
| 53 | echo " <input type=text name=folderprefix value=\"$default_folder_prefix\" size=35><br>"; |
| 54 | ?> |
| 55 | </td> |
| 56 | </tr> |
| 57 | <?php } |
| 58 | |
| 59 | // TRASH FOLDER |
| 60 | echo "<tr><td nowrap align=right>"; |
| 61 | echo _("Trash Folder:"); |
| 62 | echo "</td><td>"; |
| 63 | echo "<TT><SELECT NAME=trash>\n"; |
| 64 | if ($move_to_trash == true) |
| 65 | echo "<option value=none>" . _("Don't use Trash"); |
| 66 | else |
| 67 | echo "<option value=none selected>" . _("Do not use Trash"); |
| 68 | |
| 69 | for ($i = 0; $i < count($boxes); $i++) { |
| 70 | $use_folder = true; |
| 71 | if (strtolower($boxes[$i]["unformatted"]) == "inbox") { |
| 72 | $use_folder = false; |
| 73 | } |
| 74 | if ($use_folder == true) { |
| 75 | $box = $boxes[$i]["unformatted-dm"]; |
| 76 | $box2 = replace_spaces($boxes[$i]["formatted"]); |
| 77 | if (($boxes[$i]["unformatted"] == $trash_folder) && ($move_to_trash == true)) |
| 78 | echo " <OPTION SELECTED VALUE=\"$box\">$box2\n"; |
| 79 | else |
| 80 | echo " <OPTION VALUE=\"$box\">$box2\n"; |
| 81 | } |
| 82 | } |
| 83 | echo "</SELECT></TT>\n"; |
| 84 | echo "</td></tr>"; |
| 85 | |
| 86 | |
| 87 | // SENT FOLDER |
| 88 | echo "<tr><td nowrap align=right>"; |
| 89 | echo _("Sent Folder:"); |
| 90 | echo "</td><td>"; |
| 91 | echo "<TT><SELECT NAME=sent>\n"; |
| 92 | if ($move_to_sent == true) |
| 93 | echo "<option value=none>" . _("Don't use Sent"); |
| 94 | else |
| 95 | echo "<option value=none selected>" . _("Do not use Sent"); |
| 96 | |
| 97 | for ($i = 0; $i < count($boxes); $i++) { |
| 98 | $use_folder = true; |
| 99 | if (strtolower($boxes[$i]["unformatted"]) == "inbox") { |
| 100 | $use_folder = false; |
| 101 | } |
| 102 | if ($use_folder == true) { |
| 103 | $box = $boxes[$i]["unformatted-dm"]; |
| 104 | $box2 = replace_spaces($boxes[$i]["formatted"]); |
| 105 | if (($boxes[$i]["unformatted"] == $sent_folder) && ($move_to_sent == true)) |
| 106 | echo " <OPTION SELECTED VALUE=\"$box\">$box2\n"; |
| 107 | else |
| 108 | echo " <OPTION VALUE=\"$box\">$box2\n"; |
| 109 | } |
| 110 | } |
| 111 | echo "</SELECT></TT>\n"; |
| 112 | echo "</td></tr>"; |
| 113 | ?> |
| 114 | <tr> |
| 115 | <td valign=top align=right> |
| 116 | <br> |
| 117 | <?php echo _("Unseen message notification"); ?>: |
| 118 | </td> |
| 119 | <td> |
| 120 | <input type=radio name=unseennotify value=1<?php if ($unseen_notify == 1) echo " checked"; ?>> <?php echo _("No notification") ?><br> |
| 121 | <input type=radio name=unseennotify value=2<?php if ($unseen_notify != 1 && $unseen_notify != 3) echo " checked"; ?>> <?php echo _("Only INBOX") ?><br> |
| 122 | <input type=radio name=unseennotify value=3<?php if ($unseen_notify == 3) echo " checked"; ?>> <?php echo _("All Folders") ?><br> |
| 123 | <br> |
| 124 | </td> |
| 125 | </tr> |
| 126 | <tr> |
| 127 | <td valign=top align=right> |
| 128 | <br> |
| 129 | <?php echo _("Unseen message notification type"); ?>: |
| 130 | </td> |
| 131 | <td> |
| 132 | <input type=radio name=unseentype value=1<?php if ($unseen_type < 2 || $unseen_type > 2) echo " checked"; ?>> <?php echo _("Only unseen"); ?> - (4)<br> |
| 133 | <input type=radio name=unseentype value=2<?php if ($unseen_type == 2) echo " checked"; ?>> <?php echo _("Unseen and Total"); ?> - (4/27) |
| 134 | </td> |
| 135 | </tr> |
| 136 | <?php do_hook("options_folders_inside"); ?> |
| 137 | <tr> |
| 138 | <td> |
| 139 | </td><td> |
| 140 | <input type="submit" value="<?php echo _("Submit"); ?>" name="submit_folder"> |
| 141 | </td> |
| 142 | </tr> |
| 143 | </table> |
| 144 | </form> |
| 145 | <?php do_hook("options_folders_bottom"); ?> |
| 146 | </body></html> |