setup.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Administrator plugin - Setup script
  4. *
  5. * Plugin allows remote administration.
  6. *
  7. * @author Philippe Mingo
  8. * @copyright &copy; 1999-2007 The SquirrelMail Project Team
  9. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10. * @version $Id$
  11. * @package plugins
  12. * @subpackage administrator
  13. */
  14. /**
  15. * Init the plugin
  16. * @access private
  17. */
  18. function squirrelmail_plugin_init_administrator() {
  19. global $squirrelmail_plugin_hooks;
  20. $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
  21. 'squirrelmail_administrator_optpage_register_block';
  22. }
  23. /**
  24. * Register option block
  25. * @access private
  26. */
  27. function squirrelmail_administrator_optpage_register_block() {
  28. /** add authentication functions */
  29. include_once(SM_PATH . 'plugins/administrator/auth.php');
  30. if ( adm_check_user() ) {
  31. global $optpage_blocks;
  32. $optpage_blocks[] = array(
  33. 'name' => _("Administration"),
  34. 'url' => SM_PATH . 'plugins/administrator/options.php',
  35. 'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."),
  36. 'js' => false
  37. );
  38. }
  39. }