Seriously? The variable is named as an array and initialized as a string? Well, I...
[squirrelmail.git] / plugins / listcommands / mailout.php
CommitLineData
73ee43b1 1<?php
793566f0 2
519f07d7 3/**
4 * mailout.php
73ee43b1 5 *
22387c8d 6 * @copyright 1999-2017 The SquirrelMail Project Team
4b4abf93 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
793566f0 8 * @version $Id$
ea5f4b8e 9 * @package plugins
10 * @subpackage listcommands
73ee43b1 11 */
202bcbcc 12/**
13 * Path for SquirrelMail required files.
14 * @ignore
15 */
16require('../../include/init.php');
cdf82d4a 17
18/* SquirrelMail required files. */
202bcbcc 19require(SM_PATH . 'functions/identity.php');
20require(SM_PATH . 'functions/forms.php');
21require(SM_PATH . 'plugins/listcommands/functions.php');
73ee43b1 22
6a85a764 23/* get globals */
b587ac51 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);
dd9c9e85 29sqgetGlobalVar('identity', $identity, SQ_GET);
6a85a764 30
793566f0 31displayPageHeader($color, $mailbox);
793566f0 32
73ee43b1 33switch ( $action ) {
793566f0 34 case 'help':
35 $out_string = _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
36 break;
37 case 'subscribe':
38 $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.");
39 break;
40 case 'unsubscribe':
41 $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.");
a6d3eff6 42 break;
43 default:
3047e291 44 error_box(sprintf(_("Unknown action: %s"),sm_encode_html_special_chars($action)));
1b858d86 45 // display footer (closes html tags) and stop script execution
46 $oTemplate->display('footer.tpl');
a6d3eff6 47 exit;
73ee43b1 48}
49
3047e291 50$out_string = sprintf($out_string, '&quot;' . sm_encode_html_special_chars($send_to) . '&quot;');
27544ac4 51$idents = get_identities();
8b7c37ed 52$fieldsdescr = listcommands_fieldsdescr();
53$fielddescr = $fieldsdescr[$action];
27544ac4 54
8b7c37ed 55$oTemplate->assign('out_string', $out_string);
56$oTemplate->assign('fielddescr', $fielddescr);
57$oTemplate->assign('send_to', $send_to);
58$oTemplate->assign('subject', $subject);
59$oTemplate->assign('body', $body);
60$oTemplate->assign('mailbox', $mailbox);
61$oTemplate->assign('idents', $idents);
dd9c9e85 62$oTemplate->assign('identity', $identity);
73ee43b1 63
8b7c37ed 64$oTemplate->display('plugins/listcommands/mailout.tpl');
65$oTemplate->display('footer.tpl');
050722c4 66