$msg_cnt_str, $paginator_str, $start_msg);
+ echo '<table bgcolor="' . $color[0] . '" border="0" width="100%" cellpadding="1" cellspacing="0"><tr><td>';
printHeader($mailbox, $srt, $color, !$thread_sort_messages);
displayMessageArray($imapConnection, $num_msgs, $start_msg,
$msort, $mailbox, $sort, $color, $show_num,0,0);
mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $color);
+ echo '</td></tr></table>';
/**
* TODO: Switch to using $_SESSION[] whenever we ditch the 4.0.x series.
function printHeader($mailbox, $sort, $color, $showsort=true) {
global $index_order;
- echo html_tag( 'table' ,'' , '', $color[9], 'border="0" width="100%" cellpadding="1" cellspacing="1"' );
+ echo html_tag( 'table' ,'' , '', $color[4], 'border="0" width="100%" cellpadding="1" cellspacing="0"' );
echo html_tag( 'tr' ,'' , 'center', $color[5] );
for ($i=1; $i <= count($index_order); $i++) {
switch ($index_order[$i]) {
}
function changed() {
- return ($this->value !== $this->new_value);
+ return ($this->value != $this->new_value);
}
}
'<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>');
echo "</td>\n".
" </tr>\n".
- "</table>\n\n";
+ "</table><br>\n\n";
}
/* blatently copied/truncated/modified from the above function */
}
echo "<form action=options.php method=post name=options>" .
- "<br><center><table width=95% bgcolor=\"$color[5]\"><tr><td>".
+ "<center><table width=95% bgcolor=\"$color[5]\"><tr><td>".
"<table width=100% cellspacing=0 bgcolor=\"$color[4]\">" ,
"<tr bgcolor=\"$color[5]\"><th colspan=2>" . _("Configuration Administrator") . "</th></tr>";
'</font>';
}
-?>
\ No newline at end of file
+?>
$filters = load_filters();
$filters_user_scan = getPref($data_dir, $username, 'filters_user_scan');
- echo '<br>' .
- html_tag( 'table',
+ echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td',
'<center><b>' . _("Options") . ' - ' . _("Message Filtering") . '</b></center>' ,
// Set $allowsound to false if you don't want sound files available
$allowsound = "true";
- echo '<br>' .
- html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . "\n" .
+ echo html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . "\n" .
html_tag( 'tr', "\n" .
html_tag( 'td', '<b>' . _("Options") . ' - ' . _("New Mail Notification") . '</b>', 'center', $color[0] )
) . "\n" .
}
?>
- <br>
- <table width="100%" align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
+ <table width="95%" align=center border=0 cellpadding=1 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
<center><b><?php echo _("Options") . ' - '. _("Translator"); ?></b></center>
</td></tr></table>
if ($mail_sent == 'yes') {
echo '<BR><CENTER><B>'. _("Your Message has been sent").'</CENTER></B>';
}
- echo '<TABLE WIDTH="100%" ALIGN=center CELLSPACING=0 BORDER=0>' . "\n";
+ echo '<TABLE ALIGN=center CELLSPACING=0 BORDER=0>' . "\n";
if ($compose_new_win == '1') {
echo '<TABLE ALIGN=CENTER BGCOLOR="'.$color[0].'" WIDTH="100%" BORDER=0>'."\n";
echo ' <TR><TD></TD><TD ALIGN="RIGHT"><INPUT TYPE="BUTTON" NAME="Close" onClick="return self.close()" VALUE='._("Close").'></TD></TR>'."\n";
if ($location_of_buttons == 'bottom') {
showComposeButtonRow();
} else {
- echo ' <TR><TD COLSPAN=2 ALIGN=LEFT>';
- echo ' <INPUT TYPE=SUBMIT NAME=send VALUE="' . _("Send") . '"></TD></TR>' . "\n";
+ echo ' <TR><TD COLSPAN=2 ALIGN=RIGHT>';
+ echo ' <INPUT TYPE=SUBMIT NAME=send VALUE="' . _("Send") . '">';
+ echo ' <BR><BR>';
+ echo ' </TD></TR>' . "\n";
}
/* This code is for attachments */
if ($mdn_user_support) {
echo "\n\t". _("Receipt") .': '.
'<input type="checkbox" name="request_mdn" value=1'.
- ($request_mdn=='1'?' checked':'') .'>'. _("On read").
+ ($request_mdn=='1'?' checked':'') .'>'. _("On Read").
' <input type="checkbox" name="request_dr" value=1'.
($request_dr=='1'?' checked':'') .'>'. _("On Delivery");
}
echo " <input type=submit name=\"html_addr_search\" value=\"".
_("Addresses")."\">";
}
- echo "\n <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
if ($save_as_draft) {
echo '<input type="submit" name ="draft" value="' . _("Save Draft") . "\">\n";
}
+ echo "\n <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
do_hook('compose_button_row');
echo " </TD></TR>\n\n";
displayPageHeader($color, 'None');
echo '<br>' .
- html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="2" cellspacing="0" border="0"' ) .
+ html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) .
html_tag( 'tr' ) .
html_tag( 'td', '', 'center' ) . '<b>' . _("Folders") . '</b>' .
html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) .
-echo '<br>' .
- html_tag( 'table',
+echo html_tag( 'table',
html_tag( 'tr',
html_tag( 'td','<center><b>' . _("Help") .'</b></center>', 'center', $color[0] )
) ,
- 'center', '', 'width="95%" cellpadding="2" cellspacing="2" border="0"' );
+ 'center', '', 'width="95%" cellpadding="1" cellspacing="2" border="0"' );
do_hook("help_top");
$collapse_folders =
getPref($data_dir, $username, 'collapse_folders', SMPREF_ON);
-/* show_html_default is a int value. */
$show_html_default =
- intval(getPref($data_dir, $username, 'show_html_default', SMPREF_OFF));
+ getPref($data_dir, $username, 'show_html_default', SMPREF_OFF);
+
+$enable_forward_as_attachment =
+ getPref($data_dir, $username, 'enable_forward_as_attachment', SMPREF_ON);
$show_xmailer_default =
getPref($data_dir, $username, 'show_xmailer_default', SMPREF_OFF );
/* Remove Debug Mode Until Needed
echo "name = '$option->name', "
. "value = '$option->value', "
- . "new_value = '$option->new_value'<br>\n";
+ . "new_value = '$option->new_value'\n";
+ echo "<br>";
*/
if ($option->changed()) {
$option->save();
$optpage_title .= " - $optpage_name";
}
-echo '<br>' .
- html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="2" cellspacing="0" border="0"' ) . "\n" .
+echo html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) . "\n" .
html_tag( 'tr' ) . "\n" .
html_tag( 'td', '', 'center' ) .
"<b>$optpage_title</b><br>\n".
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
- 'name' => 'include_self_reply_all',
- 'caption' => _("Include Me in CC when I Reply All"),
+ 'name' => 'enable_forward_as_attachment',
+ 'caption' => _("Enable Forward as Attachment"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_NONE
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'forward_cc',
- 'caption' => _("Include CCs when forwarding messages"),
+ 'caption' => _("Include CCs when Forwarding Messages"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'include_self_reply_all',
+ 'caption' => _("Include Me in CC when I Reply All"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_NONE
);
if ($default_use_mdn) {
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'mdn_user_support',
- 'caption' => _("Enable request/confirm reading"),
+ 'caption' => _("Enable Mail Delivery Notification"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_NONE
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'compose_new_win',
- 'caption' => _("Always compose in a new window"),
+ 'caption' => _("Compose Messages in New Window"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_ALL
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'compose_width',
- 'caption' => _("Width of compose window"),
+ 'caption' => _("Width of Compose Window"),
'type' => SMOPT_TYPE_INTEGER,
'refresh' => SMOPT_REFRESH_ALL,
'size' => SMOPT_SIZE_TINY
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'compose_height',
- 'caption' => _("Height of compose window"),
+ 'caption' => _("Height of Compose Window"),
'type' => SMOPT_TYPE_INTEGER,
'refresh' => SMOPT_REFRESH_ALL,
'size' => SMOPT_SIZE_TINY
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'sig_first',
- 'caption' => _("Append signature before reply/forward text"),
+ 'caption' => _("Append Signature before Reply/Forward Text"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_NONE
);
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'internal_date_sort',
- 'caption' => _("Use receive date for sort"),
+ 'caption' => _("Enable Sort by of Receive Date"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_ALL
);
if ($allow_thread_sort == TRUE) {
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'sort_by_ref',
- 'caption' => _("Use References header for thread sort"),
+ 'caption' => _("Enable Thread Sort by References Header"),
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_ALL
);
}
displayPageHeader($color, 'None');
-echo '<br>' .
+echo
html_tag( 'table', "\n" .
html_tag( 'tr', "\n" .
- html_tag( 'td', '<center><b>' . _("Options") . ' - ' . _("Message Highlighting") . '</b></center>',
- 'left', $color[0] )
- ) ,
-'center', '', 'width="95% border="0" cellpadding="2" cellspacing="0"' ) . "<br>\n" .
-html_tag( 'table', '', '', '', 'width="100% border="0" cellpadding="0" cellspacing="0"' ) .
+ html_tag( 'td', '<center><b>' . _("Options") . ' - ' . _("Message Highlighting") . '</b></center>', 'left')
+ ),
+ 'center', $color[9], 'width="95% border="0" cellpadding="1" cellspacing="0"' ) . "<br>\n" .
+html_tag( 'table', '', '', '', 'width="100% border="0" cellpadding="1" cellspacing="0"' ) .
html_tag( 'tr' ) . "\n" .
html_tag( 'td', '', 'left' );
}
displayPageHeader($color, 'None');
- echo '<br>' .
- html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
+ echo
+ html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) .
html_tag( 'tr' ) .
html_tag( 'td', '', 'center', $color[0] ) .
'<b>' . _("Options") . ' - ' . _("Index Order") . '</b>' .
- html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) .
+ html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="8" cellspacing="0"' ) .
html_tag( 'tr' ) .
html_tag( 'td', '', 'center', $color[4] );
echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
/* headers (we use table because translations are not all the same width) */
- html_tag( 'table', '', '', '', 'width="100%" cellspacing="0" cellpadding="0" border="0"' ) .
+ html_tag( 'table', '', 'center', '', 'cellspacing="0" cellpadding="0" border="0"' ) .
html_tag( 'tr',
html_tag( 'td', _("From").' ', 'left' ,'','valign="top"') .
html_tag( 'td', htmlentities($from), 'left' )
"</script>\n", FALSE );
-echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
+echo "<body text='$color[8]' bgcolor='$color[3]' link='$color[7]' vlink='$color[7]' alink='$color[7]'>\n" .
//'<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><tr><td valign="middle" align="center">'.
html_tag( 'div',
'<b>'.
'<form>'.
'<input type="button" value="' . _("Print") . '" onClick="printPopup()"> '.
- '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()">'.
+ '<input type="button" value="' . _("Close") . '" onClick="window.parent.close()">'.
'</form>'.
'</b>',
- 'center' );
+ 'right' );
//'</td></tr></table>'.
'</body></html>'. "\n";
break;
}
}
- }
- elseif ($sort == 6 && !$allow_server_sort &&
+ } else if ($sort == 6 && !$allow_server_sort &&
!$thread_sort_messages ) {
if ($passed_id != 1) {
$result = $passed_id - 1;
}
- }
- elseif (!$allow_server_sort && !$thread_sort_messages ) {
+ } else if (!$allow_server_sort && !$thread_sort_messages ) {
if (!is_array($msort)) {
return -1;
}
break;
}
}
- }
- elseif ($sort == 6 && !$allow_server_sort &&
+ } else if ($sort == 6 && !$allow_server_sort &&
!$thread_sort_messages) {
if ($passed_id != $numMessages) {
$result = $passed_id + 1;
}
- }
- elseif (!$thread_sort_messages && !$allow_server_sort) {
+ } else if (!$thread_sort_messages && !$allow_server_sort) {
if (!is_array($msort)) {
return -1;
}
prev($msort);
$key = key($msort);
if (isset($key)) {
- echo $msort[$key];
+ //echo $msort[$key]; /* Why again were we echoing here? */
$result = $msgs[$key]['ID'];
break;
}
function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response) {
global $base_uri, $sent_folder, $draft_folder, $where, $what, $color, $sort,
- $startMessage, $compose_new_win, $PHP_SELF, $save_as_draft;
+ $startMessage, $compose_new_win, $PHP_SELF, $save_as_draft,
+ $enable_forward_as_attachment;
$topbar_delimiter = ' | ';
$urlMailbox = urlencode($mailbox);
}
$s .= '<a href="'. $msgs_url.'">'.$msgs_str.'</a>';
$s .= $topbar_delimiter;
-
+
$delete_url = $base_uri . 'src/delete_message.php?mailbox='.$urlMailbox.
'&message='.$passed_id.'&';
if (!(isset($passed_ent_id) && $passed_ent_id)) {
}
$s .= $topbar_delimiter;
- $comp_action_uri = $comp_uri . '&action=forward_as_attachment';
- if ($compose_new_win == '1') {
- $s .= '<a href="javascript:void(0)" '.
- 'onclick="comp_in_new(\''.$comp_action_uri.'\')">'._("Forward as Attachment").'</a>';
- } else {
- $s .= '<a href="'.$comp_action_uri.'">'._("Forward as Attachment").'</a>';
+ if ($enable_forward_as_attachment) {
+ $comp_action_uri = $comp_uri . '&action=forward_as_attachment';
+ if ($compose_new_win == '1') {
+ $s .= '<a href="javascript:void(0)" '.
+ 'onclick="comp_in_new(\''.$comp_action_uri.'\')">'._("Forward as Attachment").'</a>';
+ } else {
+ $s .= '<a href="'.$comp_action_uri.'">'._("Forward as Attachment").'</a>';
+ }
+ $s .= $topbar_delimiter;
}
- $s .= $topbar_delimiter;
-
$comp_action_uri = decodeHeader($comp_uri . '&action=reply');
}
-
-/*
- * Main of read_boby.php --------------------------------------------------
- */
+/***************************/
+/* Main of read_boby.php */
+/***************************/
/*
Urled vars
$mailbox = urldecode( $mailbox );
}
-$imapConnection = sqimap_login($username, $key, $imapServerAddress,
- $imapPort, 0);
-
+$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
if (!isset($messages)) {
do_hook('html_top');
-/* =============================================================================
- * block for handling incoming url vars
- *
- * =============================================================================
- */
+/****************************************/
+/* Block for handling incoming url vars */
+/****************************************/
if (isset($sendreceipt)) {
if ( !$message->is_mdnsent ) {
ClearAttachments();
}
}
-/* =============================================================================
- * end block for handling incoming url vars
- *
- * =============================================================================
- */
+/***********************************************/
+/* End of block for handling incoming url vars */
+/***********************************************/
+
$msgs[$passed_id]['FLAG_SEEN'] = true;
$messagebody = '';
displayPageHeader($color, $mailbox);
formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response);
formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);
-echo '<table width="100%" cellpadding="0" cellspacing="5" align="center" border="0">';
-echo ' <tr><td>';
-echo ' <table width="100%" cellpadding="1" cellspacing="0" align="center"'.' border="0" bgcolor="'.$color[9].'">';
+echo '<table width="100%" cellpadding="0" cellspacing="0" align="center" border="0">';
+echo ' <tr><td>';
+echo ' <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="'.$color[9].'">';
echo ' <tr><td>';
-echo ' <table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
-echo ' <tr bgcolor="'.$color[4].'"><td>'.$messagebody. '</td></tr>';
-echo ' </table></td></tr>';
-echo ' </table>';
-echo ' </td></tr>';
+echo ' <table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
+echo ' <tr bgcolor="'.$color[4].'"><td>';
+echo ' <table cellpadding="0" cellspacing="0" align="center" border="0">';
+echo ' <tr><td><br>' . $messagebody . '</td></td>';
+echo ' </table>';
+echo ' </td></tr>';
+echo ' </table></td></tr>';
+echo ' </table>';
+echo ' </td></tr>';
$attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id);
if ($attachmentsdisplay) {
- echo ' <tr><td>';
- echo ' <table width="100%" cellpadding="1" cellspacing="0" align="center"'.' border="0" bgcolor="'.$color[9].'">';
+ echo ' <tr><td>';
+ echo ' <table width="100%" cellpadding="1" cellspacing="0" align="center"'.' border="0" bgcolor="'.$color[9].'">';
echo ' <tr><td>';
echo ' <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="'.$color[4].'">';
- echo ' <tr><td ALIGN="left" bgcolor="'.$color[9].'"><b>';
- echo _("Attachments").':</b></td></tr><tr><td>';
- echo ' <table width="100%" cellpadding="2" cellspacing="2" align="center"'.' border="0" bgcolor="'.$color[0].'">';
- echo $attachmentsdisplay;
- echo ' </td></tr></table></table></td></tr>';
+ echo ' <tr><td ALIGN="left" bgcolor="'.$color[9].'">';
+ echo ' <b>' . _("Attachments") . ':</b>';
+ echo ' </td></tr>';
+ echo ' <tr><td>';
+ echo ' <table width="100%" cellpadding="2" cellspacing="2" align="center"'.' border="0" bgcolor="'.$color[0].'"><tr><td>';
+ echo $attachmentsdisplay;
+ echo ' </td></tr></table>';
+ echo ' </table></td></tr>';
echo ' </table></td></tr>';
- echo ' </table>';
- echo ' </td></tr>';
+ echo ' </table>';
+ echo ' </td></tr>';
}
echo '</table>';
} else {
displayPageHeader($color, $mailbox);
}
-echo "<br>\n";
do_hook('right_main_after_header');
if (isset($note)) {
echo html_tag( 'div', '<b>' . $note .'</b>', 'center' ) . "<br>\n";
do_hook('search_before_form');
-echo "<br>\n".
- html_tag( 'table',
+echo html_tag( 'table',
html_tag( 'tr', "\n" .
html_tag( 'td', '<b>' . _("Search") . '</b>', 'center', $color[0] )
) ,