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 | ** |
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 | |
29 | include("../src/load_prefs.php"); |
30 | displayPageHeader($color, "None"); |
31 | |
32 | $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); |
33 | $boxes = sqimap_mailbox_list($imapConnection, $boxes); |
1195c340 |
34 | sqimap_logout($imapConnection); |
c36ed9cf |
35 | ?> |
e9f8ea4e |
36 | <br> |
37 | <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>"> |
c36ed9cf |
38 | <center><b><? echo _("Options") . " - " . _("Folder Preferences"); ?></b></center> |
39 | </td></tr></table> |
40 | |
41 | <form action="options.php" method=post> |
42 | <table width=100% cellpadding=0 cellspacing=2 border=0> |
43 | |
44 | <? if ($show_prefix_option == true) { ?> |
45 | <tr> |
46 | <td align=right nowrap><? echo _("Folder Path"); ?>: |
47 | </td><td> |
48 | <? if (isset ($folder_prefix)) |
49 | echo " <input type=text name=folderprefix value=\"$folder_prefix\" size=50><br>"; |
50 | else |
51 | echo " <input type=text name=folderprefix value=\"$default_folder_prefix\" size=50><br>"; |
52 | ?> |
53 | </td> |
54 | </tr> |
55 | <? } |
56 | |
57 | // TRASH FOLDER |
58 | echo "<tr><td nowrap align=right>"; |
59 | echo _("Trash Folder:"); |
60 | echo "</td><td>"; |
61 | echo "<TT><SELECT NAME=trash>\n"; |
62 | if ($move_to_trash == true) |
63 | echo "<option value=none>" . _("Don't use Trash"); |
64 | else |
65 | echo "<option value=none selected>" . _("Do not use Trash"); |
66 | |
67 | for ($i = 0; $i < count($boxes); $i++) { |
68 | $use_folder = true; |
69 | if (strtolower($boxes[$i]["unformatted"]) == "inbox") { |
70 | $use_folder = false; |
71 | } |
72 | if ($use_folder == true) { |
73 | $box = $boxes[$i]["unformatted-dm"]; |
74 | $box2 = replace_spaces($boxes[$i]["formatted"]); |
75 | if (($boxes[$i]["unformatted"] == $trash_folder) && ($move_to_trash == true)) |
76 | echo " <OPTION SELECTED VALUE=\"$box\">$box2\n"; |
77 | else |
78 | echo " <OPTION VALUE=\"$box\">$box2\n"; |
79 | } |
80 | } |
81 | echo "</SELECT></TT>\n"; |
82 | echo "</td></tr>"; |
83 | |
84 | |
85 | // SENT FOLDER |
86 | echo "<tr><td nowrap align=right>"; |
87 | echo _("Sent Folder:"); |
88 | echo "</td><td>"; |
89 | echo "<TT><SELECT NAME=sent>\n"; |
90 | if ($move_to_sent == true) |
91 | echo "<option value=none>" . _("Don't use Sent"); |
92 | else |
93 | echo "<option value=none selected>" . _("Do not use Sent"); |
94 | |
95 | for ($i = 0; $i < count($boxes); $i++) { |
96 | $use_folder = true; |
97 | if (strtolower($boxes[$i]["unformatted"]) == "inbox") { |
98 | $use_folder = false; |
99 | } |
100 | if ($use_folder == true) { |
101 | $box = $boxes[$i]["unformatted-dm"]; |
102 | $box2 = replace_spaces($boxes[$i]["formatted"]); |
103 | if (($boxes[$i]["unformatted"] == $sent_folder) && ($move_to_sent == true)) |
104 | echo " <OPTION SELECTED VALUE=\"$box\">$box2\n"; |
105 | else |
106 | echo " <OPTION VALUE=\"$box\">$box2\n"; |
107 | } |
108 | } |
109 | echo "</SELECT></TT>\n"; |
110 | echo "</td></tr>"; |
111 | ?> |
112 | <tr> |
113 | <td> |
114 | </td><td> |
115 | <input type="submit" value="Submit" name="submit_folder"> |
116 | </td> |
117 | </tr> |
118 | </table> |
119 | </form> |
120 | </body></html> |