setup.php 1.2 KB

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