-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
178 lines (160 loc) · 13.2 KB
/
index.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php
session_start();
ob_start();
$rootPath = '/ananas';
require_once './database/DB.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ananas</title>
<link rel="icon" type="image/x-icon" href="https://brademar.com/wp-content/uploads/2022/09/Ananas-Logo-PNG-1.png">
<link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.1.2/css/all.css">
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<link rel="stylesheet" href="./public/css/base.css">
<!-- <link rel="stylesheet" href="./public/css/home.css"> -->
<style>
p {
text-align: justify;
}
.card-info:hover {
border-color: aqua !important;
}
</style>
</head>
<body>
<?php
require './includes/header.php';
require './includes/navbar.php';
$newArrivalQueryString = "SELECT * FROM product WHERE status = 'New Arrival'";
$newArrivalProducts = mysqli_query($conn, $newArrivalQueryString);
?>
<div id="template-mo-zay-hero-carousel" class="carousel carousel-dark slide mb-5" data-bs-ride="carousel">
<ol class="carousel-indicators">
<li data-bs-target="#template-mo-zay-hero-carousel" data-bs-slide-to="0" class="active"></li>
<li data-bs-target="#template-mo-zay-hero-carousel" data-bs-slide-to="1"></li>
<li data-bs-target="#template-mo-zay-hero-carousel" data-bs-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="3000">
<img class="d-block mx-auto img-fluid" src="https://ananas.vn/wp-content/uploads/Hi-im-Mule_1920x1050-Desktop.jpg" alt="First slide" />
</div>
<div class="carousel-item" data-bs-interval="3000">
<img class="d-block mx-auto img-fluid" src="https://ananas.vn/wp-content/uploads/Web1920-1.jpeg" alt="First slide" />
</div>
<div class="carousel-item" data-bs-interval="3000">
<img class="d-block mx-auto img-fluid" src="https://ananas.vn/wp-content/uploads/kv_basas_mobileBanner_4_2019.jpg" alt="First slide" />
</div>
</div>
</div>
<div class="container-fluid pt-5 pb-5">
<!-- team member -->
<div class="container mb-5">
<div class="row text-center mb-2">
<div class="h2" style="color:#ED171F">TEAM MEMBERS</div>
</div>
<div class="row">
<div class="col-xl-3 col-md-6 col-sm-12 shadow-sm">
<div class="text-center card border border-2 card-info">
<a href="https://www.facebook.com/tan.nguyenhoangduy.374"><img alt="AVT" width="200" height="200" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOsAAADXCAMAAADMbFYxAAAAh1BMVEX///8AAAD5+fn8/Pzw8PDs7OzBwcHS0tLMzMzf39/Hx8e1tbX09PT6+vro6Ojl5eVZWVkoKCiUlJSenp56enrY2NilpaVvb2+Hh4dHR0cdHR1WVlasrKxhYWE+Pj50dHQWFhYsLCxnZ2eNjY1BQUFNTU0pKSk2NjYfHx+IiIgODg5/f3+6urpooj6hAAAKvUlEQVR4nOWd2WLyKhCAk7pVa923Vm21arXq+z/fiUIia0JgCON/vlsVmUCG2YAoqoru6+qyHp7j+Hzaz3fNRmV/XDEvncVXLLC9tEJ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WljK9B9kKblN5r/j7TrTzhXnxt7oTWBfA7xS+h5XyIrBjz/qCi3v50/eUWu7MOfmyxVMYq9vzU014y/dhXt3j7vk8ZIUMaanZ5rvGflVjzOaMfDiOuHg4W/CxD2xkq443DwMRqenkdR1HQhpRBMnJISc1Ez0FBFCR+jq6QoZ/iUNVlgQGiKxmxVPPDgmOeAv0oIJEP6By2bghlpNbYc+zQJIdoXtRDcMqYhJYqP1PLMQb7QriL1i4VUf6jWrhYeQ9XIqHAWj5FG6GfpNWuOja1WE/JS3I6kPkzDzmmLEx/w/4yJpEbE5wVwAAAABJRU5ErkJggg==" class="rounded-circle mb-3 mt-3" /></a>
<p class="text-dark" style="text-align: center; font-weight: bold;">Nguyễn Hoàng Duy Tân</p>
</div>
</div>
<div class="col-xl-3 col-md-6 col-sm-12 shadow-sm">
<div class="text-center card border border-2 card-info">
<a href="https://www.facebook.com/profile.php?id=100008620419001"><img alt="AVT" width="200" height="200" src="./assets/tue_avt.jpg" class="rounded-circle mb-3 mt-3" /></a>
<p class="text-dark" style="text-align: center; font-weight: bold;">Trần Nguyễn Minh Tuệ</p>
</div>
</div>
<div class="col-xl-3 col-md-6 col-sm-12 shadow-sm">
<div class="text-center card border border-2 card-info">
<a href="https://www.facebook.com/minhloc1605"><img alt="AVT" width="200" height="200" src="./assets/loc.jpg" class=" rounded-circle mb-3 mt-3" /></a>
<p class="text-dark" style="text-align: center; font-weight: bold;">Nguyễn Minh Lộc</p>
</div>
</div>
<div class="col-xl-3 col-md-6 col-sm-12 shadow-sm">
<div class="text-center card border border-2 card-info">
<a href="https://www.facebook.com/huytran613"><img alt="AVT" width="200" height="200" src="./assets/huy_avt.jpg" class="rounded-circle mb-3 mt-3" /></a>
<p class="text-dark" style="text-align: center; font-weight: bold;">Trần Đan Huy</p>
</div>
</div>
</div>
</div>
<!-- best seller -->
</div>
<div>
<h3 class="text-danger text-uppercase text-center">sản phẩm mới của chúng tôi</h3>
<div class="row container-fluid">
<?php
while ($newArrivalProductRow = $newArrivalProducts->fetch_assoc()) {
?>
<div class="col-lg-3 col-sm-6 mb-3">
<a href="<?php echo $rootPath ?>/product_detail.php?productId=<?php echo $newArrivalProductRow['product_id'] ?>" class="text-black text-decoration-none">
<div class="card h-100 position-relative">
<img src="<?php echo $rootPath ?>/public/img/<?php echo $newArrivalProductRow['images']; ?>" class="img-fluid" alt="..." onmouseover="this.src='<?php echo $rootPath ?>/public/img/<?php echo $newArrivalProductRow['subimg_1']; ?>'" onmouseout="this.src='<?php echo $rootPath ?>/public/img/<?php echo $newArrivalProductRow['images']; ?>'">
<div class="btn btn-outline-danger position-absolute end-0 bottom-25"><i class=" fa-light fa-heart"></i> </div>
<div class="card-body d-flex flex-column justify-content-between align-items-center">
<div class="d-flex flex-column justify-content-start">
<h6 class="card-title" style="font-size: 0.75rem">
<?php echo $newArrivalProductRow["name"]; ?></h6>
</div>
<div class="card-text">
<p>
<?php
// Nếu có giá Khuyến mãi
if ($newArrivalProductRow["price_sale"] != 0) {
?>
<?php
echo '<del class="text-secondary">' . number_format($newArrivalProductRow["price"]) . '</del><sup>đ</sup>';
?>
<?php
echo '<strong><span class="text-danger ms-3">' . number_format($newArrivalProductRow["price_sale"]) . '<sup>đ</sup></span></strong>';
?>
<?php
// nếu không có khuyến mãi, hiện giá gốc
} else {
echo '<strong>' . number_format($newArrivalProductRow["price"]) . '<sup>đ</sup></strong>';
}
?>
</p>
</div>
</div>
<div class="card-footer d-flex flex-column">
<!-- <a href="<?php echo $rootPath ?>/process_cart.php?action=add&id=<?php echo $row['product_id'] ?>&quantity=1" class="btn btn-warning mt-1 <?php if ($row["quantity"] == 0) echo 'disabled' ?>"><i class="fa-light fa-cart-plus"></i></a> -->
<!-- <button onclick="addCartItem(<?= $row['product_id'] ?>)" class="btn btn-warning mt-1 <?php if ($row["quantity"] == 0) echo 'disabled' ?>"><i class="fa-light fa-cart-plus"></i></button> -->
</div>
</div>
</a>
</div>
<?php
}
?>
</div>
</div>
<?php
require './includes/footer.php';
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js" integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous">
</script>
<script src="./public/javascripts/loadCartHeader.js"></script>
<script>
$(document).ready(function() {
loadCartAjax();
$(window).scroll(function() {
if ($(this).scrollTop() > 114) {
$("#navbar-top").addClass('fix-nav')
} else {
$("#navbar-top").removeClass('fix-nav')
}
})
});
</script>
<script src="./public/javascripts/liveSearch.js"></script>
</body>
</html>