message_details_top.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Message Details plugin - top frame with buttons
  4. *
  5. * Plugin to view the RFC822 raw message output and the bodystructure of a message
  6. *
  7. * @author Marc Groot Koerkamp
  8. * @copyright 2002 Marc Groot Koerkamp, The Netherlands
  9. * @copyright 2002-2025 The SquirrelMail Project Team
  10. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  11. * @version $Id$
  12. * @package plugins
  13. * @subpackage message_details
  14. */
  15. /**
  16. * Include the SquirrelMail initialization file.
  17. */
  18. require('../../include/init.php');
  19. require(SM_PATH . 'functions/forms.php');
  20. displayHtmlHeader( _("Message Details"),
  21. "<script type=\"text/javascript\">\n".
  22. "<!--\n".
  23. "function printPopup() {\n".
  24. "parent.frames[1].focus();\n".
  25. "parent.frames[1].print();\n".
  26. "}\n".
  27. "-->\n".
  28. "</script>\n", FALSE );
  29. sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
  30. if (!sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET))
  31. $passed_ent_id = 0;
  32. sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
  33. echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
  34. '<div style="text-align: center;">' .
  35. addForm(SM_PATH . 'src/download.php', 'GET').
  36. addHidden('mailbox', $mailbox).
  37. addHidden('passed_id', $passed_id).
  38. addHidden('ent_id', $passed_ent_id).
  39. addHidden('absolute_dl', 'true').
  40. (checkForJavascript() ?
  41. '<input type="button" value="' . _("Print") . '" onclick="printPopup()" />&nbsp;&nbsp;'.
  42. '<input type="button" value="' . _("Close Window") . '" onclick="window.parent.close()" />&nbsp;&nbsp;' :'').
  43. addSubmit(_("Save Message")).
  44. '</form></div>'.
  45. '</body>'.
  46. "</html>\n";