Merge remote-tracking branch 'origin/master'

master
Sebastian Greil 2023-06-07 09:50:16 +02:00
commit 9f146a1aa8
2 changed files with 21 additions and 5 deletions

View File

@ -13,8 +13,9 @@
</head>
<body>
<header id="header"></header>
<div class="containerofbuecher">
<p id="büchertitel">Bücher</p>
<div class="hauptcontainer">
<h1 id="searchResult_heading">Bücher</h1>
<div id="searchResult_container">
<?php
$sql = '';
@ -26,7 +27,11 @@
GROUP_CONCAT(DISTINCT k.Name SEPARATOR ', ') AS 'Kategorie',
b.ISBN, b.Klappentext AS 'Inhalt', sp.Bezeichnung AS 'Sprache',
GROUP_CONCAT(DISTINCT st.Text SEPARATOR ', ') AS 'Stichwort',
IF(b.Anzahl!=0, 'Verfügbar', CONCAT('Verfügbar ab: ', 'Test!'))
IF(b.Anzahl!=0, 'Verfügbar', CONCAT('Verfügbar ab: ',
(SELECT DATE_FORMAT(DATE_ADD(ab.Enddatum, INTERVAL 1 DAY)
,'%d.%m.%Y') FROM `ausgeliehenes_buch` AS ab
WHERE ab.BuchID = b.BuchID
ORDER BY ab.Reserviert ASC, ab.Enddatum ASC LIMIT 1)))
AS 'Verfügbarkeit' FROM `buch` AS b
INNER JOIN `buch_verfasst_von_autor` AS bvva
ON b.BuchID = bvva.BuchID
@ -53,6 +58,7 @@
$result = mysqli_query($connection, $sql);
$counter = 0;
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
$bookID = $row['BuchID'];
@ -128,9 +134,19 @@
?>
</div>
</div>
<script>
function open_bookDetails(ID) {
var data = new URLSearchParams();
data.append("bookID", ID);
var url = "http://141.19.142.11/buch_details.php?" +
data.toString();
location.href = url;
}
</script>
<!--Link JS file-->
<script src="burgerIcon.js"></script>