:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/tdrbazaar.com/**
:: Editing File: blogs-details.php
<?php include('crm/db.php'); /* |-------------------------------------------------------------------------- | Get Blog URL |-------------------------------------------------------------------------- | Example: | blog-details.php?url=what-is-tdr-complete-guide */ $blog_url = isset($_GET['url']) ? trim($_GET['url']) : ''; if (empty($blog_url)) { header("Location: blogs.php"); exit; } /* |-------------------------------------------------------------------------- | Fetch Blog |-------------------------------------------------------------------------- */ $stmt = mysqli_prepare( $conn, "SELECT * FROM blogs WHERE url = ? AND status = 'Active' LIMIT 1" ); mysqli_stmt_bind_param($stmt, "s", $blog_url); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); if (mysqli_num_rows($result) == 0) { header("HTTP/1.0 404 Not Found"); include('404.php'); exit; } $blog = mysqli_fetch_assoc($result); /* |-------------------------------------------------------------------------- | Blog Variables |-------------------------------------------------------------------------- */ $blog_id = $blog['id']; $blog_name = $blog['name']; $blog_url = $blog['url']; $blog_image = $blog['image']; $blog_description = $blog['description']; $meta_keyword = $blog['meta_keyword']; $meta_description = $blog['meta_description']; $author_name = $blog['author_name']; $blog_date = $blog['blog_date']; /* |-------------------------------------------------------------------------- | Format Date |-------------------------------------------------------------------------- */ $formatted_date = ''; if (!empty($blog_date)) { $formatted_date = date("F d, Y", strtotime($blog_date)); } /* |-------------------------------------------------------------------------- | Blog Image |-------------------------------------------------------------------------- */ if (!empty($blog_image)) { $image_path = "logo/blog/" . $blog_image; } else { $image_path = "logo/blog/default.jpg"; } /* |-------------------------------------------------------------------------- | SEO Values |-------------------------------------------------------------------------- */ $page_title = !empty($blog_name) ? $blog_name . " | TDR Bazaar" : "Blog | TDR Bazaar"; $page_description = !empty($meta_description) ? $meta_description : strip_tags($blog_description); $page_keywords = !empty($meta_keyword) ? $meta_keyword : $blog_name; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php echo htmlspecialchars($page_title); ?></title> <meta name="description" content="<?php echo htmlspecialchars($page_description); ?>"> <meta name="keywords" content="<?php echo htmlspecialchars($page_keywords); ?>"> <meta name="author" content="<?php echo htmlspecialchars($author_name); ?>"> <!-- Open Graph --> <meta property="og:title" content="<?php echo htmlspecialchars($blog_name); ?>"> <meta property="og:description" content="<?php echo htmlspecialchars($page_description); ?>"> <meta property="og:image" content="<?php echo htmlspecialchars($image_path); ?>"> <meta property="og:type" content="article"> <meta property="og:url" content="<?php echo htmlspecialchars($_SERVER['REQUEST_URI']); ?>"> <!-- Existing CSS --> <!-- Keep your existing CSS / JS includes here --> <?php include"header.php"?> <div id="smooth-wrapper"> <div id="smooth-content"> <!-- ========================================================= Breadcrumb Section Start ========================================================== --> <div class="gt-breadcrumb-wrapper bg-cover" style="background-image: url('assets/img/breadcrumb.jpg');"> <div class="container"> <div class="gt-page-heading"> <div class="gt-breadcrumb-sub-title"> <h1 class="wow fadeInUp" data-wow-delay=".3s"> <?php echo htmlspecialchars($blog_name); ?> </h1> </div> <ul class="gt-breadcrumb-items wow fadeInUp" data-wow-delay=".5s"> <li> <a href="blogs.php"> Blogs </a> </li> <li> <i class="fa-solid fa-chevron-right"></i> </li> <li> <?php echo htmlspecialchars($blog_name); ?> </li> </ul> </div> </div> </div> <!-- Breadcrumb Section End --> <!-- ========================================================= Blog Details Section Start ========================================================== --> <section class="propertie-details-section fix section-padding"> <div class="container"> <div class="propertie-details-wrapper"> <div class="row g-4"> <!-- ================================================= LEFT CONTENT ================================================== --> <div class="col-lg-8"> <div class="propertie-details-wrapper gt-news-details-wrapper"> <!-- Blog Image --> <div class="details-image"> <img src="<?php echo htmlspecialchars($image_path); ?>" alt="<?php echo htmlspecialchars($blog_name); ?>" class="w-100" > </div> <!-- Blog Content --> <div class="details-content"> <!-- Blog Title --> <h2> <?php echo htmlspecialchars($blog_name); ?> </h2> <!-- Blog Information -- <ul class="list mt-3 mb-4"> <?php if (!empty($blog_date)) { ?> <li> <i class="fa-solid fa-calendar-days"></i> <?php echo $formatted_date; ?> </li> <?php } ?> <?php if (!empty($author_name)) { ?> <li> By <?php echo htmlspecialchars($author_name); ?> </li> <?php } ?> </ul> --> <br> <!-- ================================================= IMPORTANT Description contains HTML from backend. Therefore DON'T use htmlspecialchars here. ================================================== --> <div class="blog-description"> <?php echo $blog_description; ?> </div> </div> </div> </div> <!-- ================================================= RIGHT SIDEBAR ================================================== --> <?php include "sidebar.php"; ?> </div> </div> </div> </section> <!-- Blog Details Section End --> <!-- ========================================================= Footer ========================================================== --> <?php include "footer.php"; ?> </div> </div> </body> </html>