Boarding Pass
<?php
include 'includes/db.php';
if (!isset($_GET['title'])) {
header("Location: blog.php");
exit;
}
$title = urldecode($_GET['title']);
$stmt = $conn->prepare("SELECT * FROM blogs WHERE title = ?");
$stmt->bind_param("s", $title);
$stmt->execute();
$result = $stmt->get_result();
$blog = $result->fetch_assoc();
if (!$blog) {
echo "Blog not found.";
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?= htmlspecialchars($blog['title']) ?> - Petra Tissue Blog</title>
<link rel="stylesheet" href="assets/styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="icon" type="image/png" href="assets/images/favicon.ico">
<style>
.blog-detail-section {
padding: 60px 0;
background-color: #f9f9f9;
}
.blog-detail {
background: #fff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.blog-detail-image {
width: 100%;
max-height: 400px;
object-fit: cover;
border-radius: 12px;
margin-bottom: 25px;
}
.blog-meta {
font-size: 14px;
color: #777;
margin-bottom: 20px;
}
.blog-meta span {
margin-right: 20px;
}
.blog-content {
font-size: 17px;
line-height: 1.8;
color: #333;
}
.breadcrumb li {
display: inline;
color: #666;
}
.breadcrumb li::after {
content: " / ";
padding: 0 5px;
}
.breadcrumb li:last-child::after {
content: "";
}
@media screen and (max-width: 768px) {
.blog-detail {
padding: 20px;
}
}
</style>
</head>
<body>
<?php include 'includes/header.php'; ?>
<div class="floating-element"></div>
<div class="floating-element"></div>
<!-- Page Header -->
<section class="page-header reveal fade-bottom">
<div class="container">
<h1><?= htmlspecialchars($blog['title']) ?></h1>
<ul class="breadcrumb">
<li><a href="index.php">Home</a></li>
<li><a href="blog.php">Blog</a></li>
<li><?= htmlspecialchars($blog['title']) ?></li>
</ul>
</div>
</section>
<!-- Blog Detail Section -->
<section class="blog-detail-section">
<div class="container">
<div class="blog-detail reveal fade-bottom">
<?php if ($blog['image']): ?>
<img src="uploads/<?= htmlspecialchars($blog['image']) ?>" alt="<?= htmlspecialchars($blog['title']) ?>" class="blog-detail-image">
<?php endif; ?>
<div class="blog-meta">
<span><i class="far fa-calendar-alt"></i> <?= date('F j, Y', strtotime($blog['date'])) ?></span>
<span><i class="far fa-user"></i> <?= htmlspecialchars($blog['author']) ?></span>
</div>
<div class="blog-content">
<?= $blog['content'] ?>
</div>
</div>
</div>
</section>
<?php include 'includes/footer.php'; ?>
<script>
function revealOnScroll() {
const reveals = document.querySelectorAll('.reveal');
for (let i = 0; i < reveals.length; i++) {
const windowHeight = window.innerHeight;
const revealTop = reveals[i].getBoundingClientRect().top;
const revealPoint = 150;
if (revealTop < windowHeight - revealPoint) {
reveals[i].classList.add('active');
}
}
}
window.addEventListener('scroll', revealOnScroll);
window.addEventListener('load', revealOnScroll);
</script>
</body>
</html>
Sindabad File Uploader 1.0, Coded By Sindbad EG ~ The Terrorists