/
home
/
wellcas2
/
public_html
/
Upload File
HOME
<?php $activePage = "blog"; require_once 'config/helpers.php'; $id = isset($_GET['id']) ? (int)$_GET['id'] : 0; $post = $id ? db_find($pdo, 'blog', $id) : null; $pageTitle = $post ? htmlspecialchars($post['blog_title']) . " | Wellcash Debt Collectors" : "Article Not Found | Wellcash Debt Collectors"; include 'template/header.php'; ?> <?php if ($post): ?> <section class="page-hero"> <div class="container"> <div class="breadcrumb"> <a href="index.php">Home</a> <span>→</span> <a href="blog.php">Blog & Insights</a> <span>→</span> <span><?php echo htmlspecialchars($post['blog_title']); ?></span> </div> <h1><?php echo htmlspecialchars($post['blog_title']); ?></h1> <p><i class="fa-solid fa-calendar-days"></i> <?php echo date('F d, Y', strtotime($post['updated_at'])); ?></p> </div> </section> <section class="section"> <div class="container"> <div style="max-width: 800px; margin: 0 auto;"> <div style="height: 320px; border-radius: 8px; overflow: hidden; margin-bottom: 30px; background: #eee url('<?php echo htmlspecialchars(upload_path($post['ufile'])); ?>') no-repeat center center; background-size: cover;"></div> <div style="color: #444; line-height: 1.8; font-size: 16px;"> <?php $paragraphs = preg_split('/\r?\n\r?\n|\r?\n/', trim($post['blog_detail'])); foreach ($paragraphs as $para) { $para = trim($para); if ($para === '') continue; echo '<p style="margin-bottom: 18px;">' . htmlspecialchars($para) . '</p>'; } ?> </div> <a href="blog.php" class="btn btn-outline btn-pill" style="margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;"> <i class="fa-solid fa-arrow-left-long"></i> Back to all articles </a> </div> </div> </section> <?php else: ?> <section class="page-hero"> <div class="container"> <h1>Article Not <span class="text-red">Found</span></h1> <p>The article you're looking for doesn't exist or may have been removed.</p> </div> </section> <section class="section"> <div class="container" style="text-align:center;"> <a href="blog.php" class="btn btn-red btn-pill">Back to Blog & Insights</a> </div> </section> <?php endif; ?> <?php include 'template/footer.php'; ?>