<?php 
include_once("include/main.inc.php");
$blog_title = $_GET['blo_id'];
$blog_title = str_replace('-',' ',$blog_title);
$blog_data = blogDataByName($blog_title);
$blog_name = $blog_data['catName'];
$blogDname = $blog_data['blogDname'];
$blogDate = $blog_data['blogDate'];
$catImage = $blog_data['catImage'];
$blogDate = string_date($blogDate);
$blog_written = $blog_data['blog_written'];
$catDesc = $blog_data['catDesc'];
$catDesc1 = $blog_data['catDesc1'];
$current_page = "blogs";
?>





<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?=$blog_name;?></title>
    <meta name="keywords" content="<?=$blog_name;?>" />
    <meta name="description" content="<?=$blog_name;?>" />
    <?php include 'components/top_header.php';?>
</head>

<body>
    <div class="webpulse-main-wrapper">
        <!-- Header -->
        <?php include 'components/header.php';?>



        <!-- Heading Banner -->
        <section class="heading_banner" style="background-image: url(<?=SITE_URL_PATH;?>/designer/images/blog/blog.jpg)">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 text-center">
                        <h1 class="cat_title"><?=$blogDname;?></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-lg-12">
                        <ul class="breadcrumb">
                            <li><a href="<?=SITE_URL_PATH;?>" title="Home">Home</a></li>
                            <li><a href="<?=SITE_URL_PATH;?>/blog.htm" title="Blog">Blog</a></li>
                            <li class="active"><?=$blogDname;?></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <section class="blog_page">
            <div class="container">
                <div class="row">
                    <div class="col-lg-9 col-md-12">
                        <div class="blog_left blog_details">
                            <h2><?=$blogDname;?></h2>
                            <ul>
                                <li><i class="fa fa-user"></i> By: <?=$blog_written;?></li>
                                
                            </ul>
                            <div class="blog_details1">
                                <img class="img-responsive" src="<?= SITE_URL_PATH;?>/uploaded-files/blog/images/<?=$catImage;?>" alt="<?=$blogDname;?>" title="<?=$blogDname;?>">
                                <?=html_entity_decode($catDesc1);?>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>

                    <div class="col-lg-3 col-md-12">
                        <div class="left_sidebar">
                            <div class="left_title1">Popular Post</div>
                            <?php
                            $blog_sql = mysqli_query($GLOBALS['dbcon'],"select * from blog_tbl where status='Y' limit 0,3");
                            while($blog_res=mysqli_fetch_array($blog_sql)){

                            ?>
                            <div class="right_news">
                                <a href="<?=SITE_URL_PATH;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?=$blog_res['catName'];?>">
                                    <div class="image">
                                        <img src="<?=getImage($blog_res['catImage'], 500, 348, $blog_res['catName'],"/uploaded-files/blog/images/");?>" alt="<?=$blog_res['blogDname'];?>">
                                    </div>
                                </a>
                                <h3><a href="<?=SITE_URL_PATH;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?=$blog_res['catName'];?>"><?=$blog_res['blogDname'];?></a></h3>
                            </div>
                            <?php } ?>

                            <!-- <div class="right_news">
                                <a href="javascript:void()">
                                    <div class="image">
                                        <img src="designer/images/blog/blog/new1.jpg">
                                    </div>
                                </a>
                                <h5><a href="javascript:void()">Design Trends 2019: All The Home Decor Trends To Covet
                                        In The Coming Season</a></h5>
                            </div>


                            <div class="right_news">
                                <a href="javascript:void()">
                                    <div class="image">
                                        <img src="designer/images/blog/blog/new1.jpg">
                                    </div>
                                </a>
                                <h5><a href="javascript:void()">Design Trends 2019: All The Home Decor Trends To Covet
                                        In The Coming Season</a></h5>
                            </div>


                            <div class="right_news">
                                <a href="javascript:void()">
                                    <div class="image">
                                        <img src="designer/images/blog/blog/new1.jpg">
                                    </div>
                                </a>
                                <h5><a href="javascript:void()">Design Trends 2019: All The Home Decor Trends To Covet
                                        In The Coming Season</a></h5>
                            </div> -->



                            <div class="left_sidebar">
                            <?php include 'components/product_list.php';?>
                        </div>
                        </div>
 
                    </div>
                </div>
            </div>
        </section>


         
        



        <!-- Footer -->
        <?php include 'components/footer.php';?>
    </div>
    <?php include 'components/bottom_footer.php';?>
</body>

</html>