phpDoc fixes
[squirrelmail.git] / plugins / listcommands / mailout.php
CommitLineData
73ee43b1 1<?php
519f07d7 2/**
3 * mailout.php
73ee43b1 4 *
6c84ba1e 5 * Copyright (c) 1999-2005 The SquirrelMail Project Team
519f07d7 6 * Licensed under the GNU GPL. For full terms see the file COPYING.
7 *
8 * $Id$
ea5f4b8e 9 * @package plugins
10 * @subpackage listcommands
73ee43b1 11 */
050722c4 12
ea5f4b8e 13/** @ignore */
8d6a115b 14define('SM_PATH','../../');
cdf82d4a 15
16/* SquirrelMail required files. */
17require_once(SM_PATH . 'include/validate.php');
18include_once(SM_PATH . 'functions/page_header.php');
aa7fb30c 19include_once(SM_PATH . 'include/load_prefs.php');
cdf82d4a 20include_once(SM_PATH . 'functions/html.php');
27544ac4 21require_once(SM_PATH . 'functions/identity.php');
d8a8fe9f 22require_once(SM_PATH . 'functions/forms.php');
73ee43b1 23
24displayPageHeader($color, $mailbox);
25
6a85a764 26/* get globals */
b587ac51 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);
6a85a764 32
4cf43843 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' );
73ee43b1 40
41switch ( $action ) {
83feb57a 42case 'help':
519f07d7 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.");
73ee43b1 44 break;
83feb57a 45case 'subscribe':
519f07d7 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.");
73ee43b1 47 break;
83feb57a 48case 'unsubscribe':
050722c4 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.");
73ee43b1 50}
51
52printf( $out_string, htmlspecialchars($send_to) );
53
c435f076 54echo addForm('../../src/compose.php', 'post');
73ee43b1 55
73ee43b1 56
27544ac4 57$idents = get_identities();
58
4cf43843 59echo html_tag('p', '', 'center' ) . _("From:") . ' ';
73ee43b1 60
27544ac4 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");
050722c4 68 }
73ee43b1 69 echo '</select>' . "\n" ;
050722c4 70} else {
15ac78fe 71 echo htmlspecialchars('"'.$idents[0]['full_name'].'" <'.$idents[0]['email_address'].'>');
050722c4 72}
73
b1379bdf 74echo '<br />'
d8a8fe9f 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>'
dcc1cc82 81. '</form></td></tr></table></p></body></html>';
91e0dccc 82?>