| 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 | |
| 15 | /** @ignore */ |
| 16 | require_once(SM_PATH . 'plugins/administrator/auth.php'); |
| 17 | |
| 18 | /** |
| 19 | * Init the plugin |
| 20 | * @access private |
| 21 | */ |
| 22 | function squirrelmail_plugin_init_administrator() { |
| 23 | global $squirrelmail_plugin_hooks, $username; |
| 24 | |
| 25 | if ( adm_check_user() ) { |
| 26 | $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] = |
| 27 | 'squirrelmail_administrator_optpage_register_block'; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Register option block |
| 33 | * @access private |
| 34 | */ |
| 35 | function squirrelmail_administrator_optpage_register_block() { |
| 36 | global $optpage_blocks; |
| 37 | global $AllowSpamFilters; |
| 38 | |
| 39 | $optpage_blocks[] = array( |
| 40 | 'name' => _("Administration"), |
| 41 | 'url' => '../plugins/administrator/options.php', |
| 42 | 'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."), |
| 43 | 'js' => false |
| 44 | ); |
| 45 | } |
| 46 | ?> |