<?php 

include_once("include/main.inc.php"); 

$hover='blog';
if (strpos($_SERVER['REQUEST_URI'], ".php") !== false) {
  
 	header("Location: ".site_url);
   				exit;
}

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

$page_metatitle="Blogs - ".$admin_res['companyName'];

$page_metakey="Blogs - ".$admin_res['companyName'];

$page_metadesc="Blogs - ".$admin_res['companyName'];

?>
<!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">
            <div class="cat_title">Blogs</div>
            <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;?>" class="text-dark">Home</a></li>
                <li class="breadcrumb-item active text-orange" aria-current="page">Blogs</li>
            </ol>
        </div>
    </nav>
    <div class="blogs-section home_blog pb-5 pt-4">
        <div class="container-fluid px-4">
            <h1 class="title1 text-center fs-30">Latest Blogs</h1>
            <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 class="row mt-4">
                 <?php 
                    while($blog_res=mysqli_fetch_array($blog_query)){ 
                    if($blog_res['catImage']!=''){
                    $blog_img=  getImage($blog_res['catImage'], 355, 355, $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-lg-6">
                    <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">
                                        <h2 class="title3"><a href="<?=site_url;?>/blog/<?=getValidFileName($blog_res['catName']);?>.htm" title="<?= $blog_res['blogDname'];?>"><?= $blog_res['blogDname'];?></a>
                                        </h2>
                                        <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>
 <!-- <h4 class="d-none"><?= $blog_res['blogDname'];?></h4> -->
    <?php include "app_footer.php"; ?>
    <?php include "app_bottom.php"; ?>





</body>

</html>