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> |
6170c5b6 |
37 | <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>"> |
38 | <center><b><?php echo _("Options") . " - " . _("Folder Preferences"); ?></b></center> |
c36ed9cf |
39 | </td></tr></table> |
40 | |
41 | <form action="options.php" method=post> |
42 | <table width=100% cellpadding=0 cellspacing=2 border=0> |
43 | |
6170c5b6 |
44 | <?php if ($show_prefix_option == true) { ?> |
c36ed9cf |
45 | <tr> |
6170c5b6 |
46 | <td align=right nowrap><?php echo _("Folder Path"); ?>: |
c36ed9cf |
47 | </td><td> |
6170c5b6 |
48 | <?php if (isset ($folder_prefix)) |
24fc5dd2 |
49 | echo " <input type=text name=folderprefix value=\"$folder_prefix\" size=35><br>"; |
c36ed9cf |
50 | else |
24fc5dd2 |
51 | echo " <input type=text name=folderprefix value=\"$default_folder_prefix\" size=35><br>"; |
c36ed9cf |
52 | ?> |
53 | </td> |
54 | </tr> |
6170c5b6 |
55 | <?php } |
c36ed9cf |
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 | ?> |
24fc5dd2 |
112 | <tr> |
113 | <td valign=top align=right> |
114 | <br> |
6170c5b6 |
115 | <?php echo _("Unseen message notification"); ?>: |
24fc5dd2 |
116 | </td> |
117 | <td> |
6170c5b6 |
118 | <input type=radio name=unseennotify value=1<?php if ($unseen_notify == 1) echo " checked"; ?>> <?php echo _("No notification") ?><br> |
119 | <input type=radio name=unseennotify value=2<?php if ($unseen_notify != 1 && $unseen_notify != 3) echo " checked"; ?>> <?php echo _("Only INBOX") ?><br> |
120 | <input type=radio name=unseennotify value=3<?php if ($unseen_notify == 3) echo " checked"; ?>> <?php echo _("All Folders") ?><br> |
24fc5dd2 |
121 | <br> |
122 | </td> |
123 | </tr> |
124 | <tr> |
125 | <td valign=top align=right> |
126 | <br> |
6170c5b6 |
127 | <?php echo _("Unseen message notification type"); ?>: |
24fc5dd2 |
128 | </td> |
129 | <td> |
6170c5b6 |
130 | <input type=radio name=unseentype value=1<?php if ($unseen_type < 2 || $unseen_type > 2) echo " checked"; ?>> <?php echo _("Only unseen"); ?> - (4)<br> |
131 | <input type=radio name=unseentype value=2<?php if ($unseen_type == 2) echo " checked"; ?>> <?php echo _("Unseen and Total"); ?> - (4/27) |
24fc5dd2 |
132 | </td> |
133 | </tr> |
c36ed9cf |
134 | <tr> |
135 | <td> |
136 | </td><td> |
137 | <input type="submit" value="Submit" name="submit_folder"> |
138 | </td> |
139 | </tr> |
140 | </table> |
141 | </form> |
142 | </body></html> |