Replacing deprecated HTML "center" element (second try).
[squirrelmail.git] / plugins / listcommands / mailout.php
CommitLineData
73ee43b1 1<?php
793566f0 2
519f07d7 3/**
4 * mailout.php
73ee43b1 5 *
47ccfad4 6 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
4b4abf93 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
793566f0 8 * @version $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');
793566f0 23include_once(SM_PATH . 'plugins/listcommands/functions.php');
73ee43b1 24
6a85a764 25/* get globals */
b587ac51 26sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
27sqgetGlobalVar('send_to', $send_to, SQ_GET);
28sqgetGlobalVar('subject', $subject, SQ_GET);
29sqgetGlobalVar('body', $body, SQ_GET);
30sqgetGlobalVar('action', $action, SQ_GET);
6a85a764 31
793566f0 32displayPageHeader($color, $mailbox);
33$fieldsdescr = listcommands_fieldsdescr();
34
73ee43b1 35switch ( $action ) {
793566f0 36 case 'help':
37 $out_string = _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
38 break;
39 case 'subscribe':
40 $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.");
41 break;
42 case 'unsubscribe':
43 $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 44 break;
45 default:
46 error_box(sprintf(_("Unknown action: %s"),htmlspecialchars($action)), $color);
47 exit;
73ee43b1 48}
49
a6d3eff6 50echo html_tag('p', '', 'left' ) .
51 html_tag( 'table', '', 'center', $color[0], 'border="0" width="75%"' ) . "\n" .
52 html_tag( 'tr',
53 html_tag( 'th', _("Mailinglist") . ': ' . $fieldsdescr[$action], '', $color[9] )
54 ) .
55 html_tag( 'tr' ) .
56 html_tag( 'td', '', 'left' );
57
793566f0 58printf($out_string, '&quot;' . htmlspecialchars($send_to) . '&quot;');
73ee43b1 59
793566f0 60echo addForm(SM_PATH . 'src/compose.php', 'post');
73ee43b1 61
27544ac4 62$idents = get_identities();
63
4cf43843 64echo html_tag('p', '', 'center' ) . _("From:") . ' ';
73ee43b1 65
27544ac4 66if (count($idents) > 1) {
67 echo '<select name="identity">';
68 foreach($idents as $nr=>$data) {
69 echo '<option value="' . $nr . '">' .
70 htmlspecialchars(
793566f0 71 $data['full_name'].' <'.
72 $data['email_address'] . ">\n");
050722c4 73 }
73ee43b1 74 echo '</select>' . "\n" ;
050722c4 75} else {
15ac78fe 76 echo htmlspecialchars('"'.$idents[0]['full_name'].'" <'.$idents[0]['email_address'].'>');
050722c4 77}
78
793566f0 79echo '<br />' .
80 addHidden('send_to', $send_to) .
81 addHidden('subject', $subject) .
82 addHidden('body', $body) .
83 addHidden('mailbox', $mailbox) .
84 addSubmit(_("Send Mail"), 'send');
85?>
c49cc6db 86<br /><br />
793566f0 87</form></td></tr></table></p></body></html>