<?php require_once("header.php");?>

			<!-- page template area start -->
			<div style="background-image: url('images/bg/blog.jpg'); background-size:100% 100%; padding:90px 0;" id="desktop-view">
  				<div class="">
					<div class="section-content">
						<div class="row">
							<div class="col-md-12">
								<h1 class="title text-white text-center">Blog</h1>
								<p class="text-white text-center"><a href="index.php">Home</a> / Blog</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div style="background-image: url('images/bg/blog.jpg'); background-size:100% 100%; padding:60px 0;" id="tab-view">
  				<div class="">
					<div class="section-content">
						<div class="row">
							<div class="col-md-12">
								<h1 class="title text-white text-center">Blog</h1>
								<p class="text-white text-center"><a href="index.php">Home</a> / Blog</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div style="background-image: url('images/bg/blog.jpg'); background-size:100% 100%; padding:35px 0;" id="mobile-view">
  				<div class="">
					<div class="section-content">
						<div class="row">
							<div class="col-md-12">
								<h1 class="title text-white text-center">Blog</h1>
								<p class="text-white text-center"><a href="index.php">Home</a> / Blog</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<section id="about">
				<div class="container mt-0 pb-0 pt-30">
					<div class="section-content">
						<div class="row">
						    <?php
							$sql_blog = "SELECT * FROM `pr_blogs` WHERE `blog_status` = 'Active' ORDER BY `blog_id` DESC";
							$exe_blog = mysqli_query($connection,$sql_blog);
							while($arr_blog = mysqli_fetch_array($exe_blog))
							{
								?>
						    <div class="col-md-4">
							    <div style="padding:10px 10px; border-radius:5px; margin-bottom:20px; text-align:center; border: 1px solid #ccc; box-shadow: -3px 5px 7px 0px #ccc;">
							        <div class="mt-5 mb-10">
							            <div>
							            <img src="uploads/blog/<?php echo stripslashes($arr_blog['blog_photo']);?>" alt=""></div>
							        </div>
							        <p style="color:#949494; margin-bottom:5px;"><?php echo date("F d, Y",strtotime($arr_blog['blog_date']));?></p>
							        <h4 class="mt-0 mb-10"><?php echo substr(stripslashes($arr_blog['blog_title']),0,40);?></h3>
							        <p><button type="button" class="btn btn-flat btn-theme-colored border-left-theme-color-2-4px" onclick="window.location.href='blog-details.php?blog_id=<?php echo $arr_blog['blog_id'];?>'">Read More</button></p>
								</div>
							</div>
							<?php
							}
							?>
						</div>
					</div>
				</div>
			</section>
			<!-- page template area end -->


<?php require_once("footer.php");?>