73ee43b1 |
1 | <?php |
519f07d7 |
2 | /** |
3 | * mailout.php |
73ee43b1 |
4 | * |
76911253 |
5 | * Copyright (c) 1999-2003 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 |
14 | define('SM_PATH','../../'); |
cdf82d4a |
15 | |
16 | /* SquirrelMail required files. */ |
17 | require_once(SM_PATH . 'include/validate.php'); |
18 | include_once(SM_PATH . 'functions/page_header.php'); |
aa7fb30c |
19 | include_once(SM_PATH . 'include/load_prefs.php'); |
cdf82d4a |
20 | include_once(SM_PATH . 'functions/html.php'); |
27544ac4 |
21 | require_once(SM_PATH . 'functions/identity.php'); |
73ee43b1 |
22 | |
23 | displayPageHeader($color, $mailbox); |
24 | |
6a85a764 |
25 | /* get globals */ |
b587ac51 |
26 | sqgetGlobalVar('mailbox', $mailbox, SQ_GET); |
27 | sqgetGlobalVar('send_to', $send_to, SQ_GET); |
28 | sqgetGlobalVar('subject', $subject, SQ_GET); |
29 | sqgetGlobalVar('body', $body, SQ_GET); |
30 | sqgetGlobalVar('action', $action, SQ_GET); |
6a85a764 |
31 | |
4cf43843 |
32 | echo html_tag('p', '', 'left' ) . |
33 | html_tag( 'table', '', 'center', $color[0], 'border="0" width="75%"' ) . "\n" . |
34 | html_tag( 'tr', |
35 | html_tag( 'th', _("Mailinglist") . ' ' . _($action), '', $color[9] ) |
36 | ) . |
37 | html_tag( 'tr' ) . |
38 | html_tag( 'td', '', 'left' ); |
73ee43b1 |
39 | |
40 | switch ( $action ) { |
83feb57a |
41 | case 'help': |
519f07d7 |
42 | $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 |
43 | break; |
83feb57a |
44 | case 'subscribe': |
519f07d7 |
45 | $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 |
46 | break; |
83feb57a |
47 | case 'unsubscribe': |
050722c4 |
48 | $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 |
49 | } |
50 | |
51 | printf( $out_string, htmlspecialchars($send_to) ); |
52 | |
4cf43843 |
53 | echo '<form method="post" action="../../src/compose.php">'; |
73ee43b1 |
54 | |
73ee43b1 |
55 | |
27544ac4 |
56 | $idents = get_identities(); |
57 | |
4cf43843 |
58 | echo html_tag('p', '', 'center' ) . _("From:") . ' '; |
73ee43b1 |
59 | |
27544ac4 |
60 | if (count($idents) > 1) { |
61 | echo '<select name="identity">'; |
62 | foreach($idents as $nr=>$data) { |
63 | echo '<option value="' . $nr . '">' . |
64 | htmlspecialchars( |
65 | $data['full_name'].' <'. |
66 | $data['email_address'] . ">\n"); |
050722c4 |
67 | } |
73ee43b1 |
68 | echo '</select>' . "\n" ; |
050722c4 |
69 | } else { |
15ac78fe |
70 | echo htmlspecialchars('"'.$idents[0]['full_name'].'" <'.$idents[0]['email_address'].'>'); |
050722c4 |
71 | } |
72 | |
b1379bdf |
73 | echo '<br />' |
74 | . '<input type="hidden" name="send_to" value="' . htmlspecialchars($send_to) . '">' |
75 | . '<input type="hidden" name="subject" value="' . htmlspecialchars($subject) . '">' |
76 | . '<input type="hidden" name="body" value="' . htmlspecialchars($body) . '">' |
77 | . '<input type="hidden" name="mailbox" value="' . htmlspecialchars($mailbox) . '">' |
78 | . '<input type="submit" name="send" value="' . _("Send Mail") . '"><br /><br /></center>' |
79 | . '</form></td></tr></table></p></body></html>'; |
665ec685 |
80 | ?> |