<?php 
include_once("include/main.inc.php"); 
$hover='blog';
$blog_query = mysqli_query($GLOBALS['dbconn'], "select catImage,catName,blogDname,catDesc,blog_written,blogDate from blog_tbl");
$page_metatitle="Blogs - ".$admin_res['companyName'];
$page_metakey="Blogs - ".$admin_res['companyName'];
$page_metadesc="Blogs - ".$admin_res['companyName'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <?php include "app_top.php"; ?>
</head>
<body>
    <?php include "app_header.php"; ?>
    <section class="heading_banner" style="background-image: url(<?=site_url;?>/designer/images/banner1.jpg)">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-center">
                    <div class="cat_title">Our Blogs</div>
                    <div class="clearfix"></div>
                    <!-- <div class="cat_title2">We Are Available For You</div> -->
                </div>
            </div>
        </div>
    </section>
    <div class="inner_breadcrumb hidden_xs">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <ul class="breadcrumb">
                    <li><a href="<?=site_url;?>" title="Home">Home</a></li>
                        <li class="active">Our Blogs</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <section class="webpulse-home_blog">
        <div class="container">
            <h1 class="title_2 wow fadeInDown" data-wow-delay=".1s">Latest Blogs</h1>
         
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div class="h_blog row">
                        <?php 
                while($blog_res=mysqli_fetch_array($blog_query)){ 
                    $date = new DateTime($blog_res['blogDate']);
                    $day = $date->format('d');
                    $month = $date->format('F');
                    $year = $date->format('Y');
                if($blog_res['catImage']!=''){
                $blog_img=  getImage($blog_res['catImage'], 400, 300, $blog_res['catName'], "/uploaded-files/blog/images/");
                }else{
                    $blog_img= NO_IMG_URL;
                }
                $blog_shortdesc=str_ireplace('{companyName}',$admin_res['companyName'],$blog_res['catDesc']);
                ?>
                          <div class="col-md-6 col-lg-4" data-wow-delay=".2s">
                            <div class="btc_blog_indx_box_wrapper">
                                <a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?= $blog_res['blogDname'];?>">
                                    <div class="btc_blog_indx_img_wrapper">
                                        <img src="<?=$blog_img;?>" alt="<?= $blog_res['blogDname'];?>"
                                            title="<?= $blog_res['blogDname'];?>">
                                        <div class="btc_blog_indx_date_wrapper">
                                            <span><i class=""><svg xmlns="http://www.w3.org/2000/svg"
                                                        xmlns:xlink="http://www.w3.org/1999/xlink" fill="#ffffff"
                                                        height="20px" width="20px" version="1.1"
                                                        viewBox="0 0 476.213 476.213" xml:space="preserve">
                                                        <polygon
                                                            points="476.213,238.105 400,161.893 400,223.106 0,223.106 0,253.106 400,253.106 400,314.32 " />
                                                    </svg></i></span>
                                        </div>
                                    </div>
                                    <div class="btc_blog_indx_cont_wrapper">
                                        <!-- <p>Dec 15, 2022</p> -->
                                        <h2 class="title3 py-0"><?= $blog_res['blogDname'];?></h2>
                                    </div>
                                </a>
                            </div>
                        </div>
<?php } ?>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php include "app_footer.php"; ?>
    <?php include "app_bottom.php"; ?>
</body>
</html>