-
Notifications
You must be signed in to change notification settings - Fork 0
/
shop.php
165 lines (159 loc) · 7.82 KB
/
shop.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
<?php
require('lib/header.php');
?>
<!-- Breadcrumb Begin -->
<div class="breadcrumb-option">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb__links">
<a href="./index.php"><i class="fa fa-home"></i> Home</a>
<span>Shop</span>
</div>
</div>
</div>
</div>
</div>
<!-- Breadcrumb End -->
<!-- Shop Section Begin -->
<section class="shop spad">
<div class="container">
<div class="col-lg-9 col-md-9">
<div class="row">
<?php
$conn = mysqli_connect("127.0.0.1:3306","root","1234","shopping_mall");
$sql = "SELECT count(*) as count FROM shopping_mall.product";
$result = mysqli_fetch_array(mysqli_query($conn, $sql));
$count = $result['count'];
for($i = 0; $i < $count; $i = $i + 1){
$sql = "SELECT * FROM shopping_mall.product WHERE 상품번호=\"p00$i\"";
$result = mysqli_fetch_array(mysqli_query($conn, $sql));
$product_name = $result['상품이름'];
$product_detail = $result['상품설명'];
$product_price = $result['가격'];
echo "
<div class=\"col-lg-4 col-md-6\">
<div class=\"product__item\">
<div class=\"product__item__pic set-bg\" data-setbg=\"img/product/details/p00$i.jpg\">
<div class=\"label new\">New</div>
<ul class=\"product__hover\">
<li><a href=\"img/shop/shop-1.jpg\" class=\"image-popup\"><span class=\"arrow_expand\"></span></a></li>
<li><a href=\"#\"><span class=\"icon_heart_alt\"></span></a></li>
<li><a href=\"#\"><span class=\"icon_bag_alt\"></span></a></li>
</ul>
</div>
<div class=\"product__item__text\">
<h6><a href=\"./product-p00$i.php\">$product_name</a></h6>
<div class=\"product__price\">$product_price 원</div>
</div>
</div>
</div> ";
}
?>
<div class="col-lg-12 text-center">
<div class="pagination__option">
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#"><i class="fa fa-angle-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Shop Section End -->
<!-- Footer Section Begin -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-7">
<div class="footer__about">
<div class="footer__logo">
<a href="./index.html"><img src="img/logo.png" alt=""></a>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
cilisis.</p>
<div class="footer__payment">
<a href="#"><img src="img/payment/payment-1.png" alt=""></a>
<a href="#"><img src="img/payment/payment-2.png" alt=""></a>
<a href="#"><img src="img/payment/payment-3.png" alt=""></a>
<a href="#"><img src="img/payment/payment-4.png" alt=""></a>
<a href="#"><img src="img/payment/payment-5.png" alt=""></a>
</div>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-5">
<div class="footer__widget">
<h6>Quick links</h6>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Blogs</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">FAQ</a></li>
</ul>
</div>
</div>
<div class="col-lg-2 col-md-3 col-sm-4">
<div class="footer__widget">
<h6>Account</h6>
<ul>
<li><a href="#">My Account</a></li>
<li><a href="#">Orders Tracking</a></li>
<li><a href="#">Checkout</a></li>
<li><a href="#">Wishlist</a></li>
</ul>
</div>
</div>
<div class="col-lg-4 col-md-8 col-sm-8">
<div class="footer__newslatter">
<h6>NEWSLETTER</h6>
<form action="#">
<input type="text" placeholder="Email">
<button type="submit" class="site-btn">Subscribe</button>
</form>
<div class="footer__social">
<a href="#"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-youtube-play"></i></a>
<a href="#"><i class="fa fa-instagram"></i></a>
<a href="#"><i class="fa fa-pinterest"></i></a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
<div class="footer__copyright__text">
<p>Copyright © <script>document.write(new Date().getFullYear());</script> All rights reserved | This template is made with <i class="fa fa-heart" aria-hidden="true"></i> by <a href="https://colorlib.com" target="_blank">Colorlib</a></p>
</div>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
</div>
</div>
</div>
</footer>
<!-- Footer Section End -->
<!-- Search Begin -->
<div class="search-model">
<div class="h-100 d-flex align-items-center justify-content-center">
<div class="search-close-switch">+</div>
<form class="search-model-form">
<input type="text" id="search-input" placeholder="Search here.....">
</form>
</div>
</div>
<!-- Search End -->
<!-- Js Plugins -->
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/mixitup.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.slicknav.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.nicescroll.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>