Add Item and Download of Images works

This commit is contained in:
2022-09-18 22:53:41 +02:00
parent 72c38aee2b
commit 016ea4bb54
3 changed files with 117 additions and 10 deletions

View File

@@ -1,10 +1,14 @@
<?php
function generateListItem($ListItemID, $ItemImage, $ItemTitle, $ItemPrice, $ItemComment)
function generateListItem($ListItemID, $ItemImage, $ItemTitle, $ItemLink, $ItemPrice, $ItemComment, $ItemReserved)
{
$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);
$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);
echo ('
if (strlen($ItemComment) == 0) {
$ItemComment = '&nbsp;';
}
echo ('
<div class="col">
<div class="card shadow-sm">
<img src="' . $ItemImage . '" class="card-img-top">
@@ -13,8 +17,8 @@ function generateListItem($ListItemID, $ItemImage, $ItemTitle, $ItemPrice, $Item
<p class="card-text">' . $ItemComment . '</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">zum Anbieter</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Reservieren</button>
<a href="' . $ItemLink . '" class="btn btn-sm btn-outline-secondary" role="button" target="_blank">zum Anbieter</a>
<button type="button" class="btn btn-sm ' . ($ItemReserved == true ? 'btn-outline-info' : 'btn-outline-secondary') . ' "data-bs-toggle="modal" data-bs-target="#reservationModal">Reservieren</button>
</div>
<small class="text-muted">' . $formatter->formatCurrency($ItemPrice / 100, 'EUR') . '</small>
</div>