<!DOCTYPE html>
<?php
include './class/include.php';
if (!isset($_SESSION)) {
session_start();
}
$get_cat = null;
$get_brand = null;
$get_subcat = null;
$title = 'All Products';
$products = Product::all();
if (isset($_GET['cat'])) {
$get_cat = $_GET['cat'];
$CAT = new ProductCategories($_GET['cat']);
$title = $CAT->name;
$products = Product::getProductsByCategory($get_cat);
}
if (isset($_GET['subcat'])) {
$get_subcat = $_GET['subcat'];
$SUBCAT = new SubCategory($_GET['subcat']);
$title = $SUBCAT->name;
$products = Product::getProductsBySubCategory($get_subcat);
}
if (isset($_GET['brand'])) {
$get_brand = $_GET['brand'];
$BRAND = new Brand($_GET['brand']);
$title = $BRAND->name;
$products = Product::getProductsByBrand($get_brand);
}
if (isset($_GET["page"])) {
$page = (int) $_GET["page"];
} else {
$page = 1;
}
$setlimit = 21;
$pagelimit = ($page * $setlimit) - $setlimit;
$OFFER = new Offer(NULL);
$BORD1 = new Banner(1);
$BORD2 = new Banner(2);
?>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="assets/magnoliya logo.png"/>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/animate.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/chosen.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/pe-icon-7-stroke.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/jquery.scrollbar.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/lightbox.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/magnific-popup.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/slick.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/fonts/flaticon.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/megamenu.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/dreaming-attribute.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/style.css"/>
<title>Magnoliya</title>
</head>
<body>
<!-- Start Header -->
<?php include './header.php'; ?>
<!-- End Header -->
<div class="fullwidth-template">
<!-- Start slider -->
<?php include './slider.php'; ?>
<!-- End slider -->
<div class="section-001 section-004">
<div class="container">
<div class="row">
<?php
$BORD = new Banner(NULL);
foreach ($BORD->all() as $key => $bord) {
if ($key > 1) {
break;
}
?>
<div class="col-md-12 col-lg-6">
<div class="lynessa-banner style-04 left-center">
<div class="banner-inner">
<figure class="banner-thumb">
<img src="upload/banner/<?php echo $bord['image_name']; ?>"
class="attachment-full size-full" alt="img">
</figure>
<div class="banner-info ">
<div class="banner-content banner-padding">
<div class="title-wrap">
<h6 class="title"><?php echo $bord['title']; ?></h6>
</div>
<!--<div class="cate">Selling</div>-->
<div class="button-wrap banner-btn">
<!-- <div class="subtitle"><?php echo $bord['title']; ?></div>-->
<a class="button" target="_self" href="designs.php"><span>Shop now</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
<div class="section-011">
<div class="container">
<div class="lynessa-heading style-01">
<div class="heading-inner">
<h3 class="title">
New Arrival <span></span> </h3>
</div>
</div>
<div class="lynessa-products style-04">
<div class="response-product product-list-owl owl-slick equal-container better-height"
data-slick="{"arrows":true,"slidesMargin":30,"dots":true,"infinite":false,"speed":300,"slidesToShow":4,"rows":1}"
data-responsive="[{"breakpoint":480,"settings":{"slidesToShow":2,"slidesMargin":"10"}},{"breakpoint":768,"settings":{"slidesToShow":2,"slidesMargin":"10"}},{"breakpoint":992,"settings":{"slidesToShow":3,"slidesMargin":"20"}},{"breakpoint":1200,"settings":{"slidesToShow":3,"slidesMargin":"20"}},{"breakpoint":1500,"settings":{"slidesToShow":4,"slidesMargin":"30"}}]">
<?php
foreach ($products as $key => $product) {
$sub_r_products = Product::getSubProductsByParent($product['id']);
if (count($sub_r_products) > 0) {
$min_price = Product::getMinimumPrice($product['id']);
$discount = ($min_price['price'] * $min_price['discount']) / 100;
$price = $min_price['price'] - $discount;
$old_price = $min_price['price'];
} else {
$discount = ($product['price'] * $product['discount']) / 100;
$price = $product['price'] - $discount;
$old_price = $product['price'];
}
if ($key > 5) {
break;
}
?>
<div class="product-item recent-product style-04 rows-space-0 post-93 product type-product status-publish has-post-thumbnail product_cat-light product_cat-table product_cat-new-arrivals product_tag-table product_tag-sock first instock shipping-taxable purchasable product-type-simple ">
<div class="product-inner tooltip-top tooltip-all-top">
<div class="product-thumb">
<a class="thumb-link"
href="view-product.php?id=<?php echo $product['id']; ?>" tabindex="0">
<img class="img-responsive"
src="upload/product-categories/sub-category/product/photos/<?php echo $product['image_name']; ?>"
alt="KNIT LIKE" width="270" height="350">
</a>
<div class="flash">
<span class="onnew"><span class="text">New</span></span></div>
<div class="group-button">
<a href="view-product.php?id=<?php echo $product['id']; ?>" class="button yith-wcqv-button">Quick View</a>
</div>
</div>
<div class="product-info">
<h3 class="product-name product_title">
<a href="view-product.php?id=<?php echo $product['id']; ?>"
tabindex="0"><?php
if (strlen($product['name']) > 30) {
echo substr($product['name'], 0, 28) . '...';
} else {
echo $product['name'];
}
?>
</a>
</h3>
<span class="price">
<?php
if ($discount == 0) {
?>
<span class="price"> Rs. <?php echo number_format($price, 2); ?></span>
<?php
} else {
?>
<span class="price"> Rs. <?php echo number_format($price, 2); ?></span> <del><span class="price-before-discount">Rs. <?php echo number_format($old_price, 2); ?></span> </del>
<?php
}
?>
</span>
<!--<div class="rating-wapper nostar">
<div class="star-rating"><span style="width:0%">Rated <strong
class="rating">0</strong> out of 5</span></div>
<span class="review">(0)</span>
</div>-->
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
<?php
foreach (Offer::all() as $key => $offer) {
if ($key < 1) {
?>
<div class="section-038">
<div class="lynessa-banner style-07 left-center">
<div class="banner-inner">
<figure class="banner-thumb">
<img src="upload/offer/<?php echo $offer['image_name']; ?>"
class="attachment-full size-full" alt="img"></figure>
<div class="banner-info container">
<div class="banner-content">
<div class="title-wrap">
<div class="banner-label">
<?php
$date = date_create($offer['date']);
echo date_format($date, 'd - M - Y');
?>
</div>
<h6 class="title">
Online Offer</h6>
</div>
<div class="cate">
<?php echo $offer['discount']; ?>% Off / Selected items
</div>
<div class="button-wrap">
<div class="subtitle">
<?php echo $offer['short_description']; ?>
</div>
<a class="button" target="_self" href="designs.php"><span>Shop now</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}
?>
<?php
}
?>
<div class="section-033">
<div class="container">
<div class="section-034">
<div class="row">
<div class="col-xs-12 col-sm-10 col-md-6 offset-sm-1 col-xl-5 col-lg-5">
<div class="lynessa-slide">
<div class="owl-slick equal-container better-height slider-l"
data-slick="{"arrows":false,"slidesMargin":0,"dots":true,"infinite":false,"speed":300,"slidesToShow":1,"rows":1}"
data-responsive="[{"breakpoint":480,"settings":{"slidesToShow":1,"slidesMargin":"0"}},{"breakpoint":768,"settings":{"slidesToShow":1,"slidesMargin":"0"}},{"breakpoint":992,"settings":{"slidesToShow":1,"slidesMargin":"0"}},{"breakpoint":1200,"settings":{"slidesToShow":1,"slidesMargin":"0"}},{"breakpoint":1500,"settings":{"slidesToShow":1,"slidesMargin":"0"}}]">
<?php
foreach (Comments::all() as $comment) {
?>
<div class="lynessa-testimonial style-02">
<div class="testimonial-inner">
<div class="desc">
<p><?php echo $comment['comment']; ?></p>
</div>
<div class="testimonial-info">
<div class="intro">
<h3 class="name">
<a href="#" target="_self" tabindex="0">
<?php echo $comment['name']; ?> </a>
</h3>
<div class="position">
Customer
</div>
</div>
<div class="thumb">
<img src="upload/comments/<?php echo $comment['image_name']; ?>"
class="attachment-full size-full" alt="img" width="97"
height="97"></div>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="border-top-1"></div>
</div>
</div>
<!-- Start Header -->
<?php include './footer.php'; ?>
<!-- End Header -->
<a href="#" class="backtotop active">
<i class="fa fa-angle-up"></i>
</a>
<script src="assets/js/jquery-1.12.4.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/chosen.min.js"></script>
<script src="assets/js/countdown.min.js"></script>
<script src="assets/js/jquery.scrollbar.min.js"></script>
<script src="assets/js/lightbox.min.js"></script>
<script src="assets/js/magnific-popup.min.js"></script>
<script src="assets/js/slick.js"></script>
<script src="assets/js/jquery.zoom.min.js"></script>
<script src="assets/js/threesixty.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="assets/js/mobilemenu.js"></script>
<script src="assets/js/functions.js"></script>
<script src="js/add-to-cart.js"></script>
</body>
</html> |