- Created new directories and index files for controls, factory, and views. - Added .htaccess files for URL rewriting in layout and images directories. - Included a logo image in the layout/images directory. - Implemented load_prices.php to load ticket prices from the database into settings. - Developed admin panel settings page for enabling ticket sales. - Created tickets management page in the admin panel to display and edit ticket prices. - Added upgrade.php for database migrations, including creating the ticket_prices table and adding weekend price column.
62 lines
2.3 KiB
PHP
62 lines
2.3 KiB
PHP
<table>
|
|
<tr>
|
|
<th>
|
|
<h3>BILETY</h3>
|
|
</th>
|
|
<th>
|
|
<h3>CENA</h3>
|
|
</th>
|
|
<th>
|
|
<h3>WARTOŚĆ</h3>
|
|
</th>
|
|
<th>
|
|
<h3>ZMIENIĆ ILOŚĆ</h3>
|
|
</th>
|
|
<th>
|
|
<h3>USUŃ</h3>
|
|
</th>
|
|
</tr>
|
|
<?php foreach ($this->cart as $ticket_id => $combinations) : ?>
|
|
<?php foreach ($combinations as $key => $value) : ?>
|
|
<tr>
|
|
<td data-label="BILETY">
|
|
<?= $this->settings['tickets'][$ticket_id]['name']; ?> (x<?= $value["quantity"]; ?>)
|
|
<?php if (!empty($value['date'])) : ?>
|
|
<br><small class="ticket-date"><?= $value['date']; ?></small>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td data-label="CENA"><?= $value['ticket_price']; ?> zł</td>
|
|
<td data-label="WARTOŚĆ"><?= $value['ticket_price'] * $value["quantity"]; ?> zł</td>
|
|
<td data-label="ZMIENIĆ ILOŚĆ">
|
|
<?php if ( $ticket_id != 'gift-price' and $ticket_id != 'ticket-protection' ):?>
|
|
<button class="btn_t1 add" ticket_id="<?= $ticket_id; ?>" combination_key="<?= $key; ?>">
|
|
<i class="fa-solid fa-plus"></i>
|
|
</button>
|
|
<button class="btn_t1 subtract" ticket_id="<?= $ticket_id; ?>" combination_key="<?= $key; ?>">
|
|
<i class="fa-solid fa-minus"></i>
|
|
</button>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td data-label="USUŃ">
|
|
<?php if ( $ticket_id != 'gift-price' ):?>
|
|
<? if ( $ticket_id == 'ticket-protection' ) : ?>
|
|
<a href="/tickets/basket_view/ticket_protection=false" class="btn_t1">
|
|
<i class="fa-solid fa-trash-can"></i>
|
|
</a>
|
|
<? else : ?>
|
|
<button class="btn_t1 delete" ticket_id="<?= $ticket_id; ?>" combination_key="<?= $key; ?>">
|
|
<i class="fa-solid fa-trash-can"></i>
|
|
</button>
|
|
<? endif; ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<div class="basket_protection">
|
|
<a href="/tickets/basket_view/ticket_protection=true" class="ticket_protection">Dodaj ochronę kupującego (5 zł / bilet)</a>
|
|
<div class="basket_protection__text">
|
|
<p>Wszystkie bilety zostaną objęte ochroną kupującego. Pozwoli Ci to na zmianę terminu biletu.</p>
|
|
</div>
|
|
</div>
|