- if (isset($comp_alt_uri)) {
- $menu_row .= $topbar_delimiter;
- $menu_row .= makeComposeLink($comp_alt_uri, $comp_alt_string);
- $menu_row .= $topbar_delimiter;
- }
-
- $delete_link = _("Delete");
- if (!(isset($passed_ent_id) && $passed_ent_id)) {
- $delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox .
- '&message=' . $passed_id . '&';
-
- if ($where && $what) {
- $delete_url .= 'where=' . urlencode($where) . '&what=' . urlencode($what);
+ if (isset($comp_alt_string))
+ $menu_row .= getButton('SUBMIT', $new_button, $comp_alt_string, $on_click) . "\n";
+
+ $menu_row .= getButton('SUBMIT', 'smaction_reply', _("Reply"), $on_click) . "\n";
+ $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" />' . _("As Attachment") .' '."\n";
+
+ $menu_row .= '</form> ';
+
+ if ( in_array('\\deleted', $aMailbox['PERMANENTFLAGS'],true) ) {
+ // Form for deletion. Form is handled by the originating display in $where. This is right_main.php or search.php
+ $delete_url = $base_uri . "src/$where";
+ $menu_row .= '<form name="deleteMessageForm" action="'.$delete_url.'" method="post" style="display: inline">';
+
+ if (!(isset($passed_ent_id) && $passed_ent_id)) {
+ $menu_row .= addHidden('mailbox', $aMailbox['NAME']);
+ $menu_row .= addHidden('msg[0]', $passed_id);
+ $menu_row .= getButton('SUBMIT', 'delete', _("Delete"));
+ $menu_row .= '<input type="checkbox" name="bypass_trash" />' . _("Bypass Trash");