HEX
Server: Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System: Windows NT ALTAIR 10.0 build 20348 (Windows Server 2022) AMD64
User: Administrator (0)
PHP: 8.1.10
Disabled: NONE
Upload Files
File: C:/laragon/www/beplocal/TableUtentiAuthData.php
<?php
include_once 'DBClassOkta.php';
include_once 'Utilities.php';

$DatabaseService = new DatabaseService();

$conn = $DatabaseService->getConnection();// get data and store in a json array

$filterSql = $_POST['filter']; 

$jwt = $_POST['jwt'];
$authLevel = $_POST['AUTH_LEVEL'];

if(verificaToken($jwt, $authLevel)) {
	$queryPerAuth = "Select ".
	"us.idUsers, ".	
	"us.login, ".
	"us.nome, ".
	"us.cognome, ".
	"al.CodificaLivello , ".
	"al.DescrizioneLivello ".
	"From Users as us ".
	"left join UserAuth as ua on us.idUsers = ua.idUser ".
	"left join AuthLevel as al on al.idAuthLevel = ua.IdAuth ".
	"where true  ".$filterSql." ";

	$stmt = $conn->prepare($queryPerAuth);
	$stmt->execute();
	$num = $stmt->rowCount();

	$items = array();

	while ($row = $stmt->fetch()){
		$items[] = array(
		'idUsers' => $row['idUsers'],
		'login' => $row['login'],
		'nome' => $row['nome'],
		'cognome' => $row['cognome'],
		'CodificaLivello' => $row['CodificaLivello'],
		'DescrizioneLivello' => $row['DescrizioneLivello']);
	}
	
	echo json_encode($items);
} else {
	echo json_encode(array('message' => "Errore nella procedura della tabela prodotti. Contattare il supporto tecnico"));
}
?>