X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Flistcommands%2Fmailout.php;h=c39f1d9d3cbdd155ce9d446ea083a2f0de113071;hp=6a2ef1377ae7bba3299f108eb00125802b195ab2;hb=9eb3fcb302b8e0363760bee586f1c43e7050b365;hpb=cdf82d4a03ace568f23522ca11a9641216696c8a diff --git a/plugins/listcommands/mailout.php b/plugins/listcommands/mailout.php index 6a2ef137..c39f1d9d 100644 --- a/plugins/listcommands/mailout.php +++ b/plugins/listcommands/mailout.php @@ -2,23 +2,34 @@ /** * mailout.php * - * Copyright (c) 1999-2002 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 */ -chdir('..'); -define('SM_PATH','../'); +/** @ignore */ +define('SM_PATH','../../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); include_once(SM_PATH . 'functions/page_header.php'); -include_once(SM_PATH . 'src/load_prefs.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 */ +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" . html_tag( 'tr', @@ -40,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 '

'; -?> +echo '
' +. addHidden('send_to', $send_to) +. addHidden('subject', $subject) +. addHidden('body', $body) +. addHidden('mailbox', $mailbox) +. addSubmit(_("Send Mail"), 'send') +. '

' +. '

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