-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathaccess.php
40 lines (35 loc) · 1.06 KB
/
access.php
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
<?php
// import main lib
require 'includes/main.php';
// navtabs
$tabs = [
'Shares' => 'access.php?samba&shares',
'Users' => 'access.php?samba&users',
'Settings' => 'access.php?samba&settings',
'NFS' => 'access.php?nfs',
'SSH' => 'access.php?ssh'
];
$content = '';
// select page
if (@isset($_GET[ 'nfs' ]) ) {
$content = content_handle('access', 'nfs');
} elseif (@isset($_GET[ 'iscsi' ]) ) {
$content = content_handle('access', 'iscsi');
} elseif (@isset($_GET[ 'ssh' ]) ) {
$content = content_handle('access', 'ssh');
} elseif (@isset($_GET[ 'samba' ]) ) {
if (!isset($_GET['share'], $_GET['shares'])) {
$content = content_handle('access', 'samba_shares');
} elseif (@isset($_GET[ 'users' ]) ) {
$content = content_handle('access', 'samba_users');
} elseif (@isset($_GET[ 'settings' ]) ) {
$content = content_handle('access', 'samba_settings');
} else {
redirect_url('access.php');
}
}
else {
$content = content_handle('access', 'samba_shares');
}
// serve content
page_handle($content);