*/
require_once('../functions/strings.php');
+require_once('../functions/imap_utf7_decode_local.php');
/* Default value for page_selector_max. */
define('PG_SEL_MAX', 10);
$stuff = true;
}
if ($default_use_priority) {
- if ( ($msg['PRIORITY'][0] == 1) || ($msg['PRIORITY'][0] == 2) ) {
+ if ( ($msg['PRIORITY'] == 1) || ($msg['PRIORITY'] == 2) ) {
echo "<font color=\"$color[1]\">!</font>\n";
$stuff = true;
}
- if ($msg['PRIORITY'][0] == 5) {
+ if ($msg['PRIORITY'] == 5) {
echo "<font color=\"$color[8]\">?</font>\n";
$stuff = true;
}
$messages[$j]['FLAG_FLAGGED'] = true;
}
$num++;
-*/
}
+*/
$j++;
+
}
/*
* $Message is a message that is centered on top of the list
* $More is a second line that is left aligned
*/
+
function mail_message_listing_beginning ($imapConnection, $moveURL,
$mailbox = '', $sort = -1,
$msg_cnt_str = '',
$start_msg = 1) {
global $color, $index_order, $auto_expunge, $move_to_trash, $base_uri,
$checkall, $sent_folder, $draft_folder, $thread_sort_messages,
- $allow_thread_sort, $allow_server_sort, $server_sort_order;
+ $allow_thread_sort, $allow_server_sort, $server_sort_order,
+ $lastTargetMailbox;
+
$urlMailbox = urlencode($mailbox);
/*
* This is the beginning of the message list table.
* It wraps around all messages
*/
- echo "<FORM name=messageList method=post action=\"$moveURL\">\n"
+ echo "<FORM name=\"messageList\" method=post action=\"$moveURL\">\n"
. "<TABLE WIDTH=\"100%\" BORDER=\"0\" CELLPADDING=\"1\" "
. "CELLSPACING=\"0\">\n<TR BGCOLOR=\"$color[0]\"><TD>"
. " <TABLE BGCOLOR=\"$color[4]\" width=\"100%\" CELLPADDING=\"2\" "
. " </TR></TABLE>\n"
. '</TD></TR>'
. "<TR><TD BGCOLOR=\"$color[0]\">\n"
- . "<TABLE BGCOLOR=\"$color[0]\" COLS=2 BORDER=0 cellpadding=0"
+ . "<TABLE BGCOLOR=\"$color[0]\" BORDER=0 cellpadding=0 "
. "cellspacing=0 width=\"100%\">\n"
. " <TR>\n"
. " <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>\n"
foreach ($boxes as $boxes_part) {
if (!in_array('noselect', $boxes_part['flags'])) {
$box = $boxes_part['unformatted'];
- $box2 = str_replace(' ', ' ', $boxes_part['unformatted-disp']);
+ $box2 = imap_utf7_decode_local(
+ str_replace(' ', ' ', $boxes_part['unformatted-disp']));
if( $box2 == 'INBOX' ) {
$box2 = _("INBOX");
}
- echo " <OPTION VALUE=\"$box\">$box2</option>\n";
+ if ($lastTargetMailbox == $box) {
+ echo " <OPTION VALUE=\"$box\" SELECTED>$box2</OPTION>\n";
+ }
+ else {
+ echo " <OPTION VALUE=\"$box\">$box2</OPTION>\n";
+ }
}
}
echo ' </SELECT></TT> '
if ($allow_thread_sort == TRUE) {
if ($thread_sort_messages == 1 ) {
$set_thread = 2;
- $thread_name = 'Unthread View';
+ $thread_name = _("Unthread View");
}
elseif ($thread_sort_messages == 0) {
$set_thread = 1;
- $thread_name = 'Thread View';
+ $thread_name = _("Thread View");
}
echo '<tr><td> <a href=' . "$base_uri" . 'src/right_main.php?sort='
. "$sort" . '&start_messages=1&set_thread=' . "$set_thread"
- . '&mailbox=' . urlencode($mailbox) . '><small>' . _("$thread_name")
+ . '&mailbox=' . urlencode($mailbox) . '><small>' . $thread_name
. '</a></small> </td></tr>';
}
echo ' <a href="right_main.php?newsort=' . $which
. '&startMessage=1&mailbox=' . urlencode($mailbox)
. '"><IMG SRC="../images/' . $img
- . '" BORDER=0 WIDTH=12 HEIGHT=10></a>';
+ . '" BORDER=0 WIDTH=12 HEIGHT=10 ALT="sort"></a>';
}
function get_selectall_link($start_msg, $sort) {