<?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 pageTitle, pageKeywords, pageDescription,headingh1, headingh2,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'];

$heading1=$res_latest['headingh1'];

$heading2=$res_latest['headingh2'];

$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');

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

<head>
    <meta charset="utf-8">
  
    <?php include "app_top.php"; ?>
</head>

<body>
    <?php include "app_header.php"; ?>
    <div class="small-banner py-4 heading_banner position-relative">
        <div class="text-center position-relative z-index-9">
            <h1 class="cat_title"> <?= !empty($heading1) ? $heading1 : $blogdisplay; ?></h1>
            <div class="clearfix"></div>
            <!-- <div class="cat_title2">We Are Available For You</div> -->
        </div>
    </div>
    <nav aria-label="breadcrumb" class="py-0 position-relative z-index-9 bg-light-light border-bottom">
        <div class="container-fluid px-4 py-2">
            <ol class="breadcrumb mb-0">
                <li class="breadcrumb-item"><a href="<?=site_url;?>" title="Home" class="text-dark">Home</a></li>
                <li class="breadcrumb-item active text-orange" aria-current="page">Blogs</li>
            </ol>
        </div>
    </nav>
    <div class="webpulse-main-wrapper">




        <section class="blog_page pt-5 pb-3">
            <div class="container-fluid px-4">
                <div class="row">
                    <div class="col-md-12">
                        <div class="blog_left blog_details">
                            <h2 class="title1 text-start fs-30"> <?= !empty($heading2) ? $heading2 : $blogdisplay; ?></h2>

                            
                            <div class="border-bottom border-3 w-100px border-primary me-auto pt-1 mb-3"></div>

                            <div class="separator separatorss text-start mt-0"><span><i></i></span></div>

                            <ul>
                                <li><i class="fa fa-user"></i> By: <?=$res_latest['blog_written'];?></li>
                                <!-- <li><i class="fa fa-clock-o"></i> April 08, 2019</li> -->
                            </ul>


                            <span class='st_facebook'></span>
                            <span class='st_twitter'></span>
                            <span class='st_googleplus'></span>
                            <span class='st_pinterest'></span>
                            <span class='st_linkedin'></span>
                            <span class='st_email'></span>
                            <span class='st_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-images-detail">
                                    <img class="img-responsive" src="<?=getImage($res_latest['catImage'], 1000, 500, $res_latest['catName'], "/uploaded-files/blog/images/"); ?>" alt="<?=$blogdisplay;?>" title="<?=$blogdisplay;?>">
                                </div>

                                <?php echo html_entity_decode($blog_desc);?>

                              


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

                                    <div class="fb-comments" data-href="<?= $admin_res['facebook_link'];?>"
                                        data-width="1000px" data-numposts="5"></div>


                                </div>






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

        <div class="blogs-section home_blog pb-3 bg-light pt-4">
            <div class="container-fluid px-4">
                <div class="products_heading wow fadeInDown mb-0" data-wow-delay=".1s">
                    <div class="title1 text-center fs-30">Popular Post</div>
                    <div class="border-bottom border-3 w-100px border-primary mx-auto pt-1 mb-3"></div>
                    <p class="text-center w-75 mx-auto">Stay updated with our latest blogs, offering valuable insights into the world of rehabilitation and surgical innovations. Our expert articles cover topics ranging from emerging technologies to best practices in patient care. Dive into evidence-based research, expert opinions, and practical tips to enhance your knowledge and improve outcomes. Join the conversation and expand your understanding today!</p>


                </div>
                <div class="clearfix"></div>
                <div class="blogs  owl-carousel">
                    <?php 

                $blog_reltd = mysqli_query($GLOBALS['dbconn'], "select catImage,catName,catID,blogDname,catDesc,headingh1, headingh2,blog_written,blogDate from blog_tbl order by catID DESC");



                while($blog_res=mysqli_fetch_array($blog_reltd)){ 

                    if($blog_res['catImage']!=''){

                        $blog_img=  getImage($blog_res['catImage'], 576, 298, $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="item p-3 rounded overflow-hidden">
                        <div class="events-full-box wow fadeInDown mb-4 animated" data-wow-delay=".3s"
                            style="visibility: visible; animation-delay: 0.3s; animation-name: fadeInDown;">
                            <div class="events-single-box">
                                <div class="row">
                                    <div class="col-md-5">
                                        <div class="position-relative">
                                            <!-- <span
                                                class="position-absolute text-white top-0 start-0 ms-3 mt-1 px-2 py-0 bg-warning rounded-start rounded-3">
                                                <i class="fa fa-calendar event-icon"></i> 24<sup>th</sup> Feb, 2020
                                            </span> -->
                                            <a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?= $blog_res['blogDname'];?>">
                                                <img class="img-responsive" src="<?=$blog_img;?>"
                                                    alt="<?= $blog_res['blogDname'];?>" title="<?= $blog_res['blogDname'];?>">
                                            </a>
                                        </div>
                                    </div>
                                    <div class="col-md-7">
                                        <div class="event-info">
                                            <div class="title3"><a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?= $blog_res['blogDname'];?>"><?= $blog_res['blogDname'];?></a>
    </div>
                                            <p><?= html_entity_decode(substr($blog_shortdesc,0,200)) ;?>...
                                            </p>
                                            <div class="d-flex align-items-center justify-content-between">
                                                <a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="Read More"
                                                    class=" btn bg-dark-blue text-white rounded-pill fs-15 lh-base px-3 lh-40px my-0 h-40px py-0">Read
                                                    More</a>
                                                <p class="events-time fw-bold mb-0">
                                                    <span> <i class="fa fa-user event-icon"></i> Posted by: Admin
                                                    </span>
                                                </p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <?php } ?>
                </div>

            </div>
        </div>




    </div>

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

</html>