X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_delete.php;h=c75e1306bd5c62eb83e9cab31c2c68fcbfefbc9a;hb=39f79fa9ef9b2df9a927a7b04db174cab3b9080e;hp=4c318a4098c52edabb64227c7443953aabf3ac03;hpb=597d8f1dd82b77e993a99ea9dca1c26b19218b8b;p=squirrelmail.git
diff --git a/src/folders_delete.php b/src/folders_delete.php
index 4c318a40..c75e1306 100644
--- a/src/folders_delete.php
+++ b/src/folders_delete.php
@@ -1,40 +1,144 @@
-
- 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.
- echo "$mailbox
";
- exit;
- 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");
- }
- echo "success";
-
- // 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?"), str_replace(array(' ','<','>'),array(' ','<','>'),imap_utf7_decode_local($mailbox))).
+ addForm('folders_delete.php', 'POST').
+ addHidden('mailbox', $mailbox).
+ '\n".
+ '\n".
+ '