Server Address : 2a02:4780:a:760:0:37cc:13e2:3
Web Server : LiteSpeed
Uname : Linux uk-fast-web660.main-hosting.eu 5.14.0-570.55.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 21 05:27:51 EDT 2025 x86_64
PHP Version : 7.4.33
<?php include_once "./includes/header.php";?>
<!-- Start Hero Section -->
<?php
if((isset($_GET['catid']) && $_GET['catid']!='')){
$products = $productObj -> getProByCatId($_GET['catid']) ;
$col_name = $categoryObj -> getCatName($_GET['catid']);
}
elseif((isset($_GET['subcatid']) && $_GET['subcatid']!='')){
$products = $productObj -> getProBySubCatId($_GET['subcatid']) ;
$col_name = $subcategoryObj -> getCatName($_GET['subcatid']);
}
elseif(!isset($_GET['catid']) && !isset($_GET['subcatid'])){
$products = $productObj -> getAllProduct();
$col_name = "Collections";
}
else{
?>
<script>
window.location.href = "index.php";
</script>
<?php
}
$page_name = "collection";
include_once "./includes/hero.php";
?>
<!-- End Hero Section -->
<div class="untree_co-section product-section before-footer-section">
<div class="container">
<div class="row">
<?php
if(isset($products) && $products){
while($result = mysqli_fetch_array($products)){
?>
<!-- Start Column 1 -->
<div class="col-12 col-md-4 col-lg-3 mb-5">
<div class="product-item" data-toggle="modal" data-target="#mod-<?php echo $result['id'];?>">
<img src="images/product/<?php echo $result['image'];?>" class="img-fluid product-thumbnail">
<h3 class="product-title"><?php echo $result['name'];?></h3>
<span class="icon-cross">
<img src="images/cross.svg" class="img-fluid">
</span>
</div>
</div>
<!-- End Column 1 -->
<?php
}
}
else{
echo "No Product Exists";
}
?>
</div>
</div>
</div>
<?php
if((isset($_GET['catid']) && $_GET['catid']!='')){
$products = $productObj -> getProByCatId($_GET['catid']) ;
}
elseif((isset($_GET['subcatid']) && $_GET['subcatid']!='')){
$products = $productObj -> getProBySubCatId($_GET['subcatid']) ;
}
elseif(!isset($_GET['catid']) && !isset($_GET['subcatid'])){
$products = $productObj -> getAllProduct();
}
if(isset($products) && $products){
while($result = mysqli_fetch_array($products)){
?>
<div class="modal fade" id="mod-<?php echo $result['id'];?>" tabindex="-1" role="dialog" aria-labelledby="<?php echo $result['id'];?>Label" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title w-100" id="<?php echo $result['id'];?>Label">
<?php echo $result['name'];?>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
×
</span>
</button>
</div>
<div class="modal-body">
<img src="images/product/<?php echo $result['image'];?>" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</div>
<?php
}
}
?>
<?php include_once "./includes/footer.php";?>