summaryrefslogtreecommitdiff
path: root/php/admin/include/menu.php
blob: b7428537c955e492e47acd222eb4e45ecf2429b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
/*
 *  Copyright (c) 2004 Klarälvdalens Datakonsult AB
 *
 *    Written by Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
 *
 *  This  program is free  software; you can redistribute  it and/or
 *  modify it  under the terms of the GNU  General Public License as
 *  published by the  Free Software Foundation; either version 2, or
 *  (at your option) any later version.
 *
 *  This program is  distributed in the hope that it will be useful,
 *  but WITHOUT  ANY WARRANTY; without even the  implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  General Public License for more details.
 *
 *  You can view the  GNU General Public License, online, at the GNU
 *  Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
 */

$menuitems = array();

if( $auth->group() == "admin" || $auth->group() == "maintainer" ) {
  $menuitems['user'] = array( 'name' => _('Users'),
							  'url'  => $topdir.'/user/',
							  'title' => _('Manage Email Users'),
							  'submenu' => array( 
												 array( 'name' => _('Create New User'),
														'url'  => 'user.php?action=create' )));
} else {
  $menuitems['user'] = array( 'name' => _('My User Settings'),
							  'url'  => $topdir.'/user/user.php?action=modify',
							  'title' => _('My User Settings'),
							  'submenu' => array(
												 array( 'name' => _('Mail Delivery'),
														'url'  => 'deliver.php'),
												 array( 'name' => _('Forward Email'),
														'url'  => 'forward.php' ),
												 array( 'name' => _('Vacation'),
														'url'  => 'vacation.php' )));
}
if( $auth->group() == "admin" || $auth->group() == "maintainer" ) {
  $menuitems['addressbook'] = array( 'name' => _('Addressbook'),
									 'url'  => $topdir.'/addressbook/',
									 'title' => _('Manage Address Book'),
									 'submenu' => array( 
														array( 'name' => _('Create New vCard'),
															   'url' => 'addr.php?action=create' )));
  $menuitems['sf'] = array( 'name' => _('Shared Folder'),
							'url'  => $topdir.'/sharedfolder/',
							'title' => _('Manage Shared Folders'),
							'submenu' => array( 
											   array( 'name' => _('Add Shared Folder'),
													  'url' => 'sf.php?action=create' )));  
}
if( $auth->group() == 'admin' || $auth->group() == 'maintainer' ) {
  $menuitems['distlist'] = array( 'name' => _('Distribution Lists'),
									   'url'  => $topdir.'/distributionlist/',
									   'title' => _('Manage Distribution Lists'),
									   'submenu' => array(
														  array( 'name' => _('Create New List'),
   															 'url'   => _('list.php?action=create') ) ) );
}
if( $auth->group() == 'admin' ) {
  $menuitems['administrator'] = array( 'name' => _('Administrators'),
									   'url'  => $topdir.'/administrator/',
									   'title' => _('Manage Administrators'),
									   'submenu' => array(
														  array( 'name' => _('Create New Administrator'),
																 'url'   => 'admin.php?action=create' ) ) );
}
if( $auth->group() == 'admin' ) {
  $menuitems['maintainer'] = array( 'name' => _('Maintainers'),
									'url'  => $topdir.'/maintainer/',
									'title' => _('Manage Maintainers'),
									'submenu' => array(
													   array( 'name' => _('Create New Maintainer'),
															  'url'   => 'maintainer.php?action=create' ) ) );
} else if( $auth->group() == 'maintainer' ) {
  $mdn = $auth->dn();
  $menuitems['maintainer'] = array( 'name' => _('Maintainers'),
									'url'  => $topdir.'/maintainer/maintainer.php?action=modify&dn='.urlencode($mdn),
									'title' => _('Manage Maintainer') );  
}
if( $auth->group() == 'admin' ) {
  $menuitems['service'] = array( 'name' => _('Services'),
								 'url'  => $topdir.'/service/',
								 'title' => _('Manage Services') );
}

$menuitems['about'] = array( 'name' => _('About Kolab'),
							 'url'  => $topdir.'/kolab/',
							 'title' => _('About Kolab'),
							 'submenu' => array( 
												array( 'name' => _('Erfrakon'),
													   'url'  => 'erfrakon.php' ),
												array( 'name' => _('Intevation'),
													   'url'  => 'intevation.php' ),
												array( 'name' => _('Klarälvdalens Datakonsult'),
													   'url'  => 'kdab.php' ),
												array( 'name' => _('Code Fusion'),
													   'url'  => 'codefusion.php' ),
												array( 'name' => _('KDE'),
													   'url'  => 'kde.php' )
												));
if( $auth->group() == 'admin' || $auth->group() == 'maintainer' ) {
  $menuitems['about']['submenu'][] = array( 'name' => _('Versions'),
											'url'  => 'versions.php' );
}

/*
  Local variables:
  mode: php
  indent-tabs-mode: t
  tab-width: 4
  buffer-file-coding-system: utf-8
  End:
  vim:encoding=utf-8:
 */
?>