- if ($MDN_to && (!isset( $sendreceipt ) || $sendreceipt == '' ) ) {
- if ( $message->is_mdnsent && $supportMDN) {
- $sendreceipt = 'removeMDN';
-
- $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
- $sendreceipt='';
- /*
- if ($MDNDebug ) {
- echo html_tag( 'tr', "\n" .
- html_tag( 'td', _("Read receipt") . ':', 'right', $color[9], 'valign="top"' ) .
- html_tag( 'td',
- '<b>' . _("send") . '</b> <a href="' . $url . '">[' . _("Remove MDN flag") . '] </a> ' ,
- 'left', $color[9], 'colspan="2" valign="top"' )
- ) . "\n";
- } else {
- */
- echo html_tag( 'tr', "\n" .
- html_tag( 'td', _("Read receipt") . ':', 'right', $color[9], 'valign="top"' ) .
- html_tag( 'td',
- '<b>' . _("send") . '</b> ' ,
- 'left', $color[9], 'colspan="2" valign="top"' )
- ) . "\n";
- /*
- }
- */
-
- } // when deleted or draft flag is set don't offer to send a MDN response
- else if ( $message->is_draft || $message->is_deleted) {
- echo html_tag( 'tr', "\n" .
- html_tag( 'td', _("Read receipt") . ':', 'right', $color[9], 'valign="top"' ) .
- html_tag( 'td',
- '<b>' . _("requested") . '</b> ' ,
- 'left', $color[9], 'colspan="2" valign="top"' )
- ) . "\n";
- }
- // if no MDNsupport don't use the annoying popup messages
- else if ( !$FirstTimeSee ) {
- $sendreceipt = 'send';
- $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
- echo html_tag( 'tr', "\n" .
- html_tag( 'td', _("Read receipt") . ':', 'right', $color[9], 'valign="top"' ) .
- html_tag( 'td',
- '<b>' . _("requested") . '</b> <a href="' . $url . '">[' . _("Send read receipt now") . ']</a>',
- 'left', $color[9], 'colspan="2" valign="top"' )
- ) . "\n";
- $sendreceipt='';
- }
- else {
- $sendreceipt = 'send';
- $url = "\"read_body.php?mailbox=$mailbox&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more&sendreceipt=$sendreceipt\"";
- if ($javascript_on) {
- echo "<script language=\"javascript\" type=\"text/javascript\"> \n" .
- '<!-- ' . "\n" .
- " if (window.confirm(\"" .
- _("The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?") .
- "\")) { \n" .
- ' window.open('.$url.',"right");' . "\n" .
- ' }' . "\n" .
- '// -->' . "\n" .
- '</script>' . "\n";
- }
- echo html_tag( 'tr', "\n" .
- html_tag( 'td', _("Read receipt") . ':', 'right', $color[9], 'valign="top"' ) .
- html_tag( 'td',
- '<b>' . _("requested") . '</b>  <a href="' . $url . '">[' . _("Send read receipt now") . ']</a>',
- 'left', $color[9], 'colspan="2" valign="top"' )
- ) . "\n";
- $sendreceipt = '';
- }
- }