73ee43b1 |
1 | <?php |
793566f0 |
2 | |
519f07d7 |
3 | /** |
4 | * mailout.php |
73ee43b1 |
5 | * |
d4e46166 |
6 | * @copyright © 1999-2009 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 | */ |
16 | require('../../include/init.php'); |
cdf82d4a |
17 | |
18 | /* SquirrelMail required files. */ |
202bcbcc |
19 | require(SM_PATH . 'functions/identity.php'); |
20 | require(SM_PATH . 'functions/forms.php'); |
21 | require(SM_PATH . 'plugins/listcommands/functions.php'); |
73ee43b1 |
22 | |
6a85a764 |
23 | /* get globals */ |
b587ac51 |
24 | sqgetGlobalVar('mailbox', $mailbox, SQ_GET); |
25 | sqgetGlobalVar('send_to', $send_to, SQ_GET); |
26 | sqgetGlobalVar('subject', $subject, SQ_GET); |
27 | sqgetGlobalVar('body', $body, SQ_GET); |
28 | sqgetGlobalVar('action', $action, SQ_GET); |
6a85a764 |
29 | |
793566f0 |
30 | displayPageHeader($color, $mailbox); |
793566f0 |
31 | |
73ee43b1 |
32 | switch ( $action ) { |
793566f0 |
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."); |
a6d3eff6 |
41 | break; |
42 | default: |
1b858d86 |
43 | error_box(sprintf(_("Unknown action: %s"),htmlspecialchars($action))); |
44 | // display footer (closes html tags) and stop script execution |
45 | $oTemplate->display('footer.tpl'); |
a6d3eff6 |
46 | exit; |
73ee43b1 |
47 | } |
48 | |
8b7c37ed |
49 | $out_string = sprintf($out_string, '"' . htmlspecialchars($send_to) . '"'); |
27544ac4 |
50 | $idents = get_identities(); |
8b7c37ed |
51 | $fieldsdescr = listcommands_fieldsdescr(); |
52 | $fielddescr = $fieldsdescr[$action]; |
27544ac4 |
53 | |
8b7c37ed |
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); |
73ee43b1 |
61 | |
8b7c37ed |
62 | $oTemplate->display('plugins/listcommands/mailout.tpl'); |
63 | $oTemplate->display('footer.tpl'); |
050722c4 |
64 | |