<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="../../css/estiloPrincipal.css">
	<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.min.css">
	<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.css">
	<script type="text/javascript" src="../../js/jquery-3.3.1.min.js"></script>
	<script type="text/javascript" src="../../js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="../../js/jquery-ui.js"></script>
	<script type="text/javascript" src="../../js/funcoes.js"></script>
	<script type="text/javascript" src="../js/configuracoes.js"></script>
</head>
<body>
<?php 
include_once '../../conexao/index.php';

/*Variaveis do Sistema*/
/*********************************************/
$userID = $_SESSION['idUsuario'];
$userNOME = $_SESSION['nomeUsuario'];
$userCATE = $_SESSION['categoriaUsuario'];
/*********************************************/

$status = 'Aberto';
$procura = $_GET['procura'];

$sqlBox = "SELECT diaperiodo FROM periodo WHERE diaperiodo = '$status' AND usuario = '$userID'";
$rsBox = mysqli_query($db, $sqlBox);
if (mysqli_num_rows($rsBox) > 0) {
	$sqlll = "SELECT nomefuncionario FROM funcionario WHERE nomefuncionario LIKE '$procura%'";
	$rsss = mysqli_query($db, $sqlll);
	if (mysqli_num_rows($rsss) > 0) {
		while ($dadosss = mysqli_fetch_array($rsss)) {
			$produto = $dadosss['nomefuncionario'];
			echo "<p>$produto</p>";
		}
	}
}else{
	echo "Problemas de conexao";
}
?>
</body>
</html>