X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_delete.php;h=c75e1306bd5c62eb83e9cab31c2c68fcbfefbc9a;hb=39f79fa9ef9b2df9a927a7b04db174cab3b9080e;hp=91b426acccc3e6dc9afe2bfcc0dccafdc34f315a;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe;p=squirrelmail.git diff --git a/src/folders_delete.php b/src/folders_delete.php index 91b426ac..c75e1306 100644 --- a/src/folders_delete.php +++ b/src/folders_delete.php @@ -3,24 +3,30 @@ /** * folders_delete.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Deletes folders from the IMAP server. * Called from the folders.php * - * $Id$ + * @version $Id$ + * @package squirrelmail */ -/* Path for SquirrelMail required files. */ +/** + * Path for SquirrelMail required files. + * @ignore + */ define('SM_PATH','../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/imap.php'); require_once(SM_PATH . 'functions/tree.php'); require_once(SM_PATH . 'functions/display_messages.php'); require_once(SM_PATH . 'functions/html.php'); +require_once(SM_PATH . 'functions/forms.php'); /* * Incoming values: @@ -28,13 +34,11 @@ require_once(SM_PATH . 'functions/html.php'); */ /* globals */ -$username = $_SESSION['username']; -$key = $_COOKIE['key']; -$delimiter = $_SESSION['delimiter']; -$onetimepad = $_SESSION['onetimepad']; - -$mailbox = $_POST['mailbox']; - +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 == '') { @@ -45,13 +49,13 @@ if ($mailbox == '') { exit; } -if (isset($_POST['backingout'])) { +if ( sqgetGlobalVar('backingout', $tmp, SQ_POST) ) { $location = get_location(); header ("Location: $location/folders.php"); exit; } -if(!isset($_POST['confirmed'])) { +if( !sqgetGlobalVar('confirmed', $tmp, SQ_POST) ) { displayPageHeader($color, 'None'); echo '
' . @@ -61,10 +65,9 @@ if(!isset($_POST['confirmed'])) { ) . html_tag( 'tr' ) . html_tag( 'td', '', 'center', $color[4] ) . - sprintf(_("Are you sure you want to delete %s?"), imap_utf7_decode_local($mailbox)). - '

'. - - '\n" . + 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". '


';