abd7a3f8 |
1 | <?php |
2 | |
3 | /** |
4 | * setup.php |
5 | * |
82d304a0 |
6 | * Copyright (c) 1999-2004 The SquirrelMail Project Team |
abd7a3f8 |
7 | * Licensed under the GNU GPL. For full terms see the file COPYING. |
8 | * |
9 | * Administrator plugin. Allows remote administration. Philippe Mingo |
10 | * |
0df03ce7 |
11 | * @version $Id$ |
ea5f4b8e |
12 | * @package plugins |
13 | * @subpackage administrator |
abd7a3f8 |
14 | */ |
15 | |
ea5f4b8e |
16 | /** @ignore */ |
52a6105d |
17 | require_once(SM_PATH . 'plugins/administrator/auth.php'); |
7004cc32 |
18 | |
0df03ce7 |
19 | /** |
20 | * Init the plugin |
21 | * @access private |
22 | */ |
abd7a3f8 |
23 | function squirrelmail_plugin_init_administrator() { |
24 | global $squirrelmail_plugin_hooks, $username; |
25 | |
7004cc32 |
26 | if ( adm_check_user() ) { |
27 | $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] = |
28 | 'squirrelmail_administrator_optpage_register_block'; |
abd7a3f8 |
29 | } |
30 | } |
31 | |
0df03ce7 |
32 | /** |
33 | * Register option block |
34 | * @access private |
35 | */ |
91e811f0 |
36 | function squirrelmail_administrator_optpage_register_block() { |
abd7a3f8 |
37 | global $optpage_blocks; |
38 | global $AllowSpamFilters; |
39 | |
40 | $optpage_blocks[] = array( |
41 | 'name' => _("Administration"), |
42 | 'url' => '../plugins/administrator/options.php', |
6a9acbca |
43 | 'desc' => _("This module allows administrators to manage SquirrelMail main configuration remotely."), |
abd7a3f8 |
44 | 'js' => false |
45 | ); |
46 | } |
0df03ce7 |
47 | ?> |