- $comp_uri = $base_uri . 'src/compose.php'.
- '?passed_id='.$passed_id.
- '&mailbox='.$urlMailbox.
- (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:'');
-
- if (($mailbox == $draft_folder) && ($save_as_draft)) {
- $comp_alt_uri = $comp_uri . '&action=draft';
- $comp_alt_string = _("Resume Draft");
- } else if ($mailbox == $sent_folder) {
- $comp_alt_uri = $comp_uri . '&action=edit_as_new';
- $comp_alt_string = _("Edit Message as New");
- }
- if (isset($comp_alt_uri)) {
- $s .= $topbar_delimiter;
- if ($compose_new_win == '1') {
- $s .= '<a href="javascript:void(0)" '.
- 'onclick="comp_in_new(\''.$comp_alt_uri.'\')">'.$comp_alt_string.'</a>';
- } else {
- $s .= '<a href="'.$comp_alt_uri.'">'.$comp_alt_string.'</a>';
- }
- }
-
- $s .= '</small></td><td align="center" width="33%"><small>';
-
- if (!(isset($where) && isset($what)) && !$passed_ent_id) {
- $prev = findPreviousMessage($mbx_response['EXISTS'], $passed_id);
- $next = findNextMessage($passed_id);
- if ($prev != -1) {
- $uri = $base_uri . 'src/read_body.php?passed_id='.$prev.
- '&mailbox='.$urlMailbox.'&sort='.$sort.
- '&startMessage='.$startMessage.'&show_more=0';
- $s .= '<a href="'.$uri.'">'._("Previous").'</a>';
- } else {
- $s .= _("Previous");
- }
- $s .= $topbar_delimiter;
- if ($next != -1) {
- $uri = $base_uri . 'src/read_body.php?passed_id='.$next.
- '&mailbox='.$urlMailbox.'&sort='.$sort.
- '&startMessage='.$startMessage.'&show_more=0';
- $s .= '<a href="'.$uri.'">'._("Next").'</a>';
- } else {
- $s .= _("Next");
- }
- } else if (isset($passed_ent_id) && $passed_ent_id) {
- /* code for navigating through attached message/rfc822 messages */
- $url = set_url_var($PHP_SELF, 'passed_ent_id',0);
- $s .= '<a href="'.$url.'">'._("View Message").'</a>';
- $par_ent_id = $message->parent->entity_id;
- if ($par_ent_id) {
- $par_ent_id = substr($par_ent_id,0,-2);
- $s .= $topbar_delimiter;
- $url = set_url_var($PHP_SELF, 'passed_ent_id',$par_ent_id);
- $s .= '<a href="'.$url.'">'._("Up").'</a>';
- }
- }
-
- $s .= '</small></td><td align="right" width="33%" nowrap><small>';
- $comp_action_uri = $comp_uri . '&action=forward';
- if ($compose_new_win == '1') {
- $s .= '<a href="javascript:void(0)" '.
- 'onclick="comp_in_new(\''.$comp_action_uri.'\')">'._("Forward").'</a>';
- } else {
- $s .= '<a href="'.$comp_action_uri.'">'._("Forward").'</a>';
- }
- $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>';
- }
- $s .= $topbar_delimiter;