";
- echo " |
\n";
+
+echo html_tag( 'tr',
+ html_tag( 'td', ' ', 'left', $color[4] )
+ ) ."\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, $cnt = count($boxes); $p < $cnt && $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++;
+ array_push($skip_folders, strtolower($trash_folder));
+ }
+ else if ($boxes[$p]['unformatted'] == $sent_folder && $sent_folder) {
+ $count_special_folders++;
+ array_push($skip_folders, strtolower($sent_folder));
+ }
+ else if ($boxes[$p]['unformatted'] == $draft_folder && $draft_folder) {
+ $count_special_folders++;
+ array_push($skip_folders, strtolower($draft_folder));
+ }
+}
+
+
+/** RENAMING FOLDERS **/
+echo html_tag( 'tr',
+ html_tag( 'td', '