File "news.php"
Full path: /home/fsibplc/public_html/firstcash/en/home/news.php
File
size: 3.12 B (3.12 KB bytes)
MIME-type: text/html
Charset: utf-8
Download Open Edit Advanced Editor Back
<section data-bs-version="5.1" class="slider6 mbr-embla cid-tyBPmVaLHb" id="slider6-6">
<div class="position-relative">
<div class="mbr-section-head">
<h4 class="mbr-section-title mbr-fonts-style align-center mb-0 display-2 text-primary"><strong>Latest News</strong></h4>
</div>
<div class="embla mt-4" data-skip-snaps="true" data-align="center" data-contain-scroll="trimSnaps" data-loop="true" data-auto-play="true" data-auto-play-interval="5" data-draggable="true">
<div class="embla__viewport container">
<div class="embla__container">
<?php
$news_query = "SELECT posts.slug, posts.image, posts.date, posts.description, posts.name as 'post_title', categories.name as 'category_name' FROM posts INNER JOIN categories ON posts.category_id = categories.id WHERE posts.category_id IN (2,4) AND posts.status = 0";
$news_query_run = mysqli_query($con, $news_query);
if(mysqli_num_rows($news_query_run) > 0)
{
foreach( $news_query_run as $newsitem)
{
?>
<div class="embla__slide slider-image item" style="margin-left: 1rem; margin-right: 1rem;">
<div class="slide-content">
<div class="item-wrapper">
<div class="item-img">
<img src="<?= base_url('uploads/posts/'.$newsitem['image']) ?>" alt="news image" title="" height="300px">
</div>
</div>
<div class="item-content">
<h5 class="item-title mbr-fonts-style display-4"><em><?= $newsitem['date'] ?></em></h5>
<h6 class="item-subtitle mbr-fonts-style mt-1 display-7"><strong><?= $newsitem['category_name'] ?></strong></h6>
<p class="mbr-text mbr-fonts-style mt-3 display-7"><?= $newsitem['post_title'] ?></p>
</div>
<div class="mbr-section-btn item-footer mt-2"><a href="<?= base_url('post/'.$newsitem['slug']); ?>" class="btn item-btn btn-primary-outline display-7" target="_blank">Read More ></a></div>
</div>
</div>
<?php
}
}
?>
</div>
</div>
<button class="embla__button embla__button--prev">
<span class="mobi-mbri mobi-mbri-arrow-prev mbr-iconfont" aria-hidden="true"></span>
<span class="sr-only visually-hidden visually-hidden">Previous</span>
</button>
<button class="embla__button embla__button--next">
<span class="mobi-mbri mobi-mbri-arrow-next mbr-iconfont" aria-hidden="true"></span>
<span class="sr-only visually-hidden visually-hidden">Next</span>
</button>
</div>
</div>
</section>