Source for file setup.php

Documentation is available at setup.php

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

Documentation generated on Sat, 07 Oct 2006 16:33:25 +0300 by phpDocumentor 1.3.0RC6