-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook_details.php
More file actions
104 lines (91 loc) · 2.98 KB
/
book_details.php
File metadata and controls
104 lines (91 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Buch Details</title>
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="js/get_book_details.js"></script>
<script src="js/script.js"></script>
<script src="js/read_books.js" defer></script>
<script src="js/comments.js"></script>
</head>
<?php
session_start();
include_once 'funktion.php';
anzeige_kopfbereich();
$book_id = isset($_GET['id']) ? $_GET['id'] : null;
?>
<body>
<div id="overlay" style="display: none;"></div>
<?php login_out_window(); ?>
<div class="book-details-container">
<section>
<?php
if (isset($_SESSION['username'])) {
echo '
<form id="readStatusForm">
<label>
<p><strong>Buchstatus: </strong> Gelesen</p>
<input type="checkbox" id="readCheckbox" onchange="toggleReadStatus()" />
</label>
</form>
';
}
?>
<div id="book-details">
<p>Lade Buchdetails...</p>
</div>
</section>
<section>
<div id="book-pic" class="book-pic-container">
<p>Lade das Foto...</p>
</div>
<div id="book-pic-status"></div>
<button id="saveCoverButton" onclick="saveBookCover()" style="display:none;">Cover speichern</button>
</section>
</div>
<section>
<h2 id="comments">Kommentare</h2>
<input type="hidden" id="bookId" value="<?php echo $book_id; ?>" />
<?php
if (isset($_SESSION['username'])) {
echo '
<form id="commentForm">
<textarea id="commentText" placeholder="Kommentar schreiben..." required></textarea>
<button type="submit">Kommentar hinzufügen</button>
</form>';
} else {
echo '<p>Bitte logge dich ein, um einen Kommentar zu schreiben.</p>';
}
?>
<div id="commentsContainer">
<h4>Vorhandene Kommentare:</h4>
<ul id="commentsList" class="comments-list"></ul> <!-- Hier werden die Kommentare angezeigt -->
</div>
</section>
<section>
<h2>Ähnliche Bücher der Serie</h2>
<div class="similar-books-container">
<table id="similar-books">
<thead>
<tr>
<th>Titel</th>
<th>Season</th>
<th>Volume</th>
</tr>
</thead>
<tbody>
<!-- Ähnliche Bücher werden hier dynamisch eingefügt -->
</tbody>
</table>
</div>
</section>
<?php
if (isset($_SESSION['username'])) {
include 'protected-book-details.php';
}
?>
</body>
</html>