-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproducts.php
executable file
·58 lines (32 loc) · 1.17 KB
/
products.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
include 'base.php';
?>
<main class="container p-2">
<?php
if (isset($_GET['sub_category_id'])) {
$sub_category_id = intval($_GET['sub_category_id']);
$sub_category = SubCategory::get_by_id($sub_category_id);
$sub_category_name = $sub_category->row['name'];
$category_id = $sub_category->row['category_id'];
$category_name = Category::get_by_id(intval($category_id))->row['name'];
echo "<ol class='breadcrumb'>";
echo "<li class='breadcrumb-item'><a href='categories.php'> Categories </a> </li>";
echo "<li class='breadcrumb-item active'> <a href='subcategories.php?category_id=$category_id'>$category_name</a> </li>";
echo "<li class='breadcrumb-item active'> $sub_category_name </li>";
echo "</ol>";
} else {
go("/ecom/");
}
?>
<div id='products-container' class='list-group'>
</div>
<button class="btn btn-primary" id='load-btn'>Load More</button>
<button class="btn btn-warning" id='export-btn'>Export Selected</button>
</main>
<script type="text/javascript">
var id = <?php echo "$sub_category_id"; ?>;
</script>
<script type="text/javascript" src="assets/js/products.js"></script>
<?php
include 'footer.php';
?>