-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckout.php
More file actions
124 lines (111 loc) · 3.68 KB
/
Copy pathcheckout.php
File metadata and controls
124 lines (111 loc) · 3.68 KB
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
<?php
session_start();
include("includes/db.php");
include("functions/functions.php");
?>
<html>
<head>
<title>
Ecommerce
</title>
<link rel="stylesheet" href="styles/style1.css" media="all" />
</head>
<body>
<!-- main container start -->
<div class="main_wrapper">
<div class="header_wrapper"> <!-- header starts -->
<a href="index.php"><img src="images/logo1.jpg" style="float:left;"></a>
<img src="images/gig.gif" float="right" width="700" height="100px">
</div> <!-- header ends -->
<div id="nav_bar"> <!-- nav bar starts -->
<ul id="menu">
<li><a href="index.php"> Home</a> </li>
<li><a href="all_products.php"> All Products</a> </li>
<li><a href="Customer/my_account.php"> My Account</a> </li>
<li><a href="user_register.php"> Sign Up</a> </li>
<li><a href="cart.php"> Shopping Cart</a> </li>
<li><a href="contact.php"> Contact Us</a> </li>
</ul>
<div id="form">
<form method="get" action="results.php" enctype="multipart/form-data">
<input type="text" name="user_query" placeholder="search a product" />
<input type="submit" name="search" value="Search" />
</form>
</div>
</div> <!-- nav bar ends -->
<!-- content_wrapper starts -->
<div class="content_wrapper">
<?php cart(); ?>
<div id="content_right"> <!-- right_content starts -->
<div id="headline">
<div id="headline_content">
<?php
if(!isset($_SESSION['customer_email']))
{
echo "<b>Welcome Guest</b>";
}
else
{
$mail=$_SESSION['customer_email'];
$get_name="select * from customers where customer_email='$mail'";
$run=mysqli_query($con,$get_name);
while($row=mysqli_fetch_array($run))
{
$name=$row['customer_name'];
}
echo "<b>Welcome </b>" . $name;
}
?>
<b style="color:yellow">Shopping Cart </b>
<span>- Items:<?php items(); ?> - Price: <?php price(); ?>
<a href="cart.php" id="btn" style="margin-left:5px;color:#FFF;border:1px solid #FFF;padding:8px 20px;line-height:29px;border-radius:10px;text-decoration:none;">
Go to Cart
</a>
<?php
if(isset($_SESSION['customer_email']))
{
echo "<a href='logout.php' id='btn' style='margin-left:5px;color:#FFF;border:1px solid #FFF;padding:8px 20px;line-height:29px;border-radius:10px;text-decoration:none;'>
Logout
</a>";
}
else
{
echo "<a href='checkout.php' id='btn' style='margin-left:5px;color:#FFF;border:1px solid #FFF;padding:8px 20px;line-height:29px;border-radius:10px;text-decoration:none;'>
Login
</a>";
}
?>
</span>
</div>
</div>
<div>
<?php
if(!isset($_SESSION['customer_email']))
{
include("Customer/customer_login.php");
}
else
{
include("payment_options.php");
}
?>
</div>
</div> <!-- right_content ends -->
<div id="left_sidebar"> <!-- left_sidebar starts -->
<div id="content_title">Categories</div>
<ul id="cats" style="text-align:center">
<?php get_cats(); ?>
</ul>
<div id="content_title">Brands</div>
<ul id="cats" style="text-align:center">
<?php get_brands(); ?>
</ul>
</div> <!-- left_sidebar ends -->
<!-- content_wrapper ends -->
<div class="footer">
<h1 style="text-align:center">© 2019- By WKS Developers</h1>
</div>
</div>
<!-- main container ends -->
</body>
</html>