<?php 
include_once("include/main.inc.php"); 
$hover='blog';
$blog_query = mysqli_query($GLOBALS['dbconn'], "select * from blog_tbl");
$page_metatitle="Blogs- ".COMPANY_NAME;
$page_metakey="Blogs- ".COMPANY_NAME;
$page_metadesc="Blogs- ".COMPANY_NAME;
?>
<!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"; ?>



    <!-- Heading Banner-->
    <section class="heading_banner" style="background-image: url(<?=site_url;?>/designer/images/category-banner.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">
                    <h1 class="cat_title">Our Blog</h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </section>

    <!-- Breadcrumb-->
    <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 Blog</li>
                    </ul>
                </div>
            </div>
        </div>
</div>



    <!-- Home About-->
    <section class="blog_page">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-9 col-12">
                    <div class="blog_left">
                        <h2 class="catTitle_22">Our Blog</h2>
                        <div class="clearfix"></div>
                        <div class="row">
                        <?php
                    while($blog_res = mysqli_fetch_assoc($blog_query)){
                    
                        $date = new DateTime($blog_res['blogDate']);
                        $day = $date->format('d');
                        $month = $date->format('M');
                        $year = $date->format('Y');
                        if($blog_res['catImage']!=''){
                            $blog_img=  getImage($blog_res['catImage'], 426, 284, $blog_res['catName'], "/uploaded-files/blog/images/");
                   }else{
                       $blog_img= NO_IMG_URL;
                   } ?>
                            <div class="col-xxl-6 col-xl-6 col-lg-6 col-md-6 col-12">
                                <div class="single-post2 wow fadeInLeft" data-wow-delay=".3s">
                                    <div class="blog-thumb2">
                                        <a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?php echo $blog_res['blogDname'];?>"><img src="<?=$blog_img;?>" alt="<?php echo $blog_res['blogDname'];?>" title="<?php echo $blog_res['blogDname'];?>"></a>
                                    </div>
                                    <div class="blog-content2">
                                       
                                        <h3 class="titleBlog"><a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?php echo $blog_res['blogDname'];?>"><span><?php echo $blog_res['blogDname'];?></span></a></h3>
                                        <p><?=html_entity_decode(substr($blog_res['catDesc'],0,150));?>...</p>
                                        <a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" class="read_more_1 bg_btn_1" title="Read More">Read More <span></span><span></span><span></span><span></span></a>
                                    </div>
                                </div>
                            </div>
                    <?php } ?>
                           

                        </div>
                    </div>
                </div>
 <h4 class="d-none">Magic Car Manufacturer in Delhi.</h4>
                <!-- <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12">
                    <div class="left_sidebar">
                        <div class="left_title1">Popular Post</div>
                            <?php
                            $blog_query2 = mysqli_query($GLOBALS['dbconn'], "select * from blog_tbl limit 0,4");
                            while($blog_res1 = mysqli_fetch_assoc($blog_query2)){
                            ;?>
                        <div class="right_news">
                            <a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res1['catName']);?>.htm" title="<?php echo $blog_res1['blogDname'];?>">
                                <div class="image">
                                    <img src="<?=getImage($blog_res1['catImage'], 270, 180, $blog_res1['catName'], "/uploaded-files/blog/images/");?>" alt="<?php echo $blog_res1['blogDname'];?>" title="<?php echo $blog_res1['blogDname'];?>">
                                </div>
                            </a>
                            <h4 class="title-5 text-green px-3"><a class="text-green" href="<?=site_url;?>/blog/<?=getValidFileName($blog_res1['catName']);?>.htm" title="<?php echo $blog_res1['blogDname'];?>"><?php echo $blog_res1['blogDname'];?></a></h4>
                        </div>
                        <?php } ?>
                      


                    </div>
                </div> -->
            </div>
        </div>
    </section>

    <?php include "app_footer.php"; ?>
    <?php include "app_bottom.php"; ?>
</body>

</html>