weblab
<div id="myCarousel" class="carousel slide pt-1 " data-ride="carousel">
<!-- Wrapper for slides -->
<?php
$showNewstop1 = "SELECT * FROM tnew where new_type='ข่าวเด่น' and new_status='แสดง' order by new_id desc LIMIT 0,5";
$sNqt1 = mysqli_query($Conn, $showNewstop1);
?>
<div class="carousel-inner" role="listbox">
<?php
$numshow = 1;
while ($rst1 = mysqli_fetch_array($sNqt1)) {
$tnew_subject1 = $rst1['new_subject'];
// $tnew_date = $rst['new_date'];
$tnew_id1 = $rst1['new_id'];
$tnew_img1 = $rst1['new_img'];
$i_ndate = $rst1['new_date'];
$i_ncount = $rst1['new_count'];
// $tnew_count = $rst['new_count'];
$tnew_details1 = $rst1['new_details'];
if ($numshow == 1) {
$active = "active";
} else {
$active = "";
}
?>
<div class="carousel-item <?php echo $active; ?> ">
<div class="card rounded">
<div class="row no-gutters">
<div class="col-md-12">
<img src="<?php echo 'http://www.umongcity.go.th/news%20system/' . $tnew_img1; ?>" class="card-img" style="height: 350px; object-fit: cover;" alt="...">
</div>
<div class="col-md-12">
<div class="card-footer py-2 bg-dark">
<a href="http://www.umongcity.go.th/news_detail.php?CusID=<?php echo $tnew_id1; ?>" target="_blank">
<h5 class="card-title text-light " style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 800px;">
<?php echo $tnew_subject1; ?>
</h5>
</a>
<span class="text-warning">
<i class="fas fa-calendar-week"></i>
<?php echo ShowDay($i_ndate); ?>
</span>
<span class="" style="color:Chartreuse;">
<i class="fas fa-user-alt"></i>
<?php echo $i_ncount ?>
</span>
</div>
</div>
</div>
</div>
</div>
<?php
$numshow++;
}
?>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
</div>