Hacked By AnonymousFox
<?php include("common/header.php");?>
<?php
if(isset($_GET['category_id']))
{
categorySlugToId($_GET['category_id']);
$sqlProduct1 = mysqli_query($cn,"select * from `tbl_product` where `status`=1 and `category_id`='".categorySlugToId($_GET['category_id'])."' order by `id` DESC");
$count = mysqli_num_rows($sqlProduct1);
$pageLink = $_GET['category_id'];
}
else if(isset($_GET['subcategory_id']))
{
$sqlProduct1 = mysqli_query($cn,"select * from `tbl_product` where `status`=1 and `subcategory_id`='".subcategorySlugToId($_GET['subcategory_id'])."' order by `id`");
$count = mysqli_num_rows($sqlProduct1);
$pageLink = $_GET['subcategory_id'];
}
if (isset($_GET['page_no']) && $_GET['page_no']!="") {
$page_no = $_GET['page_no'];
} else {
$page_no = 1;
}
$list_qry = "";
$total_records_per_page = 40;
$offset = ($page_no-1) * $total_records_per_page;
$previous_page = $page_no - 1;
$next_page = $page_no + 1;
$adjacents = "2";
$total_records = $count;
$total_no_of_pages = ceil($total_records / $total_records_per_page);
$second_last = $total_no_of_pages - 1; // total page minus 1
$list_qry .= " LIMIT $offset, $total_records_per_page ";
?>
<main>
<style>
.grid-view .col-sm-6 {
width: 50% !important;
}
</style>
<!-- page main wrapper start -->
<div class="shop-main-wrapper section-padding">
<div class="container">
<div class="row">
<!-- sidebar area start -->
<div class="col-lg-3 order-2 order-lg-1">
<aside class="sidebar-wrapper">
<!-- single sidebar start -->
<div class="sidebar-single">
<h5 class="sidebar-title">categories</h5>
<div class="sidebar-body">
<ul class="shop-categories">
<?php
$sqlCategory = mysqli_query($cn,"select * from `tbl_category` where `status`=1 order by `sort_order`");
while($sqlCategoryData = mysqli_fetch_array($sqlCategory))
{
$sqlsubCategory = mysqli_query($cn,"select * from `tbl_subcategory` where `category_id`='".$sqlCategoryData['id']."' and `status`=1 order by `sort_order`");
if(mysqli_num_rows($sqlsubCategory)>0){?>
<li><a href="<?php echo DEFAULT_URL."category/".$sqlCategoryData['slug_url'];?>"><?php echo $sqlCategoryData['name'];?> <span>(<?php echo mysqli_num_rows($sqlsubCategory);?>)</span><i class="fa fa-angle-down" aria-hidden="true"></i></a>
<ul class="submenu1">
<?php
while($sqlsubCategoryData = mysqli_fetch_array($sqlsubCategory)){?>
<li><a href="<?php echo DEFAULT_URL."subcategory/".$sqlsubCategoryData['slug_url'];?>"><?php echo $sqlsubCategoryData['name'];?></a></li>
<?php }?>
</ul>
</li>
<?php
}else{?>
<li><a href="<?php echo DEFAULT_URL."category/".$sqlCategoryData['slug_url'];?>"><?php echo $sqlCategoryData['name'];?> </a></li>
<?php }
}?>
</ul>
</div>
</div>
<!-- single sidebar end -->
<!-- single sidebar start -->
<!--<div class="sidebar-single">
<h5 class="sidebar-title">price</h5>
<div class="sidebar-body">
<div class="price-range-wrap">
<div class="price-range" data-min="1" data-max="1000"></div>
<div class="range-slider">
<form action="#" class="d-flex align-items-center justify-content-between">
<div class="price-input">
<label for="amount">Price: </label>
<input type="text" id="amount">
</div>
<button class="filter-btn">filter</button>
</form>
</div>
</div>
</div>
</div>-->
<!-- single sidebar end -->
</aside>
</div>
<!-- sidebar area end -->
<!-- shop main wrapper start -->
<div class="col-lg-9 order-1 order-lg-2">
<div class="shop-product-wrapper">
<div class="shop-top-bar">
<div class="row align-items-center">
<div class="col-lg-6 col-md-6 order-2 order-md-1">
<div class="top-bar-left">
<div class="product-amount">
<p>Showing 1 – <span id="count"><?php echo $count;?></span> of <?php echo $count;?> Designs</p>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 order-1 order-md-2">
<div class="top-bar-right">
<div class="breadcrumb-wrap">
<nav aria-label="breadcrumb">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo DEFAULT_URL;?>"><i class="fa fa-home"></i></a></li>
<?php if(isset($_GET['category_id'])){?>
<li class="breadcrumb-item active" aria-current="page"><?php echo strtoupper(categorySlugToName($_GET['category_id']));?></li>
<?php }?>
<?php if(isset($_GET['subcategory_id'])){?>
<li class="breadcrumb-item"><a href="<?php echo DEFAULT_URL;?>category/<?php echo subcategorySlugToCategorySlug($_GET['subcategory_id']);?>"><?php echo strtoupper(subcategorySlugToCategoryName($_GET['subcategory_id']));?></a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo strtoupper(subcategorySlugToName($_GET['subcategory_id']));?></li>
<?php }?>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
<!-- product item list wrapper start -->
<div class="shop-product-wrap grid-view row mbn-30">
<?php
if(isset($_GET['category_id']))
{
$subCategoryArray = array();
$sqlSubCategory1 = mysqli_query($cn,"select `id` from `tbl_subcategory` where `status`=1 and `category_id`='".categorySlugToId($_GET['category_id'])."' order by `sort_order` ASC");
while($sqlSubCategoryData1 = mysqli_fetch_array($sqlSubCategory1))
{
array_push($subCategoryArray,$sqlSubCategoryData1['id']);
}
$subCategoryId = implode(',',$subCategoryArray);
//$sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `status`=1 and `subcategory_id`='".$sqlSubCategoryData1['id']."' order by `id` DESC $list_qry");
if(count($subCategoryArray)>0)
{
$sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `status`=1 and `subcategory_id` IN($subCategoryId) order by `subcategory_order`,`id` DESC $list_qry");
}
else
{
$sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `status`=1 order by `subcategory_order`,`id` DESC $list_qry");
}
while($sqlProductData = mysqli_fetch_array($sqlProduct))
{
$ProductImg = explode("$",$sqlProductData['image']);
?>
<div class="col-md-3 col-sm-6">
<div class="product-item">
<figure class="product-thumb">
<a href="<?php echo DEFAULT_URL."product/".$sqlProductData['slug_url'];?>">
<?php
if(count($ProductImg)>1)
{?>
<img class="pri-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">
<img class="sec-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[1];?>" alt="product">
<?php }else{?>
<img class="pri-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">
<img class="sec-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">
<?php }?>
</a>
<!--<div class="product-badge">
<div class="product-label new">
<span>new</span>
</div>
</div>-->
</figure>
<div class="product-caption text-center">
<h6 class="product-name">
<a href="<?php echo DEFAULT_URL."product/".$sqlProductData['slug_url'];?>"><?php echo $sqlProductData['name'];?> <br> <strong>SKU Code : <?php echo $sqlProductData['skucode'];?></strong></a>
</h6>
<!--<div class="price-box">
<span class="price-regular"><?php echo currencyPrice($sqlProductData['price']);?></span>
<span class="price-old"><del><?php echo currencyPrice($sqlProductData['orignalprice']);?></del></span>
</div>-->
</div>
</div>
</div>
<?php
}
}
else if(isset($_GET['subcategory_id']))
{
$sqlProduct = mysqli_query($cn,"select * from `tbl_product` where `status`=1 and `subcategory_id`='".subcategorySlugToId($_GET['subcategory_id'])."' order by `id` DESC $list_qry");
while($sqlProductData = mysqli_fetch_array($sqlProduct))
{
$ProductImg = explode("$",$sqlProductData['image']);
?>
<div class="col-md-3 col-sm-6">
<div class="product-item">
<figure class="product-thumb">
<a href="<?php echo DEFAULT_URL."product/".$sqlProductData['slug_url'];?>">
<?php
if(count($ProductImg)>1)
{?>
<img class="pri-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">
<img class="sec-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[1];?>" alt="product">
<?php }else{?>
<img class="pri-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">
<img class="sec-img" src="<?php echo DEFAULT_URL."products/".$ProductImg[0];?>" alt="product">
<?php }?>
</a>
<!--<div class="product-badge">
<div class="product-label new">
<span>new</span>
</div>
</div>-->
</figure>
<div class="product-caption text-center">
<h6 class="product-name">
<a href="<?php echo DEFAULT_URL."product/".$sqlProductData['slug_url'];?>"><?php echo $sqlProductData['name'];?> <br> <strong>SKU Code : <?php echo $sqlProductData['skucode'];?></strong></a>
</h6>
<!--<div class="price-box">
<span class="price-regular"><?php echo currencyPrice($sqlProductData['price']);?></span>
<span class="price-old"><del><?php echo currencyPrice($sqlProductData['orignalprice']);?></del></span>
</div>-->
</div>
</div>
</div>
<?php
}
}
?>
</div>
<?php if($count>30){?>
<!-- start pagination area -->
<!--<div class="paginatoin-area text-center">
<ul class="pagination-box">
<li class="active"><a href="#"> Load More</a></li>
</ul>
</div>-->
<div class="paginatoin-area text-center">
<ul class="pagination-box">
<?php // if($page_no > 1){ echo "<li><a href='?page_no=1'>First Page</a></li>"; } ?>
<li <?php if($page_no <= 1){ echo "class='disabled'"; } ?>>
<a <?php if($page_no > 1){ echo "href='$pageLink&page_no=$previous_page'"; } ?>><i class="pe-7s-angle-left"></i></a>
</li>
<?php
if ($total_no_of_pages <= 10){
for ($counter = 1; $counter <= $total_no_of_pages; $counter++){
if ($counter == $page_no) {
echo "<li class='active'><a>$counter</a></li>";
}else{
echo "<li><a href='$pageLink&page_no=$counter'>$counter</a></li>";
}
}
}
elseif($total_no_of_pages > 10){
if($page_no <= 4) {
for ($counter = 1; $counter < 8; $counter++){
if ($counter == $page_no) {
echo "<li class='active'><a>$counter</a></li>";
}else{
echo "<li><a href='$pageLink&page_no=$counter'>$counter</a></li>";
}
}
echo "<li><a>...</a></li>";
echo "<li><a href='$pageLink&page_no=$second_last'>$second_last</a></li>";
echo "<li><a href='$pageLink&page_no=$total_no_of_pages'>$total_no_of_pages</a></li>";
}
elseif($page_no > 4 && $page_no < $total_no_of_pages - 4) {
echo "<li><a href='$pageLink&page_no=1'>1</a></li>";
echo "<li><a href='$pageLink&page_no=2'>2</a></li>";
echo "<li><a>...</a></li>";
for ($counter = $page_no - $adjacents; $counter <= $page_no + $adjacents; $counter++) {
if ($counter == $page_no) {
echo "<li class='active'><a>$counter</a></li>";
}else{
echo "<li><a href='$pageLink&page_no=$counter'>$counter</a></li>";
}
}
echo "<li><a>...</a></li>";
echo "<li><a href='$pageLink&page_no=$second_last'>$second_last</a></li>";
echo "<li><a href='$pageLink&page_no=$total_no_of_pages'>$total_no_of_pages</a></li>";
}
else {
echo "<li><a href='$pageLink&page_no=1'>1</a></li>";
echo "<li><a href='$pageLink&page_no=2'>2</a></li>";
echo "<li><a>...</a></li>";
for ($counter = $total_no_of_pages - 6; $counter <= $total_no_of_pages; $counter++) {
if ($counter == $page_no) {
echo "<li class='active'><a>$counter</a></li>";
}else{
echo "<li><a href='$pageLink&page_no=$counter'>$counter</a></li>";
}
}
}
}
?>
<li <?php if($page_no >= $total_no_of_pages){ echo "class='disabled'"; } ?>>
<a <?php if($page_no < $total_no_of_pages) { echo "href='$pageLink&page_no=$next_page'"; } ?>><i class="pe-7s-angle-right"></i></a>
</li>
</ul>
</div>
<!-- end pagination area -->
</div>
<?php }?>
</div>
<!-- shop main wrapper end -->
</div>
</div>
</div>
<!-- page main wrapper end -->
</main>
<!-- footer area start -->
<?php include("popup/loginsignup.php");?>
<?php include("common/footer.php");?>
<!-- footer area end -->
<!-- offcanvas mini cart start -->
<?php include("popup/mini-cart.php");?>
<!-- offcanvas mini cart end -->
<!-- JS============================================ -->
<!-- Modernizer JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/vendor/modernizr-3.6.0.min.js"></script>
<!-- jQuery JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/vendor/jquery-3.3.1.min.js"></script>
<!-- Popper JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/vendor/popper.min.js"></script>
<!-- Bootstrap JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/vendor/bootstrap.min.js"></script>
<!-- slick Slider JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/slick.min.js"></script>
<!-- Countdown JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/countdown.min.js"></script>
<!-- Nice Select JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/nice-select.min.js"></script>
<!-- jquery UI JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/jqueryui.min.js"></script>
<!-- Image zoom JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/image-zoom.min.js"></script>
<!-- Imagesloaded JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/imagesloaded.pkgd.min.js"></script>
<!-- Instagram feed JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/instagramfeed.min.js"></script>
<!-- mailchimp active js -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/ajaxchimp.js"></script>
<!-- contact form dynamic js -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/ajax-mail.js"></script>
<!-- google map api -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCfmCVTjRI007pC1Yk2o2d_EhgkjTsFVN8"></script>
<!-- google map active js -->
<script src="<?php echo DEFAULT_URL;?>assets/js/plugins/google-map.js"></script>
<!-- Main JS -->
<script src="<?php echo DEFAULT_URL;?>assets/js/main.js"></script>
<script src="<?php echo DEFAULT_URL;?>js/blockui.min.js"></script>
<script src="<?php echo DEFAULT_URL;?>js/function.js"></script>
<script>
$(document).ready(function(){
$("#signup").click(function(){
$(".log-in").css("display", "none");
$(".sign-up").css("display", "block");
});
});
$(document).ready(function(){
$("#login").click(function(){
$(".log-in").css("display", "block");
$(".sign-up").css("display", "none");
});
});
</script>
</body>
</html>
Hacked By AnonymousFox1.0, Coded By AnonymousFox