<?php
include_once("include/main.inc.php");
$hover = 'blogs';
$blog_query = mysqli_query($GLOBALS['dbconn'], "select blogDate,catImage,catName,blogDname,catDesc from blog_tbl order by catID desc");
$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"; ?>

    <div class="heading_banner" style="background-image: url(<?= site_url; ?>/designer/images/blog-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 Blogs</h1>
                    <div class="clearfix"></div>
                    <!-- <div class="cat_title2">We Are Available For You</div> -->
                </div>
            </div>
        </div>
    </div>

    <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>


    <div class="blog_page">
        <div class="container">
            <h2 class="title_2">Our Blogs</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'], 383, 383, $blog_res['catName'], "/uploaded-files/blog/images/");
                    } else {
                        $blog_img = NO_IMG_URL;
                    }
                ?>
                    <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-6 col-sm-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="<?= $blog_res['blogDname']; ?>"><img src="<?= $blog_img; ?>" alt="<?= $blog_res['blogDname']; ?>" title="<?= $blog_res['blogDname']; ?>"></a>
                            </div>
                            <div class="blog-content2">
                                <div class="b-meta">
                                    <div class="meta-info">
                                        <!-- <ul>
                                        <li><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
                                                fill="currentColor" viewBox="0 0 16 16">
                                                <path
                                                    d="M10.854 7.146a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708 0z" />
                                                <path
                                                    d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z" />
                                            </svg> <?= $day; ?> <?= $month; ?> <?= $year; ?></li>

                                    </ul> -->
                                    </div>
                                </div>
                                <h3 class="title_h5"><a href="<?= site_url; ?>/blog/<?= getValidFileName($blog_res['catName']); ?>.htm" title="<?= $blog_res['blogDname']; ?>"><span><?= $blog_res['blogDname']; ?></span></a></h3>
                                <p><?= html_entity_decode($blog_res['catDesc']); ?></p>

                            </div>
                        </div>
                    </div>
                <?php } ?>

            </div>
        </div>
    </div>

    <?php include "app_testimonials.php"; ?>
    <?php include "app_clients.php"; ?>
    <?php include "app_faq.php"; ?>

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

</html>