D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
.trash
/
Filename :
blog-details.php
back
Copy
<?php include('admin/connection.php'); $id= $_GET['blog'] ?? ""; if($id !='') { $data = mysqli_query($conn,"select * from blog where slug = '$id'"); $row =mysqli_fetch_array($data); if(!isset($row['slug'])){ $requestUri = $_SERVER['REQUEST_URI']; $arr_blog = explode('?blog=',$requestUri); $blog_id = $arr_blog[1] ?? $id; $data = mysqli_query($conn,"select * from blog where id = '$blog_id'"); $row2 =mysqli_fetch_array($data); if(isset($row2['slug']) && $row2['slug'] !='') { header("Location: $base_url"."blog/".$row2['slug'], false, 302); exit(); } header('location:'.$base_url); exit(); } } else { header('location:'.$base_url); exit(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title><?php echo $row['meta_title']; ?></title> <meta name="keywords" content="<?php echo $row['meta_key']; ?>" > <meta name="description" content="<?php echo $row['meta_desc']; ?>" > <link rel="canonical" href="<?php echo $base_url ?>blog/<?php echo $row['slug'];?>" /> <meta property="og:locale" content="en_US" /> <meta property="og:title" content="<?php echo $row['meta_title'];?>" /> <meta property="og:description" content="<?php echo $row['meta_desc'];?>" /> <meta property="og:url" content="<?php echo $base_url ?>blog/<?php echo $row['slug'];?>" /> <meta property="og:site_name" content="Jaipur Party Planer" /> <?php echo $row['seo_syntax'];?> <?php include 'include/links.php'; ?> <?php include 'include/header.php'; ?> <?php $id= $_GET['blog']; $data = mysqli_query($conn,"select * from blog where slug = '$id'"); $row =mysqli_fetch_array($data); ?> <style> .details-page-img img{ width:100%; height:auto; } </style> <!-- Header Start --> <div class="container-fluid bg-breadcrumb"> <div class="container text-center py-5" style="max-width: 900px;"> <h3 class="text-white mb-2 wow fadeInDown" data-wow-delay="0.1s" style="text-transform: capitalize;"><?php echo $row['title']; ?></h1> </div> </div> <!-- Header End --> <div class="container-fluid service pt-5"> <div class="container-fluid mb-5 details-card"> <div class="row"> <div class="col-lg-12"> <div class=" mb-3 details-page-img"> <?php echo "<img style='height:400px' alt='".$row['title']."' src='$base_url"."admin/".$row['Image']."'>";?> </div> </div> <div class="col-lg-12 mb-4"> <div class="d-flex align-items-center justify-content-between"> <h2 class="mb-3" style="text-transform: capitalize;"><?php echo $row['title']; ?> <span class="blog-span" style="font-size: 15px;color: #a28b54 !important;font-weight: 600;"><?php echo $row['author'];?></span></h2> <span class="blog-span" style="float:right;"><i class="fas fa-calendar-alt"></i> <?php echo $row['createdate'];?></span> </div> <hr style="margin-top: 1px;"> <div class="content"> <?php $abc = $row['description']; $data1 = html_entity_decode($abc); echo $data1; ?> </div> </div> </div> </div> </div> <div class="container"> <div class="row my-3"> <?php $rimage1 = $row['rimage1']; if(!empty($rimage1)) {?> <div class="col-lg-4 col-md-4 col-sm-4"> <div class="related-img"> <img src="<?php echo $base_url ?>admin/<?php echo $row['rimage1'];?>" title=" <?php echo $row['rimage1_title']; ?>" alt=" <?php echo $row['rimage1_alt']; ?>"> </div> </div> <?php }?> <?php $rimage2 = $row['rimage2']; if(!empty($rimage2)) {?> <div class="col-lg-4 col-md-4 col-sm-4"> <div class="related-img"> <img src="<?php echo $base_url ?>admin/<?php echo $row['rimage2'];?>" title=" <?php echo $row['rimage2_title']; ?>" alt=" <?php echo $row['rimage2_alt']; ?>"> </div> </div> <?php }?> <?php $rimage3 = $row['rimage2']; if(!empty($rimage3)) {?> <div class="col-lg-4 col-md-4 col-sm-4"> <div class="related-img"> <img src="<?php echo $base_url ?>admin/<?php echo $row['rimage3'];?>" title=" <?php echo $row['rimage3_title']; ?>" alt=" <?php echo $row['rimage3_alt']; ?>"> </div> </div> <?php }?> </div> </div> <!-- Blog Start --> <div class="container-fluid blog py-5"> <div class="container py-5"> <div class="section-title mb-5 wow fadeInUp" data-wow-delay="0.1s"> <div class="sub-style"> <h4 class="sub-title px-3 mb-0"> Recent Blogs</h4> </div> </div> <div class="row g-4"> <?php $blog = "select * from blog ORDER BY id DESC LIMIT 3"; $blogdata = mysqli_query($conn, $blog); while ($row=mysqli_fetch_array($blogdata)) { ?> <div class="col-md-6 col-lg-6 col-xl-4 wow fadeInUp" data-wow-delay="0.1s"> <div class="blog-item rounded"> <div class="blog-img"> <a href="<?php echo $row['slug']?>"> <?php echo "<img alt='".$row['title']."' src='$base_url"."admin/".$row['Image']."'>";?> </a> </div> <div class="blog-centent p-4"> <div class="blog-title-head"> <a href="<?php echo $row['slug']?>" class="h4"><?php echo $row['title'];?></a> <span class="blog-span" style="float:right;"><i class="fas fa-calendar-alt"></i> <?php echo $row['createdate'];?></span> </div> <p class="blog-span mt-2"><?php echo $row['author'];?></p> <div class="content my-4"><?php echo $row['description'];?></div> <a href="<?php echo $row['slug']?>" class="btn btn-primary rounded-pill text-white py-2 px-4 mb-1">Read More</a> </div> </div> </div> <?php }?> </div> <div class="blog-btn"> <a href="<?php echo $base_url ?>blog" class="more-blog"> More Blogs</a> </div> </div> </div> <!-- Blog End --> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script src="js/swiper.min.js"></script> <script src="js/easyzoom.js"></script> <script src="js/swipermain.js"></script> <?php include 'include/footer.php'; ?>