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