X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fdelete_message.php;h=4918d98e66292dba3959983389506f04cae319d6;hp=fc281fdd479130b13158b9b9bf8cbe2fea101e6f;hb=c91b2e3b5b2b35ab39b7c44bc866318b7341f7a1;hpb=9b761dbdd92259ef09affe9b8f8b62362d0d7bb2 diff --git a/src/delete_message.php b/src/delete_message.php index fc281fdd..4918d98e 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -3,76 +3,19 @@ /** * delete_message.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * * Deletes a meesage from the IMAP server * - * $Id$ + * @copyright © 1999-2007 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package squirrelmail */ -/* Path for SquirrelMail required files. */ -define('SM_PATH','../'); - -/* SquirrelMail required files. */ -require_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/display_messages.php'); -require_once(SM_PATH . 'functions/imap.php'); - -$key = $_COOKIE['key']; -$username = $_SESSION['username']; -$onetimepad = $_SESSION['onetimepad']; - -$message = $_GET['message']; -$mailbox = $_GET['mailbox']; - -if (isset($_GET['saved_draft'])) { - $saved_draft = urlencode($_GET['saved_draft']); -} -if (isset($_GET['mail_sent'])) { - $mail_sent = urlencode($_GET['mail_sent']); -} -$sort = (int) $_GET['sort']; -$startMessage = (int) $_GET['startMessage']; - -if(isset($_GET['where'])) { - $where = urlencode($_GET['where']); -} -if(isset($_GET['what'])) { - $what = urlencode($_GET['what']); -} - -$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); - -sqimap_mailbox_select($imapConnection, $mailbox); +define('PAGE_NAME', 'delete_message'); -sqimap_messages_delete($imapConnection, $message, $message, $mailbox); -if ($auto_expunge) { - sqimap_mailbox_expunge($imapConnection, $mailbox, true); -} -if (!isset($saved_draft)) { - $saved_draft = ''; -} - -if (!isset($mail_sent)) { - $mail_sent = ''; -} - -$location = get_location(); - -if (isset($where) && isset($what)) { - header("Location: $location/search.php?where=" . $where . - '&what=' . $what . '&mailbox=' . urlencode($mailbox)); -} else { - if (!empty($saved_draft) || !empty($mail_sent)) { - header("Location: $location/compose.php?mail_sent=$mail_sent&saved_draft=$saved_draft"); - } - else { - header("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=" . - urlencode($mailbox)); - } -} - -sqimap_logout($imapConnection); - -?> +/** + * Include the SquirrelMail initialization file. + */ +include('../include/init.php'); +error_box('delete_message.php script is obsolete since 1.5.1.'); +$oTemplate->display('footer.tpl');