diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index d5b740e..e684714 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -22,6 +22,10 @@ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } +.admin-searchform { + display: inline-block; +} + .admin-searchbar { display: inline-block; margin: 10px; @@ -44,10 +48,6 @@ width: 120px; } -.admin-groupfilter { - display: none; -} - .admin-users { margin: 10px; } diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 5a3ba97..ea9cea6 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -43,23 +43,24 @@ $listnr = 0; // TODO: add page functionality $status = $groupstatus = array(); $pagetype = "user"; +if (!empty($_GET["search"])) { + $search = test_input($_GET["search"]); +} + +if (!empty($_GET["pagetype"])) { + $pagetype = test_input($_GET["pagetype"]); +} + +if (!empty($_GET["status"])) { + $status = $_GET["status"]; +} + +if (!empty($_GET["groupstatus"])) { + $groupstatus = $_GET["groupstatus"]; +} + + if ($_SERVER["REQUEST_METHOD"] == "POST") { - if (!empty($_POST["search"])) { - $search = test_input($_POST["search"]); - } - - if (!empty($_POST["pagetype"])) { - $pagetype = test_input($_POST["pagetype"]); - } - - if (!empty($_POST["status"])) { - $status = $_POST["status"]; - } - - if (!empty($_POST["groupstatus"])) { - $groupstatus = $_POST["groupstatus"]; - } - if (!empty($_POST["actions"]) && !empty($_POST["userID"])) { changeUserStatusByID($db, $_POST["userID"], $_POST["actions"]); } elseif (!empty($_POST["actions"]) && !empty($_POST["groupID"])) { @@ -81,13 +82,10 @@ function test_input($data) {

User Management Panel


-
" - method="post">
" - method="post"> + method="get"> -
-