|
@@ -10,11 +10,13 @@ require_once '../includes/publication.php';
|
|
|
require_once '../includes/comment.php';
|
|
require_once '../includes/comment.php';
|
|
|
require_once '../includes/captcha.php';
|
|
require_once '../includes/captcha.php';
|
|
|
require_once '../includes/translation.php';
|
|
require_once '../includes/translation.php';
|
|
|
|
|
+require_once '../includes/auth.php';
|
|
|
|
|
|
|
|
// Translation system is auto-initialized when translation.php is included
|
|
// Translation system is auto-initialized when translation.php is included
|
|
|
|
|
|
|
|
$publication = new Publication();
|
|
$publication = new Publication();
|
|
|
$comment = new Comment();
|
|
$comment = new Comment();
|
|
|
|
|
+$auth = new Auth();
|
|
|
|
|
|
|
|
$id = (int)($_GET['id'] ?? 0);
|
|
$id = (int)($_GET['id'] ?? 0);
|
|
|
$pub = $publication->getById($id);
|
|
$pub = $publication->getById($id);
|
|
@@ -68,7 +70,14 @@ $commentCount = $comment->getCountByPublication($id);
|
|
|
<div class="container">
|
|
<div class="container">
|
|
|
<article class="publication-full">
|
|
<article class="publication-full">
|
|
|
<header class="publication-header">
|
|
<header class="publication-header">
|
|
|
- <h1><?php echo htmlspecialchars($pub['title']); ?></h1>
|
|
|
|
|
|
|
+ <div class="publication-title-section">
|
|
|
|
|
+ <h1><?php echo htmlspecialchars($pub['title']); ?></h1>
|
|
|
|
|
+ <?php if ($auth->isAdmin()): ?>
|
|
|
|
|
+ <a href="../admin/edit.php?id=<?php echo $id; ?>" class="admin-edit-btn" title="<?php echo t('admin_edit_publication'); ?>">
|
|
|
|
|
+ <i class="icon-edit">✏️</i> <?php echo t('edit'); ?>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ <?php endif; ?>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div class="publication-meta">
|
|
<div class="publication-meta">
|
|
|
<span class="author">By <?php echo htmlspecialchars($pub['author']); ?></span>
|
|
<span class="author">By <?php echo htmlspecialchars($pub['author']); ?></span>
|