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