<?php 
	include("../include/config.php");
	error_reporting(0);
    $url = $_GET['option'];
    $optionx = str_replace("-"," ",$url); 

$sql1m = "select * from `blog` WHERE `blog`.`url` = '$url'";	
// echo $sql1m ; die;
    $result1m = mysqli_query($conn, $sql1m);											
    if (mysqli_num_rows($result1m) > 0) {
        $i=1;
        while($row1m = mysqli_fetch_assoc($result1m)) {
            $det_det_id = $row1m['id'];
            $det_title = $row1m['title'];
            
            $det_blogs_details = $row1m['blogs_details'];
            $det_post_by = $row1m['post_by'];
			$det_date_add = $row1m['date_add'];
            $det_picture = $row1m['picture'];
			$det_keyword = $row1m['keyword'];
			$det_description = $row1m['description'];
            
        }
    }
    
    $ptitle = $det_title;
    $pkeywords = $det_keyword;
    $pdesc = $det_description;
	include("../include/header.php");
?>

<style>
    .single-blog-details .featured-thubnail {
    margin-bottom: 20px;
    /*height: 400px !important;*/
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
.single-blog-details h1{
    font-size: 26px;
    text-transform: capitalize;
    line-height: 2.5rem;

}
.single-blog-details .post-meta{
    /*font-size: 22px;*/
    text-transform: capitalize;
}
.single-blog-details .myph{
    height: auto !important;
}
.single-blog-details iframe{
    
    width:100% !important;
}
.aku-details img{
    width:100% !important;
    height:auto !important;
}
@media only screen and (max-width: 767px) {
    .single-blog-details .featured-thubnail {
    height: auto !important;
    width: 100% !important;
}
}
    
</style>
<section class="page-banner-wrap d-flex align-items-center">
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<div class="page-banner">
					<h2>Blog</h2>
					<ul>
						<li><a href="<?php echo $base_url;?>">home</a></li>
						<li><a href="javascript:void(0);"> blog</a></li>
						<li><a href="javascript:void(0);"><?php echo $det_title;?></a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</section> <!-- /.page-banner-wrap -->

<section class="blog-details section-padding">
	<div class="container">
		<div class="row">
			<div class="col-lg-8 col-12">
				<div class="single-blog-details">
				    <!--Rethinking the Future of the Financial Services Industry-->
				    <?php
				    if($det_det_id=='50'){
				        
				        ?>
<!--				        <video  autoplay loop muted playsinline style="width: 100%;  height: auto;">-->
<!--  <source src="VID-20250311-WA0003.mp4" type="video/mp4">-->

<!--  Your browser does not support the video tag.-->
<!--</video>-->

<video id="myVideo" controls autoplay playsinline style="width: 100%; height: auto;">
  <source src="VID-20250311-WA0003.mp4" type="video/mp4">
</video>
				        <?php
				    }else{
				        
				        ?>
				        	<img class="featured-thubnail" alt="<?php echo $det_title;?>" src="<?php echo $base_url . 'admin/blogs/blogs-files/' .$det_picture;?>" >
				        <?php
				    }
				    
				    ?>
				
					
					
					
					
					<h1><?php echo $det_title;?></h1>
					<div class="post-meta mt-3">
						<span class="p-date"><strong>Date:</strong><?php echo $det_date_add;?></span>
						<span class="p-author"><strong>Posted by:</strong><?php echo $det_post_by;?></span>
					</div>
					<div class="aku-details">
					   <?php echo $det_blogs_details;?> 
					</div>
					
				</div> <!-- /.single-blog-details -->

				
			</div> <!-- /.col-lg-8 col-sm-12 -->


			<!-- blog sidebar section -->
			<div class="col-lg-4 col-12 sidebar-wrapper">
				

				<div class="single-sidebar-widgets recent-post">
					<h3>Recent Posts</h3>
					<?php
					
$sql1m1 = "select * from `blog` ORDER BY `blog`.`id` DESC LIMIT 10;";	
//echo $sql1m ." ". $l_id;
    $result1m1 = mysqli_query($conn, $sql1m1);											
    if (mysqli_num_rows($result1m1) > 0) {
        $i=1;
        while($row1m1 = mysqli_fetch_assoc($result1m1)) {
            $det_titles = $row1m1['title'];
            $det_blogs_urls = $row1m1['url'];
		$det_date_add1 = $row1m1['date_add'];
            		?>
					<div class="single-populer-post">
						<span><?php echo $det_date_add1;?></span>
						<a href="<?php echo $base_url . 'blogs/' .$det_blogs_urls; ?>"><?php echo $det_titles;?></a>
						
					</div> <!-- /.single-populer-post -->
				<?php }}?>
				</div> <!-- /.single-sidebar-widgets -->

				<div class="single-sidebar-widgets">
					<h3>Follow us</h3>
					<div class="social-links">
						<a href="<?php echo $fb_link;?>" target="_blank"><i class="fab fa-facebook-f"></i></a>
						<!--<a href="<?php echo $fb_twitter;?>" target="_blank"><i class="fab fa-twitter"></i></a>-->
						<a href="<?php echo $fb_linkedIn;?>" target="_blank"><i class="fab fa-linkedin-in"></i></a>
						<!--<a href="<?php echo $fb_Insta;?>" target="_blank"><i class="fab fa-instagram"></i></a>-->
					</div>
				</div> <!-- /.single-sidebar-widgets -->

			</div> <!-- /.col-lg-4 col-sm-12 -->
		</div>
	</div>
</section>



<?php 
	include("../include/footer.php");
?>
<script>
    window.onload = function () {
    var video = document.getElementById("myVideo");
    
    if (video) { // Check if the element exists
        video.muted = false;
        video.play().catch(error => {
            console.log("Autoplay with sound blocked by the browser:", error);
        });
    } else {
        console.log("Video element not found.");
    }
};

</script>