+ * Incoming values:
+ * $mailbox - selected mailbox from the form
+ */
+
+/* globals */
+sqgetGlobalVar('key', $key, SQ_COOKIE);
+sqgetGlobalVar('username', $username, SQ_SESSION);
+sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION);
+sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
+sqgetGlobalVar('mailbox', $mailbox, SQ_POST);
+/* end globals */
+
+if ($mailbox == '') {
+ displayPageHeader($color, 'None');
+
+ plain_error_message(_("You have not selected a folder to delete. Please do so.").
+ '<BR><A HREF="../src/folders.php">'._("Click here to go back").'</A>.', $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 '<br>' .
+ html_tag( 'table', '', 'center', '', 'width="95%" border="0"' ) .
+ html_tag( 'tr',
+ html_tag( 'td', '<b>' . _("Delete Folder") . '</b>', '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).
+ '<INPUT TYPE=SUBMIT NAME="confirmed" VALUE="'._("Yes")."\">\n".
+ '<INPUT TYPE=SUBMIT NAME="backingout" VALUE="'._("No")."\">\n".
+ '</p></FORM><BR></td></tr></table>';
+
+ exit;
+}