[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
repository_afbs
/
user
/
[
Home
]
File: detail.php
<?php session_start(); require_once 'config/database.php'; $database = new Database(); $db = $database->getConnection(); $id = isset($_GET['id']) ? $_GET['id'] : 0; // Update view count $update_query = "UPDATE theses SET views = views + 1 WHERE id = :id"; $update_stmt = $db->prepare($update_query); $update_stmt->bindParam(':id', $id); $update_stmt->execute(); // Get thesis details $query = "SELECT t.*, u.full_name, u.nim, u.email FROM theses t JOIN users u ON t.author_id = u.id WHERE t.id = :id AND t.status = 'approved'"; $stmt = $db->prepare($query); $stmt->bindParam(':id', $id); $stmt->execute(); $thesis = $stmt->fetch(PDO::FETCH_ASSOC); if (!$thesis) { header("Location: index.php"); exit(); } ?> <!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php echo htmlspecialchars($thesis['title']); ?> - Repository AFBS</title> <!-- Meta tags untuk Google Scholar --> <meta name="citation_title" content="<?php echo htmlspecialchars($thesis['title']); ?>"> <meta name="citation_author" content="<?php echo htmlspecialchars($thesis['authors']); ?>"> <meta name="citation_publication_date" content="<?php echo $thesis['year']; ?>"> <meta name="citation_publisher" content="Akademi Farmasi Bumi Siliwangi"> <meta name="citation_institution" content="Akademi Farmasi Bumi Siliwangi"> <meta name="citation_abstract" content="<?php echo htmlspecialchars($thesis['abstract']); ?>"> <meta name="citation_keywords" content="<?php echo htmlspecialchars($thesis['keywords']); ?>"> <meta name="citation_pdf_url" content="https://repository.afbs.ac.id/download.php?id=<?php echo $thesis['id']; ?>"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> </head> <body> <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <div class="container"> <a class="navbar-brand" href="index.php">Repository AFBS</a> </div> </nav> <div class="container my-5"> <div class="row"> <div class="col-md-8"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="index.php">Home</a></li> <li class="breadcrumb-item active">Detail Tugas Akhir</li> </ol> </nav> <div class="card"> <div class="card-body"> <h1 class="card-title h3"><?php echo htmlspecialchars($thesis['title']); ?></h1> <div class="mt-3"> <strong>Penulis:</strong> <?php echo htmlspecialchars($thesis['authors']); ?> <br> <strong>NIM:</strong> <?php echo $thesis['nim']; ?> <br> <strong>Tahun:</strong> <?php echo $thesis['year']; ?> <br> <strong>Program Studi:</strong> <?php echo $thesis['program_study']; ?> </div> <hr> <h5>Abstrak</h5> <p class="text-justify"><?php echo nl2br(htmlspecialchars($thesis['abstract'])); ?></p> <hr> <div class="row"> <div class="col-md-6"> <h5>Pembimbing</h5> <ul class="list-unstyled"> <li>1. <?php echo htmlspecialchars($thesis['supervisor1']); ?></li> <?php if($thesis['supervisor2']): ?> <li>2. <?php echo htmlspecialchars($thesis['supervisor2']); ?></li> <?php endif; ?> </ul> </div> <div class="col-md-6"> <h5>Penguji</h5> <ul class="list-unstyled"> <li>1. <?php echo htmlspecialchars($thesis['examiner1']); ?></li> <?php if($thesis['examiner2']): ?> <li>2. <?php echo htmlspecialchars($thesis['examiner2']); ?></li> <?php endif; ?> </ul> </div> </div> <hr> <div class="mb-3"> <strong>Kata Kunci:</strong> <?php $keywords = explode(',', $thesis['keywords']); foreach($keywords as $keyword): ?> <span class="badge bg-secondary"><?php echo trim($keyword); ?></span> <?php endforeach; ?> </div> <div class="d-flex justify-content-between align-items-center"> <div> <span class="text-muted"> <i class="fas fa-eye"></i> Dilihat: <?php echo $thesis['views']; ?> kali </span> <span class="text-muted ms-3"> <i class="fas fa-download"></i> Diunduh: <?php echo $thesis['downloads']; ?> kali </span> </div> <div> <?php if(isset($_SESSION['user_id'])): ?> <a href="download.php?id=<?php echo $thesis['id']; ?>" class="btn btn-success btn-lg"> <i class="fas fa-download"></i> Download PDF </a> <?php else: ?> <a href="login.php" class="btn btn-secondary btn-lg"> <i class="fas fa-lock"></i> Login untuk Download PDF </a> <?php endif; ?> </div> </div> </div> </div> </div> <div class="col-md-4"> <?php if($thesis['cover_image']): ?> <div class="card"> <div class="card-body"> <h5 class="card-title">Cover</h5> <img src="uploads/theses/<?php echo $thesis['cover_image']; ?>" alt="Cover" class="img-fluid"> </div> </div> <?php endif; ?> <div class="card mt-3"> <div class="card-body"> <h5 class="card-title">Informasi Repository</h5> <p class="card-text"> <strong>Diunggah:</strong><br> <?php echo date('d F Y', strtotime($thesis['submitted_at'])); ?> <br><br> <strong>Status:</strong><br> <span class="badge bg-success">Telah disetujui</span> <br><br> <strong>Cara Mengutip:</strong><br> <small class="text-muted"> <?php echo $thesis['authors']; ?>. (<?php echo $thesis['year']; ?>). <em><?php echo $thesis['title']; ?></em>. Tasikmalaya: Akademi Farmasi Bumi Siliwangi. </small> </p> </div> </div> </div> </div> </div> </body> </html>