commit | author | age
|
18341e
|
1 |
<?php |
T |
2 |
|
acdd20
|
3 |
$userid=$app->auth->get_user_id(); |
T |
4 |
|
d53f18
|
5 |
$module["name"] = "sites"; |
C |
6 |
$module["title"] = "top_menu_sites"; |
18341e
|
7 |
$module["template"] = "module.tpl.htm"; |
T |
8 |
$module["startpage"] = "sites/web_domain_list.php"; |
|
9 |
$module["tab_width"] = ''; |
|
10 |
|
d53f18
|
11 |
// Websites menu |
acdd20
|
12 |
$items=array(); |
18341e
|
13 |
|
acdd20
|
14 |
if($app->auth->get_client_limit($userid,'web_domain') != 0) |
T |
15 |
{ |
d53f18
|
16 |
$items[] = array( 'title' => "Website", |
C |
17 |
'target' => 'content', |
|
18 |
'link' => 'sites/web_domain_list.php', |
|
19 |
'html_id' => 'domain_list'); |
acdd20
|
20 |
} |
18341e
|
21 |
|
acdd20
|
22 |
if($app->auth->get_client_limit($userid,'web_subdomain') != 0) |
T |
23 |
{ |
c3bf39
|
24 |
$items[] = array( 'title' => "Subdomain", |
M |
25 |
'target' => 'content', |
|
26 |
'link' => 'sites/web_subdomain_list.php', |
|
27 |
'html_id' => 'subdomain_list'); |
|
28 |
|
6fb93d
|
29 |
// read web config |
M |
30 |
$app->uses('getconf'); |
|
31 |
$sys_config = $app->getconf->get_global_config('sites'); |
c3bf39
|
32 |
if($sys_config['vhost_subdomains'] == 'y') { |
M |
33 |
$items[] = array( 'title' => "Subdomain (Vhost)", |
d53f18
|
34 |
'target' => 'content', |
c3bf39
|
35 |
'link' => 'sites/web_vhost_subdomain_list.php', |
d53f18
|
36 |
'html_id' => 'subdomain_list'); |
c3bf39
|
37 |
} |
acdd20
|
38 |
} |
18341e
|
39 |
|
acdd20
|
40 |
if($app->auth->get_client_limit($userid,'web_aliasdomain') != 0) |
T |
41 |
{ |
d53f18
|
42 |
$items[] = array( 'title' => "Aliasdomain", |
C |
43 |
'target' => 'content', |
|
44 |
'link' => 'sites/web_aliasdomain_list.php', |
|
45 |
'html_id' => 'aliasdomain_list'); |
acdd20
|
46 |
} |
18341e
|
47 |
|
acdd20
|
48 |
if(count($items)) |
T |
49 |
{ |
d53f18
|
50 |
$module["nav"][] = array( 'title' => 'Websites', |
C |
51 |
'open' => 1, |
|
52 |
'items' => $items); |
acdd20
|
53 |
} |
18341e
|
54 |
|
d53f18
|
55 |
// Databases menu |
acdd20
|
56 |
if($app->auth->get_client_limit($userid,'database') != 0) |
T |
57 |
{ |
d53f18
|
58 |
$items=array(); |
C |
59 |
|
|
60 |
$items[] = array( 'title' => "Database", |
|
61 |
'target' => 'content', |
|
62 |
'link' => 'sites/database_list.php', |
|
63 |
'html_id' => 'database_list'); |
73c2f2
|
64 |
|
d53f18
|
65 |
|
C |
66 |
$items[] = array( 'title' => "Database User", |
|
67 |
'target' => 'content', |
|
68 |
'link' => 'sites/database_user_list.php', |
|
69 |
'html_id' => 'database_user_list' |
|
70 |
); |
|
71 |
|
|
72 |
$module["nav"][] = array( 'title' => 'Database', |
|
73 |
'open' => 1, |
|
74 |
'items' => $items); |
|
75 |
} |
|
76 |
|
|
77 |
// Web menu |
|
78 |
$items=array(); |
|
79 |
if($app->auth->get_client_limit($userid,'ftp_user') != 0) |
|
80 |
{ |
|
81 |
$items[] = array( 'title' => "FTP-User", |
|
82 |
'target' => 'content', |
|
83 |
'link' => 'sites/ftp_user_list.php', |
|
84 |
'html_id' => 'ftp_user_list'); |
|
85 |
} |
|
86 |
|
acdd20
|
87 |
if($app->auth->get_client_limit($userid,'webdav_user') != 0) |
T |
88 |
{ |
d53f18
|
89 |
$items[] = array( 'title' => "Webdav-User", |
C |
90 |
'target' => 'content', |
|
91 |
'link' => 'sites/webdav_user_list.php', |
|
92 |
'html_id' => 'webdav_user_list'); |
acdd20
|
93 |
} |
a73335
|
94 |
|
d53f18
|
95 |
$items[] = array( 'title' => "Folder", |
C |
96 |
'target' => 'content', |
|
97 |
'link' => 'sites/web_folder_list.php', |
|
98 |
'html_id' => 'web_folder_list'); |
524077
|
99 |
|
d53f18
|
100 |
$items[] = array( 'title' => "Folder users", |
C |
101 |
'target' => 'content', |
|
102 |
'link' => 'sites/web_folder_user_list.php', |
|
103 |
'html_id' => 'web_folder_user_list'); |
524077
|
104 |
|
d53f18
|
105 |
$module["nav"][] = array( 'title' => 'Web Access', |
C |
106 |
'open' => 1, |
|
107 |
'items' => $items); |
524077
|
108 |
|
T |
109 |
|
d53f18
|
110 |
// CMD menu |
4ee9ef
|
111 |
if($app->auth->get_client_limit($userid,'shell_user') != 0 OR $app->auth->get_client_limit($userid,'cron') != 0) |
C |
112 |
{ |
d53f18
|
113 |
$items=array(); |
C |
114 |
|
|
115 |
if($app->auth->get_client_limit($userid,'shell_user') != 0) |
acdd20
|
116 |
{ |
d53f18
|
117 |
$items[] = array( 'title' => "Shell-User", |
C |
118 |
'target' => 'content', |
|
119 |
'link' => 'sites/shell_user_list.php', |
|
120 |
'html_id' => 'shell_user_list'); |
acdd20
|
121 |
} |
d53f18
|
122 |
if($app->auth->get_client_limit($userid,'cron') != 0) |
C |
123 |
{ |
|
124 |
$items[] = array( 'title' => "Cron Jobs", |
|
125 |
'target' => 'content', |
|
126 |
'link' => 'sites/cron_list.php', |
|
127 |
'html_id' => 'cron_list'); |
|
128 |
} |
|
129 |
$module["nav"][] = array( 'title' => 'Command Line', |
|
130 |
'open' => 1, |
|
131 |
'items' => $items); |
4ee9ef
|
132 |
} |
d53f18
|
133 |
|
C |
134 |
// APS menu |
526b99
|
135 |
if($app->auth->get_client_limit($userid,'aps') != 0) |
T |
136 |
{ |
477d4e
|
137 |
$items = array(); |
T |
138 |
|
d53f18
|
139 |
$items[] = array( 'title' => 'Available packages', |
C |
140 |
'target' => 'content', |
|
141 |
'link' => 'sites/aps_availablepackages_list.php', |
|
142 |
'html_id' => 'aps_availablepackages_list'); |
477d4e
|
143 |
|
d53f18
|
144 |
$items[] = array( 'title' => 'Installed packages', |
C |
145 |
'target' => 'content', |
|
146 |
'link' => 'sites/aps_installedpackages_list.php', |
|
147 |
'html_id' => 'aps_installedpackages_list'); |
477d4e
|
148 |
|
T |
149 |
|
|
150 |
// Second menu group, available only for admins |
|
151 |
if($_SESSION['s']['user']['typ'] == 'admin') |
|
152 |
{ |
d53f18
|
153 |
$items[] = array( 'title' => 'Update Packagelist', |
C |
154 |
'target' => 'content', |
526b99
|
155 |
'link' => 'sites/aps_update_packagelist.php', |
d53f18
|
156 |
'html_id' => 'aps_packagedetails_show'); |
477d4e
|
157 |
} |
T |
158 |
|
d53f18
|
159 |
$module['nav'][] = array( 'title' => 'APS Installer', |
C |
160 |
'open' => 1, |
|
161 |
'items' => $items); |
526b99
|
162 |
} |
477d4e
|
163 |
|
d53f18
|
164 |
// Statistics menu |
a73335
|
165 |
$items = array(); |
M |
166 |
|
d53f18
|
167 |
$items[] = array( 'title' => 'Web traffic', |
C |
168 |
'target' => 'content', |
|
169 |
'link' => 'sites/web_sites_stats.php', |
|
170 |
'html_id' => 'websites_stats'); |
a73335
|
171 |
|
d53f18
|
172 |
$items[] = array( 'title' => 'Website quota (Harddisk)', |
C |
173 |
'target' => 'content', |
|
174 |
'link' => 'sites/user_quota_stats.php', |
|
175 |
'html_id' => 'user_quota_stats'); |
a73335
|
176 |
|
M |
177 |
$module['nav'][] = array( 'title' => 'Statistics', |
d53f18
|
178 |
'open' => 1, |
C |
179 |
'items' => $items); |
80e3c9
|
180 |
|
T |
181 |
// clean up |
|
182 |
unset($items); |
18341e
|
183 |
?> |