The copyright message should be consistent.
[squirrelmail.git] / plugins / listcommands / mailout.php
... / ...
CommitLineData
1<?php
2/**
3 * mailout.php
4 *
5 * Copyright (c) 1999-2005 The SquirrelMail Project Team
6 * Licensed under the GNU GPL. For full terms see the file COPYING.
7 *
8 * $Id$
9 * @package plugins
10 * @subpackage listcommands
11 */
12
13/** @ignore */
14define('SM_PATH','../../');
15
16/* SquirrelMail required files. */
17require_once(SM_PATH . 'include/validate.php');
18include_once(SM_PATH . 'functions/page_header.php');
19include_once(SM_PATH . 'include/load_prefs.php');
20include_once(SM_PATH . 'functions/html.php');
21require_once(SM_PATH . 'functions/identity.php');
22require_once(SM_PATH . 'functions/forms.php');
23
24displayPageHeader($color, $mailbox);
25
26/* get globals */
27sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
28sqgetGlobalVar('send_to', $send_to, SQ_GET);
29sqgetGlobalVar('subject', $subject, SQ_GET);
30sqgetGlobalVar('body', $body, SQ_GET);
31sqgetGlobalVar('action', $action, SQ_GET);
32
33echo html_tag('p', '', 'left' ) .
34html_tag( 'table', '', 'center', $color[0], 'border="0" width="75%"' ) . "\n" .
35 html_tag( 'tr',
36 html_tag( 'th', _("Mailinglist") . ' ' . _($action), '', $color[9] )
37 ) .
38 html_tag( 'tr' ) .
39 html_tag( 'td', '', 'left' );
40
41switch ( $action ) {
42case 'help':
43 $out_string = _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
44 break;
45case 'subscribe':
46 $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.");
47 break;
48case 'unsubscribe':
49 $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.");
50}
51
52printf( $out_string, htmlspecialchars($send_to) );
53
54echo addForm('../../src/compose.php', 'post');
55
56
57$idents = get_identities();
58
59echo html_tag('p', '', 'center' ) . _("From:") . ' ';
60
61if (count($idents) > 1) {
62 echo '<select name="identity">';
63 foreach($idents as $nr=>$data) {
64 echo '<option value="' . $nr . '">' .
65 htmlspecialchars(
66 $data['full_name'].' <'.
67 $data['email_address'] . ">\n");
68 }
69 echo '</select>' . "\n" ;
70} else {
71 echo htmlspecialchars('"'.$idents[0]['full_name'].'" <'.$idents[0]['email_address'].'>');
72}
73
74echo '<br />'
75. addHidden('send_to', $send_to)
76. addHidden('subject', $subject)
77. addHidden('body', $body)
78. addHidden('mailbox', $mailbox)
79. addSubmit(_("Send Mail"), 'send')
80. '<br /><br /></center>'
81. '</form></td></tr></table></p></body></html>';
82?>