From ccbb5c4bdaa7335eedd4386d7f9d748b4b011d9c Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Thu, 25 Jun 2015 01:17:57 +0200 Subject: [PATCH] First upload of wblist page --- wblist.php | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/wblist.php b/wblist.php index 1d95424..197217d 100644 --- a/wblist.php +++ b/wblist.php @@ -6,15 +6,33 @@ $util = new Utils; if ($util->isLoggedIn()) { + $function = isset($_GET['p']) ? $_GET['p'] : null; + $subfunction = isset($_GET['s']) ? $_GET['s'] : null; + if (($function && $function == 'show' && !$subfunction) || + ($function && $function == 'add' && $subfunction) || + ($function && $function == 'del' && $subfunction) { + header('Location: index.php'); + } else if($function == 'show') { + if ($subfunction == 'all') { + $list = $util->makeRestCall('/show'); + if ($list) { + $out = var_export($list, true); + } else { + $out = '

Connection to REST service failed

'; + } + } else if ($subfunction == 'blacklist') { + } else if ($subfunction == 'whitelist') { + } else { + header('Location: index.php'); + } + } else if($function == 'add') { + } else if($function == 'del') { + } else { + header('Location: index.php'); + } $util->setHeading('WB List and Quarantine Administration'); echo $util->getHeader(); echo $util->getHeading(); - $list = $util->makeRestCall('/show'); - if ($list) { - $out = var_export($list, true); - } else { - $out = '

Connection to REST service failed

'; - } echo $out; echo $util->getFooter(); } else { -- 2.39.2