if ($thread_sort_messages || $allow_server_sort ) {
foreach($server_sort_array as $key=>$value) {
if ($passed_id == $value) {
- if ($key == 0) {
- break;
+ if ($key != 0) {
+ $result = $server_sort_array[$key - 1];
}
- $result = $server_sort_array[$key - 1];
break;
}
}
// Start form for reply/reply all/forward..
$target = '';
$on_click='';
- $method='method="get" ';
+ $method='method="post" ';
if ($compose_new_win == '1') {
if ( $javascript_on ) {
$on_click=' onclick="comp_in_new_form(\''.$comp_uri.'\', this, this.form)"';
$comp_uri = 'javascript:void(0)';
+ $method='method="get" ';
} else {
$target = 'target="_blank"';
- $method='method="post" ';
}
}
- $menu_row .= "\n".'<form name="composeForm" action="'.$comp_uri.'" '.$method.$target.'><small>'."\n";
+ $menu_row .= "\n".'<form name="composeForm" action="'.$comp_uri.'" '.$method.$target.' style="display: inline">'."\n";
// If Draft folder - create Resume link
if (($mailbox == $draft_folder) && ($save_as_draft)) {
$menu_row .= getButton('SUBMIT', 'smaction_reply_all', _("Reply All"), $on_click) ."\n";
$menu_row .= getButton('SUBMIT', 'smaction_forward', _("Forward"), $on_click);
if ($enable_forward_as_attachment)
- $menu_row .= '<input type="checkbox" name="smaction_attache">' . _("Attachment") ."\n";
+ $menu_row .= '<input type="checkbox" name="smaction_attache">' . _("As Attachment") .' '."\n";
- $menu_row .= '</form>'.' '."\n";
+ $menu_row .= '</form> ';
// Form for deletion
$delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox;
- $menu_row .= '<form action="'.$delete_url.'" method="post" style="display: inline"><small>';
+ $menu_row .= '<form action="'.$delete_url.'" method="post" style="display: inline">';
if (!(isset($passed_ent_id) && $passed_ent_id)) {
$menu_row .= '<input type="hidden" name="message" value="'.$passed_id.'" />';
else
$menu_row .= getButton('SUBMIT', 'delete', _("Delete"), '', FALSE) . "\n"; // delete button is disabled
- $menu_row .= '</form>' . "\n";
+ $menu_row .= '</form>';
// Add top move link
// Set subsequent location based on whether or not there is a 'next' message.
if ( isset($next) && $next >= 0 ) {
- $location = $base_uri . 'src/read_body.php?passed_id='.$next.'&';
+ $location = $base_uri . 'src/read_body.php?passed_id='.$next.'&';
+ } elseif (isset($prev) && $prev >= 0) {
+ $location = $base_uri . 'src/read_body.php?passed_id='.$prev.'&';
} else {
- $location = $base_uri . 'src/right_main.php?';
+ $location = $base_uri . 'src/right_main.php?';
}
- $menu_row .= '<form action="'.$base_uri.'src/move_messages.php?'.$current_box.'" method="post">'.
+ $menu_row .= '<form action="'.$base_uri.'src/move_messages.php?'.$current_box.'" method="post" style="display: inline">'.
'<small><input type="hidden" name="show_more" value="0" />'.
+ '<input type="hidden" name="dmn" value="1" />'.
'<input type="hidden" name="location" value="'.$location.$current_box.'" />'.
'<input type="hidden" name="msg[0]" value="'.$passed_id.'" />'._("Move to:") .
'<select name="targetMailbox" style="padding: 0px; margin: 0px">';