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