X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/df10d813dab5e6a440ae81cf71d3355b02057a3d..6cba8db7a811888e5f29708a50893ab6982b3181:/wblist.php diff --git a/wblist.php b/wblist.php index 7746869..00093f2 100644 --- a/wblist.php +++ b/wblist.php @@ -3,20 +3,98 @@ require_once 'config.php'; require_once $CFG->root . 'lib/utils.inc.php'; + function createHeader($data) { + $out = '
{$raw[0]}
"; + } + $headers = createHeader($raw[0]); + $r = "$i | "; + foreach ($obj as $value) { + $r .= "$value | "; + } + $r .= '
Connection to REST service failed
'; + } + } else if ($subfunction == 'blacklist') { + if ($util->isAdmin()) { + $method = '/show/blacklist'; + } else { + $method = '/show/blacklist' . $util->getUser(); + } + $list = $util->makeRestCall($method); + if ($list) { + $out = parseResponse($list); + } else { + $out = 'Connection to REST service failed
'; + } + } else if ($subfunction == 'whitelist') { + if ($util->isAdmin()) { + $method = '/show/whitelist'; + } else { + $method = '/show/whitelist' . $util->getUser(); + } + $list = $util->makeRestCall($method); + if ($list) { + $out = parseResponse($list); + } else { + $out = 'Connection to REST service failed
'; + } + } 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 $out; echo $util->getFooter(); } else { header('Location: auth.php'); } -?> \ No newline at end of file +?>