
<?php 
include('admin/master/config.php');
    	$query=mysqli_query($conn, "SELECT * FROM `add-blog` order by id desc");

?>
<section class="ttm-row blog-section clearfix">
            <div class="container">
                
                <div class="row align-items-center">
                    <div class="col-lg-12 col-md-12">
                     
                        <div class="section-title text-center clearfix">
                            <div class="title-header">
                                <h5>NEWS CORNER</h5>
                                <h2 class="title">Take A Look At Insights</h2>
                            </div>
                        </div>
                    </div>
                </div>

               
                <section class="ttm-row grid-section clearfix">
            <div class="container">
               
                <div class="row">
                    <?php $i=0;
                                            
                                                while($row=mysqli_fetch_array($query)){
                                                      if($i<3){
                                            ?>
                    <div class="ttm-box-col-wrapper col-lg-4">
                        <!-- featured-imagebox-post -->
                        <div class="featured-imagebox featured-imagebox-post style1">
                            <div class="ttm-post-thumbnail featured-thumbnail">
                                <div class="post-meta">
                                    <span class="ttm-meta-line post-date"><i class="fa fa-calendar"></i><?= date('d M Y',strtotime($row['created'])) ?></span>
                                    <span class="ttm-meta-line byline"><i class="fa fa-user"></i>Admin</span>
                                </div>
                                <img class="img-fluid" src="admin/master/blog-image/<?=$row['image']?>" alt="image">
                            </div>
                            <div class="featured-content">
                                <div class="featured-title">
                                    <h5><a href="https://www.igsbpo.in/blog/<?php echo $row['slug'] ?>"><?= $row['title'] ?></a></h5>
                                </div>
                                <!--<div class="featured-desc">-->
                                    <p><?php //echo substr( $row['text'], 0, strrpos(substr( $row['text'], 0, 40), ' ')) . '...'; ?></p>
                                <!--</div>-->
                                <div class="post_box-footer">
                                    <div class="post-link">
                                        <a href="https://www.igsbpo.in/blog/<?php echo $row['slug'] ?>"><i class="ti ti-angle-right"></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>	<?php } $i++; } ?>	
                    
                    
                    
                    
                    
                </div>
            </div>
        </section>

                <div class="row">
                    <div class="col-lg-12">
                        <div class="mt-30 res-991-mt-15 text-center">
                            <a href="blog.php" class="end_button">
                                <span>+</span>View All Blogs
                            </a>
                        </div>
                    </div>
                </div>

            </div>
        </section>