*/
require_once('../src/validate.php');
+require_once('../functions/imap_utf7_decode_local.php');
require_once('../functions/imap.php');
require_once('../functions/array.php');
require_once('../functions/plugin.php');
if (!in_array('noinferiors', $boxes[$i]['flags'])) {
if ((strtolower($boxes[$i]['unformatted']) == 'inbox') &&
$default_sub_of_inbox) {
+
$box = $boxes[$i]['unformatted'];
- $box2 = str_replace(' ', ' ', $boxes[$i]['unformatted-disp']);
+ $box2 = imap_utf7_decode_local(
+ str_replace(' ', ' ', $boxes[$i]['unformatted-disp']));
echo "<OPTION SELECTED VALUE=\"$box\">$box2</option>\n";
} else {
$box = $boxes[$i]['unformatted'];
- $box2 = str_replace(' ', ' ', $boxes[$i]['unformatted-disp']);
+ $box2 = imap_utf7_decode_local(
+ str_replace(' ', ' ', $boxes[$i]['unformatted-disp']));
if (strtolower($imap_server_type) != 'courier' ||
strtolower($box) != "inbox.trash")
echo "<OPTION VALUE=\"$box\">$box2</option>\n";
echo "<tr><td bgcolor=\"$color[4]\"> </td></tr>\n";
+
+/** count special folders **/
+$count_special_folders = 0;
+$num_max = 1;
+if (strtolower($imap_server_type) == "courier" || $move_to_trash) {
+ $num_max++;
+}
+if ($move_to_sent) {
+ $num_max++;
+}
+if ($save_as_draft) {
+ $num_max++;
+}
+for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) {
+ if (strtolower($boxes[$p]['unformatted']) == 'inbox')
+ $count_special_folders++;
+ else if (strtolower($imap_server_type) == 'courier' &&
+ strtolower($boxes[$p]['unformatted']) == 'inbox.trash')
+ $count_special_folders++;
+ else if ($boxes[$p]['unformatted'] == $trash_folder && $trash_folder)
+ $count_special_folders++;
+ else if ($boxes[$p]['unformatted'] == $sent_folder && $sent_folder)
+ $count_special_folders++;
+ else if ($boxes[$p]['unformatted'] == $draft_folder && $draft_folder)
+ $count_special_folders++;
+}
+
+
/** RENAMING FOLDERS **/
echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><B>".
_("Rename a Folder").
"</B></TD></TR>".
"<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
if ($count_special_folders < count($boxes)) {
- echo "<FORM ACTION=\"folders_rename_getname.php\" METHOD=\"POST\">\n".
- "<TT><SELECT NAME=old>\n";
+ echo "<FORM ACTION=\"folders_rename_getname.php\" METHOD=\"POST\">\n"
+ . "<TT><SELECT NAME=old>\n"
+ . ' <OPTION VALUE="">[ ' . _("Select a folder") . " ]</OPTION>\n";
for ($i = 0; $i < count($boxes); $i++) {
$use_folder = true;
($boxes[$i]['unformatted'] != $draft_folder)) {
$box = $boxes[$i]['unformatted-dm'];
- $box2 = str_replace(' ', ' ', $boxes[$i]['unformatted-disp']);
+ $box2 = imap_utf7_decode_local(
+ str_replace(' ', ' ', $boxes[$i]['unformatted-disp']));
if (strtolower($imap_server_type) != 'courier' || strtolower($box) != 'inbox.trash') {
echo "<OPTION VALUE=\"$box\">$box2</option>\n";
}
echo "</B></TD></TR>";
echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
-$count_special_folders = 0;
-$num_max = 1;
-if (strtolower($imap_server_type) == "courier" || $move_to_trash) {
- $num_max++;
-}
-if ($move_to_sent) {
- $num_max++;
-}
-if ($save_as_draft) {
- $num_max++;
-}
-for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) {
- if (strtolower($boxes[$p]['unformatted']) == 'inbox')
- $count_special_folders++;
- else if (strtolower($imap_server_type) == 'courier' &&
- strtolower($boxes[$p]['unformatted']) == 'inbox.trash')
- $count_special_folders++;
- else if ($boxes[$p]['unformatted'] == $trash_folder && $trash_folder)
- $count_special_folders++;
- else if ($boxes[$p]['unformatted'] == $sent_folder && $sent_folder)
- $count_special_folders++;
- else if ($boxes[$p]['unformatted'] == $draft_folder && $draft_folder)
- $count_special_folders++;
-}
-
if ($count_special_folders < count($boxes)) {
- echo "<FORM ACTION=\"folders_delete.php\" METHOD=\"POST\">\n";
- echo "<TT><SELECT NAME=mailbox>\n";
+ echo "<FORM ACTION=\"folders_delete.php\" METHOD=\"POST\">\n"
+ . "<TT><SELECT NAME=mailbox>\n"
+ . ' <OPTION VALUE="">[ ' . _("Select a folder") . " ]</OPTION>\n";
for ($i = 0; $i < count($boxes); $i++) {
$use_folder = true;
if ((strtolower($boxes[$i]['unformatted']) != 'inbox') &&
($boxes[$i]['unformatted'] != $trash_folder) &&
($boxes[$i]['unformatted'] != $sent_folder) &&
($boxes[$i]['unformatted'] != $draft_folder) &&
+ (!in_array('noselect', $boxes[$i]['flags'])) &&
((strtolower($imap_server_type) != 'courier') ||
(strtolower($boxes[$i]['unformatted']) != 'inbox.trash'))) {
$box = $boxes[$i]['unformatted-dm'];
- $box2 = str_replace(' ', ' ', $boxes[$i]['unformatted-disp']);
+ $box2 = imap_utf7_decode_local(
+ str_replace(' ', ' ', $boxes[$i]['unformatted-disp']));
echo " <OPTION VALUE=\"$box\">$box2</option>\n";
}
}
($boxes[$i]["unformatted"] != $sent_folder) &&
($boxes[$i]["unformatted"] != $draft_folder)) {
$box = $boxes[$i]["unformatted-dm"];
- $box2 = str_replace(' ', ' ', $boxes[$i]["unformatted-disp"]);
+ $box2 = imap_utf7_decode_local(
+ str_replace(' ', ' ', $boxes[$i]["unformatted-disp"]));
echo " <OPTION VALUE=\"$box\">$box2\n";
}
}
$use_folder = false;
}
}
- if ($use_folder == true) {
+ if ($use_folder == true) {
$box[$q] = $boxes_all[$i]["unformatted-dm"];
- $box2[$q] = $boxes_all[$i]["unformatted-disp"];
+ $box2[$q] = imap_utf7_decode_local($boxes_all[$i]["unformatted-disp"]);
$q++;
}
}
sqimap_logout($imapConnection);
?>
-</body></html>
\ No newline at end of file
+</body></html>