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