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