Administrator Plugin
[squirrelmail.git] / plugins / administrator / setup.php
1 <?php
2
3 /**
4 * setup.php
5 *
6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Administrator plugin. Allows remote administration. Philippe Mingo
10 *
11 * $Id$
12 */
13
14 function squirrelmail_plugin_init_administrator() {
15 global $squirrelmail_plugin_hooks, $username;
16
17 if ( $adm_id = fileowner('../config/config.php') ) {
18 $adm = posix_getpwuid( $adm_id );
19 if ( $username = $adm['name'] ) {
20 $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
21 'squirrelmail_plugin_optpage_register_block';
22 }
23 }
24 }
25
26 function squirrelmail_plugin_optpage_register_block() {
27 global $optpage_blocks;
28 global $AllowSpamFilters;
29
30 $optpage_blocks[] = array(
31 'name' => _("Administration"),
32 'url' => '../plugins/administrator/options.php',
33 'desc' => _("This module allows administrators to run SquirrelMail configuration remotely."),
34 'js' => false
35 );
36 }
37 ?>