]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | /* vim: set ts=4 tw=0 sw=4 noet: */ | |
3 | require_once 'config.php'; | |
4 | require_once $CFG->root . 'lib/utils.inc.php'; | |
5 | ||
6 | $util = new Utils; | |
7 | ||
8 | if ($util->isLoggedIn()) { | |
9 | $function = isset($_GET['p']) ? $_GET['p'] : null; | |
10 | $subfunction = isset($_GET['s']) ? $_GET['s'] : null; | |
11 | if (($function && $function == 'show' && !$subfunction) || | |
12 | ($function && $function == 'add' && $subfunction) || | |
13 | ($function && $function == 'del' && $subfunction) { | |
14 | header('Location: index.php'); | |
15 | } else if($function == 'show') { | |
16 | if ($subfunction == 'all') { | |
17 | $list = $util->makeRestCall('/show'); | |
18 | if ($list) { | |
19 | $out = var_export($list, true); | |
20 | } else { | |
21 | $out = '<p>Connection to REST service failed</p>'; | |
22 | } | |
23 | } else if ($subfunction == 'blacklist') { | |
24 | } else if ($subfunction == 'whitelist') { | |
25 | } else { | |
26 | header('Location: index.php'); | |
27 | } | |
28 | } else if($function == 'add') { | |
29 | } else if($function == 'del') { | |
30 | } else { | |
31 | header('Location: index.php'); | |
32 | } | |
33 | $util->setHeading('WB List and Quarantine Administration'); | |
34 | echo $util->getHeader(); | |
35 | echo $util->getHeading(); | |
36 | echo $out; | |
37 | echo $util->getFooter(); | |
38 | } else { | |
39 | header('Location: auth.php'); | |
40 | } | |
41 | ?> |