<?php 
session_start();
include_once '../../conexao/index.php';

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

$sqlBox = "SELECT diaperiodo FROM periodo WHERE diaperiodo = '$status' AND usuario = '$userID'";
$rsBox = mysqli_query($db, $sqlBox);
if (mysqli_num_rows($rsBox) > 0) {
	$sqlTot = "SELECT COUNT(idfiladeespera) AS TOTPROD FROM filadeespera WHERE usuariofiladeespera = '$userID'";
	$rsTot = mysqli_query($db, $sqlTot);
	if (mysqli_num_rows($rsTot) > 0) {
		while ($dados = mysqli_fetch_assoc($rsTot)) {
			$tt = $dados['TOTPROD'];
			echo "<b style='background-color:#00B500;padding: 4px 7px;border-radius: 20px;margin-left: 5px;'>$tt</b>";
		}
	}
}