X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_delete.php;h=58e6fe2c89a2544b129298facdebd911a6c439f3;hb=ed89e55b372449d697a8fe81c75d22205621b799;hp=8bc2ff5aa91340893f7ac99460a3d6971de108e0;hpb=7c1b84d979f4bbbcc8ce5d7423421123c4155107;p=squirrelmail.git
diff --git a/src/folders_delete.php b/src/folders_delete.php
index 8bc2ff5a..58e6fe2c 100644
--- a/src/folders_delete.php
+++ b/src/folders_delete.php
@@ -1,37 +1,139 @@
-
- include("../config/config.php");
- include("../functions/strings.php");
- include("../functions/page_header.php");
- include("../functions/imap.php");
- include("../functions/mailbox.php");
-
- $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
-
- // switch to the mailbox, and get the number of messages in it.
- selectMailbox($imapConnection, $mailbox, $numMessages);
-
- $folder = getFolderNameMinusINBOX($mailbox);
- $trash = getFolderNameMinusINBOX($trash_folder);
-
- /** check if they would like to move it to the trash folder or not */
- if ($move_to_trash == true) {
- createFolder($imapConnection, "user.$username.$trash.$folder");
- echo "CREATING FOLDER: user.$username.$trash.$folder
";
- if ($numMessages > 0)
- $success = copyMessages($imapConnection, 1, $numMessages, $trash_folder);
- else
- $success = true;
-
- if ($success == true)
- removeFolder($imapConnection, "user.$username.$folder");
- } else {
- removeFolder($imapConnection, "user.$username.$folder");
- }
-
- // Log out this session
- fputs($imapConnection, "1 logout");
-
- echo "
Return";
-?>
+'._("Click here to go back").'.', $color);
+ exit;
+}
+
+if ( sqgetGlobalVar('backingout', $tmp, SQ_POST) ) {
+ $location = get_location();
+ header ("Location: $location/folders.php");
+ exit;
+}
+
+if( !sqgetGlobalVar('confirmed', $tmp, SQ_POST) ) {
+ displayPageHeader($color, 'None');
+
+ echo '
' .
+ html_tag( 'table', '', 'center', '', 'width="95%" border="0"' ) .
+ html_tag( 'tr',
+ html_tag( 'td', '' . _("Delete Folder") . '', 'center', $color[0] )
+ ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'center', $color[4] ) .
+ sprintf(_("Are you sure you want to delete %s?"), imap_utf7_decode_local($mailbox)).
+ '