commit | author | age
|
18341e
|
1 |
<?php |
T |
2 |
|
acdd20
|
3 |
$userid=$app->auth->get_user_id(); |
T |
4 |
|
b1a6a5
|
5 |
$module["name"] = "sites"; |
MC |
6 |
$module["title"] = "top_menu_sites"; |
|
7 |
$module["template"] = "module.tpl.htm"; |
add280
|
8 |
$module["startpage"] = "sites/web_vhost_domain_list.php"; |
18341e
|
9 |
$module["tab_width"] = ''; |
a563d5
|
10 |
$module['order'] = '30'; |
18341e
|
11 |
|
d53f18
|
12 |
// Websites menu |
acdd20
|
13 |
$items=array(); |
18341e
|
14 |
|
b1a6a5
|
15 |
if($app->auth->get_client_limit($userid, 'web_domain') != 0) |
acdd20
|
16 |
{ |
b1a6a5
|
17 |
$items[] = array( 'title' => "Website", |
MC |
18 |
'target' => 'content', |
73813a
|
19 |
'link' => 'sites/web_vhost_domain_list.php?type=domain', |
b1a6a5
|
20 |
'html_id' => 'domain_list'); |
acdd20
|
21 |
} |
18341e
|
22 |
|
b1a6a5
|
23 |
if($app->auth->get_client_limit($userid, 'web_subdomain') != 0) |
acdd20
|
24 |
{ |
b1a6a5
|
25 |
$items[] = array( 'title' => "Subdomain", |
MC |
26 |
'target' => 'content', |
3669b3
|
27 |
'link' => 'sites/web_childdomain_list.php?type=subdomain', |
e60d4c
|
28 |
'html_id' => 'childdomain_list'); |
c3bf39
|
29 |
|
b1a6a5
|
30 |
// read web config |
MC |
31 |
$app->uses('getconf'); |
|
32 |
$sys_config = $app->getconf->get_global_config('sites'); |
|
33 |
if($sys_config['vhost_subdomains'] == 'y') { |
|
34 |
$items[] = array( 'title' => "Subdomain (Vhost)", |
|
35 |
'target' => 'content', |
73813a
|
36 |
'link' => 'sites/web_vhost_domain_list.php?type=subdomain', |
e60d4c
|
37 |
'html_id' => 'childdomain_list'); |
b1a6a5
|
38 |
} |
acdd20
|
39 |
} |
18341e
|
40 |
|
b1a6a5
|
41 |
if($app->auth->get_client_limit($userid, 'web_aliasdomain') != 0) |
acdd20
|
42 |
{ |
b1a6a5
|
43 |
$items[] = array( 'title' => "Aliasdomain", |
MC |
44 |
'target' => 'content', |
3669b3
|
45 |
'link' => 'sites/web_childdomain_list.php?type=aliasdomain', |
e60d4c
|
46 |
'html_id' => 'childdomain_list'); |
511ba5
|
47 |
|
DM |
48 |
// read web config |
|
49 |
$app->uses('getconf'); |
|
50 |
$sys_config = $app->getconf->get_global_config('sites'); |
|
51 |
if($sys_config['vhost_aliasdomains'] == 'y') { |
|
52 |
$items[] = array( 'title' => "Aliasdomain (Vhost)", |
|
53 |
'target' => 'content', |
73813a
|
54 |
'link' => 'sites/web_vhost_domain_list.php?type=aliasdomain', |
e60d4c
|
55 |
'html_id' => 'childdomain_list'); |
511ba5
|
56 |
} |
acdd20
|
57 |
} |
18341e
|
58 |
|
acdd20
|
59 |
if(count($items)) |
T |
60 |
{ |
b1a6a5
|
61 |
$module["nav"][] = array( 'title' => 'Websites', |
MC |
62 |
'open' => 1, |
|
63 |
'items' => $items); |
acdd20
|
64 |
} |
18341e
|
65 |
|
d53f18
|
66 |
// Databases menu |
b1a6a5
|
67 |
if($app->auth->get_client_limit($userid, 'database') != 0) |
acdd20
|
68 |
{ |
b1a6a5
|
69 |
$items=array(); |
d53f18
|
70 |
|
b1a6a5
|
71 |
$items[] = array( 'title' => "Database", |
MC |
72 |
'target' => 'content', |
|
73 |
'link' => 'sites/database_list.php', |
|
74 |
'html_id' => 'database_list'); |
73c2f2
|
75 |
|
d53f18
|
76 |
|
b1a6a5
|
77 |
$items[] = array( 'title' => "Database User", |
MC |
78 |
'target' => 'content', |
|
79 |
'link' => 'sites/database_user_list.php', |
|
80 |
'html_id' => 'database_user_list' |
|
81 |
); |
d53f18
|
82 |
|
b1a6a5
|
83 |
$module["nav"][] = array( 'title' => 'Database', |
MC |
84 |
'open' => 1, |
|
85 |
'items' => $items); |
d53f18
|
86 |
} |
C |
87 |
|
|
88 |
// Web menu |
|
89 |
$items=array(); |
b1a6a5
|
90 |
if($app->auth->get_client_limit($userid, 'ftp_user') != 0) |
d53f18
|
91 |
{ |
b1a6a5
|
92 |
$items[] = array( 'title' => "FTP-User", |
MC |
93 |
'target' => 'content', |
|
94 |
'link' => 'sites/ftp_user_list.php', |
|
95 |
'html_id' => 'ftp_user_list'); |
d53f18
|
96 |
} |
C |
97 |
|
b1a6a5
|
98 |
if($app->auth->get_client_limit($userid, 'webdav_user') != 0) |
acdd20
|
99 |
{ |
61f1f5
|
100 |
$apache_in_use = false; |
MC |
101 |
$servers = $app->db->queryAllRecords("SELECT * FROM server WHERE web_server = 1 AND active = 1"); |
|
102 |
if(is_array($servers) && !empty($servers)){ |
|
103 |
foreach($servers as $server){ |
|
104 |
$tmp_web_config = $app->getconf->get_server_config($server['server_id'], 'web'); |
|
105 |
if(strtolower($tmp_web_config['server_type']) == 'apache'){ |
|
106 |
$apache_in_use = true; |
|
107 |
break; |
|
108 |
} |
|
109 |
} |
|
110 |
} |
|
111 |
|
|
112 |
if($apache_in_use == true){ |
|
113 |
$items[] = array( 'title' => "Webdav-User", |
|
114 |
'target' => 'content', |
|
115 |
'link' => 'sites/webdav_user_list.php', |
|
116 |
'html_id' => 'webdav_user_list'); |
|
117 |
} |
acdd20
|
118 |
} |
a73335
|
119 |
|
d53f18
|
120 |
$items[] = array( 'title' => "Folder", |
b1a6a5
|
121 |
'target' => 'content', |
MC |
122 |
'link' => 'sites/web_folder_list.php', |
|
123 |
'html_id' => 'web_folder_list'); |
|
124 |
|
|
125 |
$items[] = array( 'title' => "Folder users", |
|
126 |
'target' => 'content', |
|
127 |
'link' => 'sites/web_folder_user_list.php', |
|
128 |
'html_id' => 'web_folder_user_list'); |
|
129 |
|
d53f18
|
130 |
$module["nav"][] = array( 'title' => 'Web Access', |
b1a6a5
|
131 |
'open' => 1, |
MC |
132 |
'items' => $items); |
524077
|
133 |
|
T |
134 |
|
d53f18
|
135 |
// CMD menu |
b1a6a5
|
136 |
if($app->auth->get_client_limit($userid, 'shell_user') != 0 or $app->auth->get_client_limit($userid, 'cron') != 0) |
4ee9ef
|
137 |
{ |
b1a6a5
|
138 |
$items=array(); |
d53f18
|
139 |
|
b1a6a5
|
140 |
if($app->auth->get_client_limit($userid, 'shell_user') != 0) |
MC |
141 |
{ |
|
142 |
$items[] = array( 'title' => "Shell-User", |
|
143 |
'target' => 'content', |
|
144 |
'link' => 'sites/shell_user_list.php', |
|
145 |
'html_id' => 'shell_user_list'); |
|
146 |
} |
|
147 |
if($app->auth->get_client_limit($userid, 'cron') != 0) |
|
148 |
{ |
|
149 |
$items[] = array( 'title' => "Cron Jobs", |
|
150 |
'target' => 'content', |
|
151 |
'link' => 'sites/cron_list.php', |
|
152 |
'html_id' => 'cron_list'); |
|
153 |
} |
|
154 |
$module["nav"][] = array( 'title' => 'Command Line', |
|
155 |
'open' => 1, |
|
156 |
'items' => $items); |
4ee9ef
|
157 |
} |
d53f18
|
158 |
|
C |
159 |
// APS menu |
b1a6a5
|
160 |
if($app->auth->get_client_limit($userid, 'aps') != 0) |
526b99
|
161 |
{ |
b1a6a5
|
162 |
$items = array(); |
477d4e
|
163 |
|
b1a6a5
|
164 |
$items[] = array( 'title' => 'Available packages', |
MC |
165 |
'target' => 'content', |
|
166 |
'link' => 'sites/aps_availablepackages_list.php', |
|
167 |
'html_id' => 'aps_availablepackages_list'); |
477d4e
|
168 |
|
b1a6a5
|
169 |
$items[] = array( 'title' => 'Installed packages', |
MC |
170 |
'target' => 'content', |
|
171 |
'link' => 'sites/aps_installedpackages_list.php', |
|
172 |
'html_id' => 'aps_installedpackages_list'); |
477d4e
|
173 |
|
T |
174 |
|
b1a6a5
|
175 |
// Second menu group, available only for admins |
MC |
176 |
if($_SESSION['s']['user']['typ'] == 'admin') |
|
177 |
{ |
|
178 |
$items[] = array( 'title' => 'Update Packagelist', |
|
179 |
'target' => 'content', |
|
180 |
'link' => 'sites/aps_update_packagelist.php', |
|
181 |
'html_id' => 'aps_packagedetails_show'); |
|
182 |
} |
|
183 |
|
|
184 |
$module['nav'][] = array( 'title' => 'APS Installer', |
|
185 |
'open' => 1, |
|
186 |
'items' => $items); |
526b99
|
187 |
} |
477d4e
|
188 |
|
d53f18
|
189 |
// Statistics menu |
a73335
|
190 |
$items = array(); |
M |
191 |
|
d53f18
|
192 |
$items[] = array( 'title' => 'Web traffic', |
b1a6a5
|
193 |
'target' => 'content', |
MC |
194 |
'link' => 'sites/web_sites_stats.php', |
|
195 |
'html_id' => 'websites_stats'); |
a73335
|
196 |
|
d64508
|
197 |
$items[] = array( 'title' => 'FTP traffic', |
LC |
198 |
'target' => 'content', |
|
199 |
'link' => 'sites/ftp_sites_stats.php', |
|
200 |
'html_id' => 'ftpsites_stats'); |
|
201 |
|
d53f18
|
202 |
$items[] = array( 'title' => 'Website quota (Harddisk)', |
b1a6a5
|
203 |
'target' => 'content', |
MC |
204 |
'link' => 'sites/user_quota_stats.php', |
|
205 |
'html_id' => 'user_quota_stats'); |
a73335
|
206 |
|
b7d3b1
|
207 |
$items[] = array( 'title' => 'Database quota', |
FS |
208 |
'target' => 'content', |
|
209 |
'link' => 'sites/database_quota_stats.php', |
|
210 |
'html_id' => 'databse_quota_stats'); |
|
211 |
|
78d02d
|
212 |
$items[] = array ( |
PA |
213 |
'title' => 'Backup Stats', |
|
214 |
'target' => 'content', |
|
215 |
'link' => 'sites/backup_stats.php', |
|
216 |
'html_id' => 'backup_stats' |
|
217 |
); |
|
218 |
|
a73335
|
219 |
$module['nav'][] = array( 'title' => 'Statistics', |
b1a6a5
|
220 |
'open' => 1, |
MC |
221 |
'items' => $items); |
80e3c9
|
222 |
|
T |
223 |
// clean up |
|
224 |
unset($items); |
b1a6a5
|
225 |
?> |