-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeauty.php
441 lines (392 loc) · 16 KB
/
beauty.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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<?php
session_start();
include("includes/db.php");
include("funcs/funcs.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">
<title>Shopping Cart | Home</title>
<!-- Font awesome -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- SmartMenus jQuery Bootstrap Addon CSS -->
<link href="css/jquery.smartmenus.bootstrap.css" rel="stylesheet">
<!-- Product view slider -->
<link rel="stylesheet" type="text/css" href="css/jquery.simpleLens.css">
<!-- slick slider -->
<link rel="stylesheet" type="text/css" href="css/slick.css">
<!-- price picker slider -->
<link rel="stylesheet" type="text/css" href="css/nouislider.css">
<!-- Theme color -->
<link id="switcher" href="css/theme-color/default-theme.css" rel="stylesheet">
<!-- Main style sheet -->
<link href="css/style.css" rel="stylesheet">
<!-- Google Font -->
<link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- wpf loader Two -->
<div id="wpf-loader-two">
<div class="wpf-loader-two-inner"> <span>Loading</span> </div>
</div>
<!-- / wpf loader Two -->
<!-- SCROLL TOP BUTTON -->
<a class="scrollToTop" href="#"><i class="fa fa-chevron-up"></i></a>
<!-- END SCROLL TOP BUTTON -->
<!-- Start header section -->
<header id="aa-header">
<!-- start header top -->
<div class="aa-header-top">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="aa-header-top-area">
<!-- start header top left -->
<div class="aa-header-top-left">
<!-- start language -->
<div class="aa-language">
<div class="dropdown"> <a class="btn dropdown-toggle" href="#" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <img src="img/flag/english.jpg" alt="english flag">ENGLISH <span class="caret"></span> </a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a href="#"><img src="img/flag/english.jpg" alt="">ENGLISH</a></li>
</ul>
</div>
</div>
<!-- / language -->
<!-- start currency -->
<div class="aa-currency">
<div class="dropdown"> <a class="btn dropdown-toggle" href="#" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">₹ RUPPEE<span class="caret"></span> </a>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li>₹ RUPPEE</li>
<li>$ DOLLAR</li>
</ul>
</div>
</div>
<!-- / currency -->
<!-- start cellphone -->
<div class="cellphone hidden-xs">
<p><span class="fa fa-phone"></span>9876541239</p>
</div>
<!-- / cellphone -->
</div>
<!-- / header top left -->
<div class="aa-header-top-right">
<ul class="aa-head-top-nav-right">
<li><a href="account.php">My Account</a></li>
<li class="hidden-xs"><a href="cart.php">My Cart</a></li>
<li class="hidden-xs"><a href="checkout.php">Checkout</a></li>
<?php
if(isset($_SESSION['customer_email'])){
echo "<li><a href='logout.php' >Logout</a></li>" ;
}
else{
echo "<li><a href='' data-toggle='modal' data-target='#login-modal'>Login</a></li>";
}
?>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- / header top -->
<!-- start header bottom -->
<div class="aa-header-bottom">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="aa-header-bottom-area">
<!-- logo -->
<div class="aa-logo">
<!-- Text based logo -->
<a href="index.php"> <span class="fa fa-shopping-cart"></span>
<p>Online Shopping Cart<span>Your Shopping Partner</span></p>
</a>
<!-- img based logo -->
<!-- <a href="index.html"><img src="img/logo.jpg" alt="logo img"></a> -->
</div>
<!-- / logo -->
<!-- cart box -->
<div class="aa-cartbox"> <a class="aa-cart-link" href="#"> <span class="fa fa-shopping-basket"></span> <span class="aa-cart-title">SHOPPING CART</span></a>
<div class="aa-cartbox-summary">
<ul>
<?php
$total=0;
global $conn;
$ip=getIp();
$get_items = "select * from cart where ip_add='$ip'";
$run_items = mysqli_query($conn,$get_items);
while($p_price=mysqli_fetch_array($run_items)){
$pro_id = $p_price['p_id'];
$qty = $p_price['qty'];
$pro_price="select * from beauty where product_id='$pro_id'";
$run_pro_price = mysqli_query($conn,$pro_price);
while($pp_price=mysqli_fetch_array($run_pro_price)){
$product_price = array($pp_price['price']);
$product_title = $pp_price['product_title'];
$product_image = $pp_price['product_img1'];
$single_price = $pp_price['price'];
$qty_price = $single_price * $qty;
$total+=$qty_price;
?>
<li> <a class="aa-cartbox-img" href="#"><img src="admin_area/product_images/beauty/<?php echo $product_image; ?>" alt="img"></a>
<div class="aa-cartbox-info">
<h4><a href="#"><?php echo $product_title; ?></a></h4>
<p><?php echo $qty; ?> x <?php echo "₹".$single_price; ?></p>
</div>
<a class="aa-remove-product" href="#"><span class="fa fa-times"></span></a> </li>
<?php }}?>
<li> <span class="aa-cartbox-total-title"> Total </span> <span class="aa-cartbox-total-price"><?php total_price6(); ?></span> </li>
</ul>
<a class="aa-cartbox-checkout aa-primary-btn" href="checkout.php">Checkout</a> </div>
</div>
<!-- / cart box -->
<!-- search box -->
<div class="aa-search-box">
<form action="">
<input type="text" name="" id="" placeholder="Search here ex. 'man' ">
<button type="submit"><span class="fa fa-search"></span></button>
</form>
</div>
<!-- / search box -->
</div>
</div>
</div>
</div>
</div>
<!-- / header bottom -->
</header>
<!-- / header section -->
<!-- menu -->
<section id="menu">
<div class="container">
<div class="menu-area">
<!-- Navbar -->
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
</div>
<div class="navbar-collapse collapse">
<!-- Left nav -->
<?php getIp(); ?>
<?php cart(); ?>
<ul class="nav navbar-nav">
<li><a href="men.php">Men</a></li>
<li><a href="women.php">Women</a></li>
<li><a href="kids.php">Kids</a></li>
<li><a href="living.php">Home & Living</a></li>
<li><a href="electronics.php">Electronic Appliances</a></li>
<li><a href="beauty.php">Beauty</a></li>
<li style="float:right"><a>
<?php
if(isset($_SESSION['customer_email'])){
echo "Welcome " . $_SESSION['customer_email'];
}
else{
echo "Welcome Guest";
}
?></a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
</section>
<!-- / menu -->
<!-- Products section -->
<section id="aa-product">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="aa-product-area">
<div class="aa-product-inner">
<!-- start prduct navigation -->
<ul class="nav nav-tabs aa-products-tab">
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- Start men product category -->
<div class="tab-pane fade in active" id="men">
<ul class="aa-product-catg">
<!-- start single product item -->
<?php getbeautypro(); ?>
</ul>
<!-- / men product category -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- / Products section -->
<!-- footer -->
<footer id="aa-footer">
<!-- footer bottom -->
<div class="aa-footer-top">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="aa-footer-top-area">
<div class="row">
<div class="col-md-3 col-sm-6">
<div class="aa-footer-widget">
<h3>Main Menu</h3>
<ul class="aa-footer-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Our Services</a></li>
<li><a href="#">Our Products</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="aa-footer-widget">
<div class="aa-footer-widget">
<h3>Knowledge Base</h3>
<ul class="aa-footer-nav">
<li><a href="#">Delivery</a></li>
<li><a href="#">Returns</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Discount</a></li>
<li><a href="#">Special Offer</a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="aa-footer-widget">
<div class="aa-footer-widget">
<h3>Useful Links</h3>
<ul class="aa-footer-nav">
<li><a href="#">Site Map</a></li>
<li><a href="#">Search</a></li>
<li><a href="#">Advanced Search</a></li>
<li><a href="#">Suppliers</a></li>
<li><a href="#">FAQ</a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="aa-footer-widget">
<div class="aa-footer-widget">
<h3>Contact Us</h3>
<address>
<p>RVR&JC COLLEGE OF ENGINEERING< CHOWDAVARAM</p>
<p><span class="fa fa-phone"></span>Guntur, 522019</p>
<p><span class="fa fa-envelope"></span>rvrmean@gmail.com</p>
</address>
<div class="aa-footer-social"> <a href="#"><span class="fa fa-facebook"></span></a> <a href="#"><span class="fa fa-twitter"></span></a> <a href="#"><span class="fa fa-google-plus"></span></a> <a href="#"><span class="fa fa-youtube"></span></a> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- footer-bottom -->
<div class="aa-footer-bottom">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="aa-footer-bottom-area">
<p>Designed by <a href="http://www.markups.io/">Full Stack Batch 2 students</a></p>
<div class="aa-footer-payment"> <span class="fa fa-cc-mastercard"></span> <span class="fa fa-cc-visa"></span> <span class="fa fa-paypal"></span> <span class="fa fa-cc-discover"></span> </div>
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- / footer -->
<!-- Login Modal -->
<div class="modal fade" id="login-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4>Login or Register</h4>
<form class="aa-login-form" action="" method="post">
<label for="">Username or Email address<span>*</span></label>
<input type="text" name="email" placeholder="Username or email" required>
<label for="">Password<span>*</span></label>
<input type="password" name="pass" placeholder="Password" required>
<button class="aa-browse-btn" name="login" type="submit">Login</button>
<label for="rememberme" class="rememberme">
<input type="checkbox" id="rememberme">
Remember me </label>
<p class="aa-lost-password"><a href="#">Lost your password?</a></p>
<div class="aa-register-now"> Don't have an account?<a href="register.php">Register now!</a> </div>
</form>
<?php
if(isset($_POST['login'])){
$c_email=$_POST['email'];
$c_pass=$_POST['pass'];
$sel_c = "select * from customers where customer_email='$c_email' AND customer_pass='$c_pass'";
$run_c = mysqli_query($conn,$sel_c);
$check_customer = mysqli_num_rows($run_c);
if($check_customer==0){
echo"<script>alert('Password or Email is incorrect! plz try again')</script>";
}
else{
$ip=getIp();
$sel_cart ="select * from cart where ip_add='$ip'";
$run_cart = mysqli_query($conn,$sel_cart);
$check_cart = mysqli_num_rows($run_cart);
$_SESSION['customer_email']=$c_email;
echo "<script>alert('Login Successful !')</script>";
}
if($check_customer>0 AND $check_cart==0){
echo "<script>window.open('index.php','_self')</script>";
}
else{
echo "<script>window.open('index.php','_self')</script>";
}
}
?>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>
<!-- SmartMenus jQuery plugin -->
<script type="text/javascript" src="js/jquery.smartmenus.js"></script>
<!-- SmartMenus jQuery Bootstrap Addon -->
<script type="text/javascript" src="js/jquery.smartmenus.bootstrap.js"></script>
<!-- Product view slider -->
<script type="text/javascript" src="js/jquery.simpleGallery.js"></script>
<script type="text/javascript" src="js/jquery.simpleLens.js"></script>
<!-- slick slider -->
<script type="text/javascript" src="js/slick.js"></script>
<!-- Price picker slider -->
<script type="text/javascript" src="js/nouislider.js"></script>
<!-- Custom js -->
<script src="js/custom.js"></script>
</body>
</html>