-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategories.php
More file actions
38 lines (31 loc) · 1.1 KB
/
categories.php
File metadata and controls
38 lines (31 loc) · 1.1 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
<?php
session_start();
$pageTitle = 'Categories';
include 'init.php'; ?>
<div class="container cats" id="container">
<h1 class="text-center"><?php echo str_replace('-', " ", $_GET['pagename']) ?></h1>
<div class="row">
<?php
if (isset($_GET['pageid']) && is_numeric($_GET['pageid'])) {
$category = intval($_GET['pageid']);
$allItems = getAllFrom("*", "items", "where Cat_ID = {$category}", "AND Approve = 1", "Item_ID");
foreach ($allItems as $item) {
echo '<div class="col-sm-3 col-md-4 col-lg-3">';
echo '<div class="thumbnail item-box">';
echo '<span class="price-tag">' . $item['Price'] . '</span>';
echo '<img class="img-responsive" src="avatar.png" alt="" />';
echo '<div class="caption">';
echo '<h3><a href="items.php?itemid='. $item['Item_ID'] .'">' . $item['Name'] .'</a></h3>';
echo '<p>' . $item['Description'] . '</p>';
echo '<div class="date">' . $item['Add_Date'] . '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
} else {
echo 'You Must Add Page ID';
}
?>
</div>
</div>
<?php include $tpl . 'footer.php'; ?>