- echo "<FORM ACTION=\"folders_delete.php\" METHOD=\"POST\">\n";
- echo "<TT><SELECT NAME=mailbox>\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) &&
- ((strtolower($imap_server_type) != 'courier') ||
- (strtolower($boxes[$i]['unformatted']) != 'inbox.trash'))) {
- $box = $boxes[$i]['unformatted-dm'];
- $box2 = str_replace(' ', ' ', $boxes[$i]['unformatted-disp']);
- echo " <OPTION VALUE=\"$box\">$box2</option>\n";
- }
- }
- echo "</SELECT></TT>\n";
- echo "<INPUT TYPE=SUBMIT VALUE=\"";
- echo _("Delete");
- echo "\">\n";
- echo "</FORM></TD></TR>\n";
+ echo "<FORM ACTION=\"folders_rename_getname.php\" METHOD=\"POST\">\n"
+ . "<TT><SELECT NAME=old>\n"
+ . ' <OPTION VALUE="">[ ' . _("Select a folder") . " ]</OPTION>\n";
+
+ echo sqimap_mailbox_option_list($imapConnection, 0, $skip_folders, $boxes);
+
+ echo "</SELECT></TT>\n".
+ "<input type=SUBMIT VALUE=\"".
+ _("Rename").
+ "\">\n".
+ "</FORM></td></tr>\n";
+} else {
+ echo _("No folders found") . '<br><br></td></tr>';
+}
+$boxes_sub = $boxes;
+
+echo html_tag( 'tr',
+ html_tag( 'td', ' ', 'left', $color[4] )
+ ) ."\n";
+
+/** DELETING FOLDERS **/
+echo html_tag( 'tr',
+ html_tag( 'td', '<b>' . _("Delete Folder") . '</b>', 'center', $color[9] )
+ ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'center', $color[0] );
+
+if ($count_special_folders < count($boxes)) {
+ echo "<FORM ACTION=\"folders_delete.php\" METHOD=\"POST\">\n"
+ . "<TT><SELECT NAME=mailbox>\n"
+ . ' <OPTION VALUE="">[ ' . _("Select a folder") . " ]</OPTION>\n";
+
+ echo sqimap_mailbox_option_list($imapConnection, 0, $skip_folders, $boxes);
+
+ echo "</SELECT></TT>\n"
+ . '<input type=SUBMIT VALUE="'
+ . _("Delete")
+ . "\">\n"
+ . "</form></td></tr>\n";