Ah, I see - the stuff after the ? needs to be handed to src/compose.php as-is, no...
[squirrelmail.git] / plugins / listcommands / mailout.php
... / ...
CommitLineData
1<?php
2
3/**
4 * mailout.php
5 *
6 * @copyright 1999-2015 The SquirrelMail Project Team
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
8 * @version $Id$
9 * @package plugins
10 * @subpackage listcommands
11 */
12/**
13 * Path for SquirrelMail required files.
14 * @ignore
15 */
16require('../../include/init.php');
17
18/* SquirrelMail required files. */
19require(SM_PATH . 'functions/identity.php');
20require(SM_PATH . 'functions/forms.php');
21require(SM_PATH . 'plugins/listcommands/functions.php');
22
23/* get globals */
24sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
25sqgetGlobalVar('send_to', $send_to, SQ_GET);
26sqgetGlobalVar('subject', $subject, SQ_GET);
27sqgetGlobalVar('body', $body, SQ_GET);
28sqgetGlobalVar('action', $action, SQ_GET);
29
30displayPageHeader($color, $mailbox);
31
32switch ( $action ) {
33 case 'help':
34 $out_string = _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
35 break;
36 case 'subscribe':
37 $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.");
38 break;
39 case 'unsubscribe':
40 $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.");
41 break;
42 default:
43 error_box(sprintf(_("Unknown action: %s"),sm_encode_html_special_chars($action)));
44 // display footer (closes html tags) and stop script execution
45 $oTemplate->display('footer.tpl');
46 exit;
47}
48
49$out_string = sprintf($out_string, '&quot;' . sm_encode_html_special_chars($send_to) . '&quot;');
50$idents = get_identities();
51$fieldsdescr = listcommands_fieldsdescr();
52$fielddescr = $fieldsdescr[$action];
53
54$oTemplate->assign('out_string', $out_string);
55$oTemplate->assign('fielddescr', $fielddescr);
56$oTemplate->assign('send_to', $send_to);
57$oTemplate->assign('subject', $subject);
58$oTemplate->assign('body', $body);
59$oTemplate->assign('mailbox', $mailbox);
60$oTemplate->assign('idents', $idents);
61
62$oTemplate->display('plugins/listcommands/mailout.tpl');
63$oTemplate->display('footer.tpl');
64