<?php
include_once("include/main.inc.php");
$hover=='blog';
@extract($_GET);
@extract($_POST);
@extract($_REQUEST);
if (preg_match('webpulse\.co$/', $_SERVER['HTTP_HOST'], $match)) {
	$match1=$match[1];
	$vanity_url='http://'.$_SERVER['HTTP_HOST'];
}
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$mm=$ee[4];
$ss=explode('.',$mm);
$cc=$ss[0];
$cat=str_replace("-", " ", $cc);
$cats=ucfirst($cat);
$catss=ucwords($cat);
$blog_name = ucwords(str_replace('-', ' ', $blog_name));
$sql_latest=mysqli_query($GLOBALS['dbconn'],"select catImage,catName,blogDname,catDesc,catDesc1,banner1,blog_written,blogDate,catID from blog_tbl where catName='$blog_name'");
$res_latest=mysqli_fetch_array($sql_latest);
$blogdisplay=$res_latest['blogDname'];
$blog_ID=$res_latest['catID'];
$page_metatitle=$res_latest['pageTitle']!=''?$res_latest['pageTitle']:$res_latest['blogDname'];
$page_metakey=$res_latest['pageKeywords']!=''?$res_latest['pageKeywords']:$res_latest['blogDname'];
$page_metadesc=$res_latest['pageDescription']!=''?$res_latest['pageDescription']:$res_latest['blogDname'];
$blog_desc=str_ireplace('{companyName}',$admin_res['companyName'],$res_latest['catDesc1']);
$date = new DateTime($res_latest['blogDate']);
$day = $date->format('d');
$month = $date->format('M');
$year = $date->format('Y');
$blog_query1 = mysqli_query($GLOBALS['dbconn'], "select catImage,catName,blogDname,catDesc,blog_written from blog_tbl");
$blog_query = mysqli_query($GLOBALS['dbconn'], "select catImage,catName,blogDname,catDesc,blog_written from blog_tbl");
if(mysqli_num_rows($sql_latest)>0){

}else{
     header("Location: " . site_url);
    exit;
}

?>

<!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>
<div class="header2">
        <?php include "app_header.php"; ?>
    </div>

    <section class="heading_banner" style="background-image: url(<?=site_url;?>/designer/images/aboutsbanner.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"><?=$blogdisplay;?></h1>
                    <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><a href="blog.php" title="Blog">Blog</a></li>
                        <li class="active"><?=$blogdisplay;?></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>


    <div class="blog_page">
        <div class="container">

        <div class="title_21 h2_title  aboutTitle"><?=$blogdisplay;?><span> </span></div>
        
        <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="blog_left blog_details bg-transparent">
                        <ul>
                            <li><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                                    <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path>
                                </svg> By: <?= $res_latest['blog_written'];?></li>
                            <!-- <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>
                                    <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"></path>
                                </svg> Jul 04, 2022</li> -->
                        </ul>


                        <span class='st_facebook' data-display-text='Facebook'></span>
                        <span class='st_twitter' data-display-text='Tweet'></span>
                        <span class='st_instagram' data-display-text='Instagram'></span>
                        <span class='st_pinterest' data-display-text='Pinterest'></span>
                        <span class='st_linkedin' data-display-text='LinkedIn'></span>
                        <span class='st_email' data-display-text='Email'></span>
                        <span class='st_whatsapp' data-display-text='whatsapp'></span>
                        <script>
                            var switchTo5x = true;
                        </script>
                        <script id="st_insights_js" src="http://w.sharethis.com/button/buttons.js?publisher=c753f626-1376-4cf4-9b90-03d3c1fcf65e&product=widget"></script>
                        <script>
                            stLight.options({
                                publisher: "c753f626-1376-4cf4-9b90-03d3c1fcf65e",
                                doNotHash: false,
                                doNotCopy: false,
                                hashAddressBar: false
                            });
                        </script>
                        <div class="blog_details1">
                            <div class="blog_details_img">
                                <img src="<?=getImage($res_latest['catImage'], 1000, 500, $res_latest['catName'], "/uploaded-files/blog/images/"); ?>" 
                                alt="<?= $res_latest['blogDname']; ?>" title="<?= $res_latest['blogDname']; ?>">
                            </div>
                            <?php echo html_entity_decode($blog_desc);?>

                            <div class="facebook_comment">
                                <div id="fb-root"></div>
                                <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v3.2"></script>

                                <div class="fb-comments" data-href="https://www.facebook.com/webpulsesolution/" data-width="1000px" data-numposts="5"></div>
                            </div>

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

    <div class="home_latest_blog bg-dark1">
        <div class="container pb-3">
            <div class="h2_title_1 wow fadeInDown animated" data-wow-delay=".1s">Related Blogs</div>
            <p class="mx-auto text-white text-center mb-4 w-75">Dive into our latest blogs for expert insights, industry trends, and behind-the-scenes looks at our projects. From fabrication tips to event setup ideas, we share valuable knowledge that inspires and informs. Stay updated with fresh content that reflects our innovation, craftsmanship, and dedication to delivering top-quality services across metal works, CNC cutting, event fabrication, and more.</p>
            <div class="row g-4">
            <?php 
                 $blog_reltd = mysqli_query($GLOBALS['dbconn'], "select catImage,catName,blogDname,catDesc,blog_written,blogDate from blog_tbl where catID!='$blog_ID'");
                 while($blog_res=mysqli_fetch_array($blog_reltd)){ 
                 if($blog_res['catImage']!=''){
                    $blog_img=  getImage($blog_res['catImage'], 415, 275, $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-xxl-4 col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12 wow zoomIn animated"
                    data-wow-delay=".2s" style="visibility: visible; animation-delay: 0.2s; animation-name: zoomIn;">
                    <div class="post clearfix">
                        <div class="featured-post">
                            <img src="<?= $blog_img; ?>" alt="<?= $blog_res['blogDname']; ?>" title="<?= $blog_res['blogDname']; ?>">
                            <ul class="post-comment">
                                <!-- <li class="date"><span class="day"> 14 </span></li>
                                <li class="comment"> Jan</li> -->
                            </ul>
                        </div>
                        <div class="content-post">
                            <div class="title-post"><a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm"
                             title="<?= $blog_res['blogDname']; ?>"><?= $blog_res['blogDname']; ?></a></div>

                            <div class="entry-post">
                        <p>   <?= html_entity_decode(substr($blog_shortdesc,0,200)) ;?>...</p>
                                <a class="read_more" href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="Read More"><span>Read More</span> </a>
                            </div>
                        </div>
                    </div>
                </div>
                <?php } ?>
                

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


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

</html>