X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Flistcommands%2Fmailout.php;h=c39f1d9d3cbdd155ce9d446ea083a2f0de113071;hp=9040fef87d7161892f915bf2d26c65185b68ddc2;hb=e29a0356bdab63512a2592ccf23cb86423bc214b;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe diff --git a/plugins/listcommands/mailout.php b/plugins/listcommands/mailout.php index 9040fef8..c39f1d9d 100644 --- a/plugins/listcommands/mailout.php +++ b/plugins/listcommands/mailout.php @@ -2,12 +2,15 @@ /** * mailout.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2005 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * $Id$ + * @package plugins + * @subpackage listcommands */ +/** @ignore */ define('SM_PATH','../../'); /* SquirrelMail required files. */ @@ -15,15 +18,17 @@ require_once(SM_PATH . 'include/validate.php'); include_once(SM_PATH . 'functions/page_header.php'); include_once(SM_PATH . 'include/load_prefs.php'); include_once(SM_PATH . 'functions/html.php'); +require_once(SM_PATH . 'functions/identity.php'); +require_once(SM_PATH . 'functions/forms.php'); displayPageHeader($color, $mailbox); /* get globals */ -$mailbox = $_GET['mailbox']; -$send_to = $_GET['send_to']; -$subject = $_GET['subject']; -$body = $_GET['body']; -$action = $_GET['action']; +sqgetGlobalVar('mailbox', $mailbox, SQ_GET); +sqgetGlobalVar('send_to', $send_to, SQ_GET); +sqgetGlobalVar('subject', $subject, SQ_GET); +sqgetGlobalVar('body', $body, SQ_GET); +sqgetGlobalVar('action', $action, SQ_GET); echo html_tag('p', '', 'left' ) . html_tag( 'table', '', 'center', $color[0], 'border="0" width="75%"' ) . "\n" . @@ -46,49 +51,32 @@ case 'unsubscribe': printf( $out_string, htmlspecialchars($send_to) ); -echo '
'; +echo addForm('../../src/compose.php', 'post'); -/* - * Identity support (RFC 2369 sect. B.1.) - * - * I had to copy this from compose.php because there doesn't - * seem to exist a function to get the identities. - */ -$defaultmail = htmlspecialchars(getPref($data_dir, $username, 'full_name')); -$em = getPref($data_dir, $username, 'email_address'); -if ($em != '') { - $defaultmail .= htmlspecialchars(' <' . $em . '>') . "\n"; -} +$idents = get_identities(); + echo html_tag('p', '', 'center' ) . _("From:") . ' '; -$idents = getPref($data_dir, $username, 'identities'); -if ($idents != '' && $idents > 1) { - echo ' '; + foreach($idents as $nr=>$data) { + echo '

'; -?> +?> \ No newline at end of file