You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
814 B
PHP
32 lines
814 B
PHP
<?php
|
|
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
if (!defined('NICKELBOX')) {
|
|
die("Direct access denied.");
|
|
}
|
|
$catid = $_GET['cat'];
|
|
$cat = $binstack->get('categories', 'catname', ['catid' => $catid]);
|
|
|
|
$dbitems = $binstack->select('items', 'itemid', ['AND' => ['price[>]' => 0, 'catid' => $catid], 'LIMIT' => 20]);
|
|
|
|
$items = [];
|
|
|
|
foreach ($dbitems as $i) {
|
|
$items[] = new Item($i);
|
|
}
|
|
?>
|
|
<div class="container mt-4">
|
|
<h1 class="display-4"><?php echo $cat; ?></h1>
|
|
|
|
<div class="list-group list-group-flush">
|
|
<?php
|
|
foreach ($items as $i) {
|
|
echo RenderItem::line($i);
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|