Source for file setup.php

Documentation is available at setup.php

  1. <?php
  2.  
  3. /**
  4.  * Message Details plugin - main setup script
  5.  *
  6.  * Plugin to view the RFC822 raw message output and the bodystructure of a message
  7.  *
  8.  * @author Marc Groot Koerkamp
  9.  * @copyright 2002 Marc Groot Koerkamp, The Netherlands
  10.  * @copyright 2002-2020 The SquirrelMail Project Team
  11.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  12.  * @version $Id: setup.php 14840 2020-01-07 07:42:38Z pdontthink $
  13.  * @package plugins
  14.  * @subpackage message_details
  15.  ***/
  16.  
  17. /**
  18.  * Initialize the plugin
  19.  * @access private
  20.  */
  21. function squirrelmail_plugin_init_message_details()
  22. {
  23.   global $squirrelmail_plugin_hooks;
  24.  
  25.   $squirrelmail_plugin_hooks['read_body_header_right']['message_details''show_message_details';
  26. }
  27.  
  28. /**
  29.  * Add message details link in message view
  30.  * @access private
  31.  */
  32. function show_message_details({
  33.     global $passed_id$mailbox$passed_ent_id$color,
  34.            $javascript_on;
  35.  
  36.     if (strlen(trim($mailbox)) 1{
  37.         $mailbox 'INBOX';
  38.     }
  39.  
  40.     $params '?passed_ent_id=' $passed_ent_id .
  41.               '&mailbox=' urlencode($mailbox.
  42.               '&passed_id=' $passed_id;
  43.  
  44.     $print_text _("View Message Details");
  45.  
  46.     $result '';
  47.     /* Output the link. */
  48.     if ($javascript_on{
  49.         $result '<script type="text/javascript" language="javascript">' "\n" .
  50.                 '<!--' "\n" .
  51.                 "  function MessageSource() {\n" .
  52.                 '    window.open("../plugins/message_details/message_details_main.php' .
  53.                         $params '","MessageDetails","width=800,height=600");' "\n".
  54.                 "  }\n" .
  55.                 "// -->\n" .
  56.                 "</script>" .
  57.                 "&nbsp;| <a href=\"javascript:MessageSource();\" style=\"white-space: nowrap;\">$print_text</a>";
  58.     }
  59.     echo $result;
  60. }

Documentation generated on Mon, 13 Jan 2020 04:25:16 +0100 by phpDocumentor 1.4.3