summaryrefslogtreecommitdiff
path: root/lib/KolabAdmin/include/menu.php
blob: ccabb2faac82cc52df6452bb26150a844ebf3b33 (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?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>.
 */

require_once('locale.php');

$menuitems = array();

if( $auth->group() == "admin" || $auth->group() == "maintainer" || $auth->group() == 'domain-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' ),
												array( 'name' => _('ActiveSync'),
														'url'  => 'activesync.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' )));

}
if( $auth->group() == "admin" || $auth->group() == "maintainer" || $auth->group() == 'domain-maintainer') {
  $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' || $auth->group() == 'domain-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' ) ) );
  $menuitems['domain-maintainer'] = array( 'name' => _('Domain Maintainers'),
									   'url'  => $topdir.'/domainmaintainer/',
									   'title' => _('Manage Domain Maintainers'),
									   'submenu' => array(
														  array( 'name' => _('Create New Domain Maintainer'),
																 'url'   => 'domainmaintainer.php?action=create' ) ) );
  $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') );  
  $menuitems['domain-maintainer'] = array( 'name' => _('Domain Maintainers'),
									   'url'  => $topdir.'/domainmaintainer/',
									   'title' => _('Manage Domain Maintainers'),
									   'submenu' => array(
														  array( 'name' => _('Create New Domain Maintainer'),
																 'url'   => 'domainmaintainer.php?action=create' ) ) );
} else if( $auth->group() == 'domain-maintainer' ) {
  $mdn = $auth->dn();
  $menuitems['domain-maintainer'] = array( 'name' => _('Domain Maintainers'),
									'url'  => $topdir.'/domainmaintainer/domainmaintainer.php?action=modify&dn='.urlencode($mdn),
									'title' => _('Manage Domain Maintainer') );  
}
if( $auth->group() == 'admin' ) {
  $menuitems['service'] = array( 'name' => _('Settings'),
								 'url'  => $topdir.'/settings/',
								 'title' => _('System Settings') );
}

$menuitems['about'] = array( 'name' => _('About Kolab'),
							 'url'  => $topdir.'/kolab/',
							 'title' => _('About Kolab'),
							 'submenu' => array( 
												array( 'name' => _('Kolab Systems'),
													   'url'  => 'kolabsystems.php' ),
												array( 'name' => _('Technology'),
													   'url'  => 'technology.php' ),
												));
if( $auth->group() == 'admin' || $auth->group() == 'maintainer' || $auth->group() == 'domain-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:
 */
?>