X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Flistcommands%2Fmailout.php;h=ecba67dc6f179d961c87b8484eed671fc9209216;hp=a46815694fc5a4a350262ade375faf155f789513;hb=75b7d0427336801badc83fecdd4b25da55c6bb81;hpb=050722c4a141bfda4a2eae435ec290c6b793aae6 diff --git a/plugins/listcommands/mailout.php b/plugins/listcommands/mailout.php index a4681569..ecba67dc 100644 --- a/plugins/listcommands/mailout.php +++ b/plugins/listcommands/mailout.php @@ -1,78 +1,64 @@ \n" - .'\n
' . _("Mailinglist") . ' ' . _($action) . - "
"; +/* 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); +displayPageHeader($color, $mailbox); switch ( $action ) { -case 'Help': - $out_string .= _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below."); - break; -case 'Subscribe': - $out_string .= _("This will send a message to %s requesting that you will be subscribed to this list. You will be subscribed with the address below."); - break; -case 'Unsubscribe': - $out_string = _("This will send a message to %s requesting that you will be unsubscribed from this list. It will try to unsubscribe the adress below."); + case 'help': + $out_string = _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below."); + break; + case 'subscribe': + $out_string = _("This will send a message to %s requesting that you will be subscribed to this list. You will be subscribed with the address below."); + break; + case 'unsubscribe': + $out_string = _("This will send a message to %s requesting that you will be unsubscribed from this list. It will try to unsubscribe the adress below."); + break; + default: + error_box(sprintf(_("Unknown action: %s"),htmlspecialchars($action))); + // display footer (closes html tags) and stop script execution + $oTemplate->display('footer.tpl'); + exit; } -printf( $out_string, htmlspecialchars($send_to) ); - -echo '
'; +$out_string = sprintf($out_string, '"' . htmlspecialchars($send_to) . '"'); +$idents = get_identities(); +$fieldsdescr = listcommands_fieldsdescr(); +$fielddescr = $fieldsdescr[$action]; -/* - * 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"; -} -echo '

' . _("From:"); - -$idents = getPref($data_dir, $username, 'identities'); -if ($idents != '' && $idents > 1) { - echo ' ' . "\n" ; +$oTemplate->assign('out_string', $out_string); +$oTemplate->assign('fielddescr', $fielddescr); +$oTemplate->assign('send_to', $send_to); +$oTemplate->assign('subject', $subject); +$oTemplate->assign('body', $body); +$oTemplate->assign('mailbox', $mailbox); +$oTemplate->assign('idents', $idents); -} else { - echo $defaultmail; -} +$oTemplate->display('plugins/listcommands/mailout.tpl'); +$oTemplate->display('footer.tpl'); -echo '
' -. '' -. '' -. '' -. '' -. '

' -. '

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