]> git.datanom.net - qtadmin.git/commitdiff
First upload of wblist page
authorMichael Rasmussen <mir@datanom.net>
Wed, 24 Jun 2015 23:17:57 +0000 (01:17 +0200)
committerMichael Rasmussen <mir@datanom.net>
Wed, 24 Jun 2015 23:17:57 +0000 (01:17 +0200)
wblist.php

index 1d95424100fd37dba507ad89da583faba0967cb0..197217d4a0541191e21fe336611e016759d1b788 100644 (file)
@@ -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 = '<p>Connection to REST service failed</p>';
+                       }
+               } 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 = '<p>Connection to REST service failed</p>';
-               }
                echo $out;
         echo $util->getFooter();
     } else {
This page took 0.031801 seconds and 5 git commands to generate.