<table>
	<?Php

		require('../../connect/db.php');
		db_connect() or die ("Houve erro ao acessar estes dados!");

		$result = mysql_query("SELECT 
					  crm_chamado.`titulo`,
					  crm_chamado.`dataHoraCriacao`,
					  crm_statusChamado.`titulo` 
					FROM
					  crm_chamado 
					  JOIN crm_statusChamado 
					    ON crm_chamado.`statusChamado` = crm_statusChamado.`idStatusChamado` 
					WHERE crm_chamado.`id_cliente` = '".$_GET['id']."'
					AND crm_chamado.`id_usuario` = '".$_GET['idUser']."' 
					ORDER BY crm_chamado.`dataHoraCriacao`") or die (mysql_error());

		require '../../auxiliares/formata-data.php';
		while ($linha = mysql_fetch_array($result)){
		list($titulo, $dh_iniciado, $statusChamado) = $linha;
		
		?>	
		<tr>
			<td><span class='style2'>Iniciado em:</span></td>
			<td><span class='style2'><?php echo dataPTBRTime($dh_iniciado); ?></span></td>
		</tr>
	  	<tr>
	  		<td><span class='style2'>Chamado:</span></td>
	  		<td><span class='style2'><b><?php echo $titulo; ?></b></span></td>
	  	</tr>
	 	<tr>
	 		<td><span class='style2'>Status: </span></td>
	 		<td><span class='style2'><b><?php echo $statusChamado ?></b></span></td>
	 	</tr>
		<tr><td colspan='2'><hr /></td></tr>
	<?
		}
	
?>
</table>