API filter per user level
This commit is contained in:
@@ -7,32 +7,38 @@ require_once ("../../queries/checkInput.php");
|
||||
require_once ("../../queries/user.php");
|
||||
require_once ("../../queries/group_page.php");
|
||||
|
||||
$search = "";
|
||||
if (isset($_POST["search"])) {
|
||||
$search = test_input($_POST["search"]);
|
||||
}
|
||||
if (isset($_SESSION["userID"]) &&
|
||||
(getRoleByID($_SESSION["userID"]) == 'admin' ||
|
||||
getRoleByID($_SESSION["userID"]) == 'owner')) {
|
||||
$search = "";
|
||||
if (isset($_POST["search"])) {
|
||||
$search = test_input($_POST["search"]);
|
||||
}
|
||||
|
||||
$pagetype = "user";
|
||||
if (isset($_POST['pagetype'])) {
|
||||
$pagetype = test_input($_POST['pagetype']);
|
||||
}
|
||||
$pagetype = "user";
|
||||
if (isset($_POST['pagetype'])) {
|
||||
$pagetype = test_input($_POST['pagetype']);
|
||||
}
|
||||
|
||||
$status = array();
|
||||
if (isset($_POST['status'])) {
|
||||
$status = $_POST["status"];
|
||||
}
|
||||
$status = array();
|
||||
if (isset($_POST['status'])) {
|
||||
$status = $_POST["status"];
|
||||
}
|
||||
|
||||
$groupstatus = array();
|
||||
if (isset($_POST['groupstatus'])) {
|
||||
$groupstatus = $_POST["groupstatus"];
|
||||
}
|
||||
$groupstatus = array();
|
||||
if (isset($_POST['groupstatus'])) {
|
||||
$groupstatus = $_POST["groupstatus"];
|
||||
}
|
||||
|
||||
$entries = 20;
|
||||
$currentpage = 1;
|
||||
if (isset($_POST['currentpage'])) {
|
||||
$currentpage = (int) test_input($_POST["currentpage"]);
|
||||
}
|
||||
$entries = 20;
|
||||
$currentpage = 1;
|
||||
if (isset($_POST['currentpage'])) {
|
||||
$currentpage = (int) test_input($_POST["currentpage"]);
|
||||
}
|
||||
|
||||
$offset = (int) $currentpage * $entries - $entries;
|
||||
$offset = (int) $currentpage * $entries - $entries;
|
||||
|
||||
include ("../../views/adminpanel-page.php");
|
||||
include ("../../views/adminpanel-page.php");
|
||||
} else {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
}
|
||||
Reference in New Issue
Block a user