<?php 
	if(isset($_GET['idtl']))
	{
	$idtl=$_GET['idtl'];
	settype($idtl,"int");
	}
	else $idtl = 1;	
	if(isset($_GET['idloaitin']))
	{
		$idloaitin=$_GET['idloaitin'];
		settype($idloaitin,"int");
	}	
	else $idloaitin = 1;
	
?>
<?php 
	$theloai = $homedata -> theloaikd($idtl);
	$tentheloai = mysqli_fetch_array($theloai);
 ?>
<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#"><i class="fas fa-home"></i></a></li>
    <li class="breadcrumb-item active" aria-current="page">Chuyên mục</li>
    <li class="breadcrumb-item active" aria-current="page"><?php echo $tentheloai['TenTL'] ?></li>
  </ol>
</nav>
<div class="row mt-3">	
<div class="col-md-9 border-right">	
<?php 
	$result = $homedata -> tintrongloai($idtl,$idloaitin);
	while($row = mysqli_fetch_array($result))
	{?>
	<div class="border-top">
		<h5><a href="bai-viet/<?php echo $row['TieuDe_KhongDau'] ?>-<?php echo $row['idTin'] ?>.html"><?php echo $row['TieuDe'] ?></a></h5>
		<i>
			<span><?php 
				$ngay = date_create($row['Ngay']) ;
				$ngay = date_format($ngay,"d/m/y");
				echo $ngay
				?>
			    </span>&ensp;
				<span class="fas fa-chart-bar " style="color:#9fbad6"> <?php echo $row['SoLanXem'];?></span>
		</i>
	</div>		
 <?php } ?>  
 </div> 
 <div class="col-md-3 text-center">
 	<?php include "pages/mhsidebar.php"; ?>
 </div>
</div>
