forked from pehsa/ZFSguru2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservices.php
More file actions
35 lines (30 loc) · 914 Bytes
/
services.php
File metadata and controls
35 lines (30 loc) · 914 Bytes
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
<?php
// import main lib
require 'includes/main.php';
// navtabs
$tabs = [
'Manage' => 'services.php?manage',
];
// add extra tabs for services with panel interfaces
activate_library('service');
$tabs_svc_panels = service_panels();
foreach ( $tabs_svc_panels as $tabs_svc_cats ) {
foreach ( $tabs_svc_cats as $tabs_panel ) {
$tabs[ htmlentities($tabs_panel[ 'longname' ]) ] = 'services.php?panel='
. htmlentities($tabs_panel[ 'name' ]);
}
}
// select page
if (@isset($_GET[ 'manage' ])AND @isset($_GET[ 'query' ]) ) {
$content = content_handle('services', 'query');
} elseif (@isset($_GET[ 'panel' ]) ) {
// handoff panel request to service library
service_panel_handle($_GET[ 'panel' ]);
// error if not handled
error('panel function did not terminate!');
}
else {
$content = content_handle('services', 'manage');
}
// serve content
page_handle($content);