📁 File Manager
🏠 /
/
home
/
u857492117
/
domains
/
mangaldailawcollege.in
/
public_html
Dosya Düzenle: notice_details.php
<?php require 'law-admin/config/db.php'; if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { die("Invalid Notice."); } $id = (int)$_GET['id']; $stmt = $conn->prepare(" SELECT * FROM notices WHERE id=? AND status='Published' LIMIT 1 "); $stmt->execute([$id]); $notice = $stmt->fetch(PDO::FETCH_ASSOC); if(!$notice){ die("Notice not found."); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><?= htmlspecialchars($notice['title']) ?></title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet"> <style> body{ background:#f5f7fa; font-family:Poppins,sans-serif; } .notice-box{ background:#fff; padding:35px; border-radius:15px; box-shadow:0 10px 30px rgba(0,0,0,.08); margin-top:40px; } .notice-image{ width:100%; border-radius:12px; margin-bottom:25px; } .sidebar-card{ background:#fff; padding:20px; border-radius:15px; box-shadow:0 10px 30px rgba(0,0,0,.08); margin-top:40px; } .latest-item{ padding:12px 0; border-bottom:1px solid #eee; } .latest-item:last-child{ border:none; } .latest-item a{ text-decoration:none; color:#0A58CA; font-weight:600; } .badge-date{ background:#198754; } </style> </head> <body> <?php include ('navbar.html'); ?> <div class="container"> <div class="row"> <div class="col-lg-8"> <div class="notice-box"> <h2> <?= htmlspecialchars($notice['title']) ?> </h2> <br> <span class="badge bg-primary"> <?= htmlspecialchars($notice['category']) ?> </span> <span class="badge badge-date"> <i class="fa-solid fa-calendar"></i> <?= date('d M Y',strtotime($notice['publish_date'])) ?> </span> <hr> <?php if($notice['image']){ ?> <img src="law-admin/uploads/notices/images/<?= htmlspecialchars($notice['image']) ?>" class="notice-image"> <?php } ?> <div> <?= $notice['description'] ?> </div> <hr> <?php if($notice['document']){ ?> <a href="law-admin/uploads/notices/documents/<?= htmlspecialchars($notice['document']) ?>" target="_blank" class="btn btn-danger"> <i class="fa-solid fa-file-pdf"></i> Download Attachment </a> <?php } ?> <?php if($notice['external_link']){ ?> <a href="<?= htmlspecialchars($notice['external_link']) ?>" target="_blank" class="btn btn-success"> <i class="fa-solid fa-link"></i> Visit Link </a> <?php } ?> </div> </div> <div class="col-lg-4"> <div class="sidebar-card"> <h4> <i class="fa-solid fa-bullhorn"></i> Latest Notices </h4> <hr> <?php $sql=$conn->query(" SELECT id,title,publish_date FROM notices WHERE status='Published' ORDER BY publish_date DESC LIMIT 8 "); while($row=$sql->fetch(PDO::FETCH_ASSOC)) { ?> <div class="latest-item"> <a href="notice_details.php?id=<?=$row['id']?>"> <?= htmlspecialchars($row['title']) ?> </a> <br> <small class="text-muted"> <?= date('d M Y',strtotime($row['publish_date'])) ?> </small> </div> <?php } ?> </div> </div> </div> </div> </body> </html>
💾 Kaydet
İptal