<?php include_once 'header.php';?>

<?php 
 $page = mysqli_fetch_array(db_query("select * from tbl_site_pages where site_pages_id='86'"));
?>

<section class="page-title" style="background-image: url('static_files/<?=$page[site_pages_inner_banner]?>');">
<div class="auto-container">
<div class="title-outer">
<h1 class="title"><?=$page['site_pages_name']?></h1>
<ul class="page-breadcrumb">
<li><a href="<?siteUrl()?>">Home</a></li>
<li><?=$page['site_pages_name']?></li>
</ul>
</div>
</div>
</section>

<!-- News Section -->
<section class="blog-sec pt-5 pb-5">
<div class="container">

<div class="row">

<?php 
$limit = 12;
$page = (isset($_GET['page'])) ? $_GET['page'] : 1;
$offset = ($page - 1) * $limit;
$index_blog=db_query("select * from tbl_blogs where blog_status='Active' order by blog_id desc LIMIT $offset,$limit");
$blog_count=db_scalar("select COUNT(*) from tbl_blogs");
while($blog=mysqli_fetch_array($index_blog)){   
$name=wordLimit($blog['blog_title'],25);
$desc=wordLimit(strip_tags($blog['blog_description']),120);
?>
<div class="news-block col-lg-4 col-md-6 col-sm-12">
<div class="inner-box">
<div class="image-box">
<figure class="image"><a href="latest-updates/<?=$blog['blog_url']?>" title='Puneet Immigration Services'><img src="<?=showImage($blog['blog_image_name'],'blog')?>" alt="<?=altTitle($blog['image_alt'],$blog['blog_title'])?>" title="<?=altTitle($blog['image_title'],$blog['blog_title'])?>"></a></figure>
<span class="date"><b><?=date('d',strtotime($blog['blog_add_date']))?></b> <?=date('M',strtotime($blog['blog_add_date']))?></span>
</div>
<div class="content-box">
<div class="content">
<h4 class="title"><a href="latest-updates/<?=$blog['blog_url']?>" title='Puneet Immigration Services' ><?=$name?></a></h4>
<a href="latest-updates/<?=$blog['blog_url']?>" title='Puneet Immigration Services' class="read-more">Read More <i class="fa fa-long-arrow-alt-right"></i></a>
</div>
</div>
</div>
</div>
<?php }?>
<?php if($blog_count > $limit){
$total_records = $blog_count;
$total_page = ceil($total_records / $limit);
$full_url = siteUrl()."/latest-updates";
insertPagination($full_url,$page,$total_page);} ?>

</div>

</div>
</section>
<!--End News Section -->

<?php include_once 'footer.php';?>