Source for file setup.php

Documentation is available at setup.php

  1. <?php
  2.  
  3. /**
  4.  * setup.php
  5.  *
  6.  * Copyright (c) 1999-2006 The SquirrelMail Project Team
  7.  * Licensed under the GNU GPL. For full terms see the file COPYING.
  8.  *
  9.  * This is a standard Squirrelmail-1.2 API for plugins.
  10.  *
  11.  * $Id: setup.php,v 1.6.2.5 2006/02/03 22:27:52 jervfors Exp $
  12.  */
  13.  
  14. /* This button fills out a form with your setup information already
  15.    gathered -- all you have to do is type. */
  16.  
  17.  
  18. /* Initialize the bug report plugin */
  19.     global $squirrelmail_plugin_hooks;
  20.  
  21.     $squirrelmail_plugin_hooks['menuline']['bug_report''bug_report_button';
  22.     $squirrelmail_plugin_hooks['options_display_inside']['bug_report''bug_report_options';
  23.     $squirrelmail_plugin_hooks['options_display_save']['bug_report''bug_report_save';
  24.     $squirrelmail_plugin_hooks['loading_prefs']['bug_report''bug_report_load';
  25. }
  26.  
  27.  
  28. /* Show the button in the main bar */
  29. function bug_report_button({
  30.     global $color$bug_report_visible;
  31.  
  32.     if ($bug_report_visible{
  33.         return;
  34.     }
  35.  
  36.     displayInternalLink('plugins/bug_report/bug_report.php'_("Bug")'');
  37.     echo "&nbsp;&nbsp;\n";
  38. }
  39.  
  40.  
  41. function bug_report_save({
  42.     global $username,$data_dir;
  43.  
  44.     ifsqgetGlobalVar('bug_report_bug_report_visible'$visSQ_POST) ) {
  45.         setPref($data_dir$username'bug_report_visible''1');
  46.     else {
  47.         setPref($data_dir$username'bug_report_visible''');
  48.     }
  49. }
  50.  
  51.  
  52. function bug_report_load({
  53.     global $username$data_dir;
  54.     global $bug_report_visible;
  55.  
  56.     $bug_report_visible getPref($data_dir$username'bug_report_visible');
  57. }
  58.  
  59.  
  60. function bug_report_options({
  61.     global $bug_report_visible;
  62.  
  63.     echo '<tr>' html_tag('td',_("Bug Reports:"),'right','','nowrap'"\n" .
  64.          '<td><input name="bug_report_bug_report_visible" type=checkbox';
  65.     if ($bug_report_visible{
  66.         echo ' checked';
  67.     }
  68.     echo ' /> ' _("Show button in toolbar""</td></tr>\n";
  69. }
  70.  
  71. ?>

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