-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSPcategory.php
189 lines (172 loc) · 9.49 KB
/
SPcategory.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
179
180
181
182
183
184
185
186
187
188
189
<?php
require "layout/header.php"
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<!-- Start All Pages -->
<div class="all-page-title page-breadcrumb">
<div class="container text-center">
<div class="row">
<div class="col-lg-12">
<h1>Special Menu</h1>
</div>
</div>
</div>
</div>
<!-- End All Pages -->
<!-- Start Menu -->
<div class="menu-box">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="heading-title text-center">
<h2>Special Menu</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting</p>
</div>
</div>
</div>
<div class="row inner-menu-box">
<?php
$conn = mysqli_connect('localhost', 'root', '', 'wsts-1');
require 'DBconnext.php';
$query = mysqli_query($conn, "select tenLoaiSanPham , maLoaiSanPham from loaisanpham");
while ($row = mysqli_fetch_array($query)) {
?>
<div class="col-3">
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a href="SPcategory.php?maLoaiSanPham=<?php echo $row['maLoaiSanPham']; ?>"><button class="nav-link active" role="tab" aria-controls="v-pills-home" aria-selected="true"><?php echo $row['tenLoaiSanPham']; ?></button></a>
</div>
</div>
<?php
}
?>
<div class="col-9">
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
<div class="row">
<?php
$conn = mysqli_connect('localhost', 'root', '', 'wsts-1');
require 'DBconnext.php';
$malsp = $_GET['maLoaiSanPham'];
$query = mysqli_query($conn, "select * from sanpham a, loaisanpham b where a.maLoaiSanPham = b.maLoaiSanPham and b.maLoaiSanPham= $malsp");
while ($row = mysqli_fetch_array($query)) {
?>
<div class="col-lg-4 col-md-6 special-grid drinks" style="margin-top: 25px;">
<div class="gallery-single fix">
<img src="templateUser/images/<?php echo $row['hinhAnh']; ?>" class="img-fluid" alt="Image" style="height: 200px;">
<div class="why-text">
<h4><?php echo $row['tenSanPham']; ?></h4>
<p><?php echo $row['tenLoaiSanPham']; ?></p>
<h5> <?php echo $row['giaBan']; ?></h5>
<a href="SPDetail.php?maSanPham=<?php echo $row['maSanPham']; ?>"><button
style="color: white; background-color: #D65106; border-color: #D65106;">Chi
tiết sản phẩm</button></a>
<form action="cart.php" method="post">
<input type="number" name="soLuong" min="1" max="10" value="1">
<input type="submit" name="addcart" value="Đặt hàng">
<input type="hidden" name="hinhAnh" value="<?php echo $row['hinhAnh']; ?>">
<input type="hidden" name="tenSanPham" value="<?php echo $row['tenSanPham']; ?>">
<input type="hidden" name="giaBan" value="<?php echo $row['giaBan']; ?>">
</form>
</div>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Menu -->
<!-- Start QT -->
<div class="qt-box qt-background">
<div class="container">
<div class="row">
<div class="col-md-8 ml-auto mr-auto text-center">
<p class="lead ">" If you're not the one cooking, stay out of
the way and compliment the chef. "</p>
<span class="lead">Michael Strahan</span>
</div>
</div>
</div>
</div>
<!-- End QT -->
<!-- Start Customer Reviews -->
<div class="customer-reviews-box">
<div class="container">
<div class="row">
<div class="col-lg-12"></div>
</div>
<div class="row">
<div class="col-md-8 mr-auto ml-auto text-center">
<div id="reviews" class="carousel slide" data-ride="carousel">
<div class="carousel-inner mt-4">
<div class="carousel-item text-center active">
<div class="img-box p-1 border rounded-circle m-auto">
<img class="d-block w-100 rounded-circle" src="images/quotations-button.png" alt="">
</div>
<h5 class="mt-4 mb-0">
<strong class="text-warning text-uppercase">Paul
Mitchel</strong>
</h5>
<h6 class="text-dark m-0">Web Developer</h6>
<p class="m-0 pt-3">Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui.
Mauris magna metus, dapibus nec turpis vel, semper malesuada
ante. Idac bibendum scelerisque non non purus. Suspendisse
varius nibh non aliquet.</p>
</div>
<div class="carousel-item text-center">
<div class="img-box p-1 border rounded-circle m-auto">
<img class="d-block w-100 rounded-circle" src="images/quotations-button.png" alt="">
</div>
<h5 class="mt-4 mb-0">
<strong class="text-warning text-uppercase">Steve
Fonsi</strong>
</h5>
<h6 class="text-dark m-0">Web Designer</h6>
<p class="m-0 pt-3">Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui.
Mauris magna metus, dapibus nec turpis vel, semper malesuada
ante. Idac bibendum scelerisque non non purus. Suspendisse
varius nibh non aliquet.</p>
</div>
<div class="carousel-item text-center">
<div class="img-box p-1 border rounded-circle m-auto">
<img class="d-block w-100 rounded-circle" src="images/quotations-button.png" alt="">
</div>
<h5 class="mt-4 mb-0">
<strong class="text-warning text-uppercase">Daniel
vebar</strong>
</h5>
<h6 class="text-dark m-0">Seo Analyst</h6>
<p class="m-0 pt-3">Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nam eu sem tempor, varius quam at, luctus dui.
Mauris magna metus, dapibus nec turpis vel, semper malesuada
ante. Idac bibendum scelerisque non non purus. Suspendisse
varius nibh non aliquet.</p>
</div>
</div>
<a class="carousel-control-prev" href="#reviews" role="button" data-slide="prev"> <i class="fa fa-angle-left" aria-hidden="true"></i> <span class="sr-only">Previous</span>
</a> <a class="carousel-control-next" href="#reviews" role="button" data-slide="next"> <i class="fa fa-angle-right" aria-hidden="true"></i> <span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- End Customer Reviews -->
</body>
</html>
<?php
require "layout/footer.php"
?>