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/TableAuthData.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 ".
					" * ".
					"from AuthLevel ".
					
					"where CodificaLivello != 'ALL' ".$filterSql;
						 

	
	
	$stmt = $conn->prepare($queryPerAuth);
	$stmt->execute();
	$num = $stmt->rowCount();
	
	$items = array();
	while ($row = $stmt->fetch())
	{
		$items[] = array(
		'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"));
}





	


?>