-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathproduct_details.php
189 lines (166 loc) · 8.06 KB
/
product_details.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
include("./includes/connect.php");
include("./functions/common_functions.php");
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ecommerce Products</title>
<link rel="stylesheet" href="./assets/css/bootstrap.css" />
<link rel="stylesheet" href="./assets/css/main.css" />
</head>
<body>
<!-- upper-nav -->
<div class="upper-nav primary-bg p-2 px-3 text-center text-break">
<span>Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! <a>Shop Now</a></span>
</div>
<!-- upper-nav -->
<!-- Start NavBar -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand fw-bold" href="#">A1</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="./index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="./products.php">Products</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
<?php
if(isset($_SESSION['username'])){
echo "
<li class='nav-item'>
<a class='nav-link' href='./users_area/profile.php'>My Account</a>
</li>";
}
else{
echo "
<li class='nav-item'>
<a class='nav-link' href='./users_area/user_registration.php'>Register</a>
</li>";
}
?>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-primary" type="submit">Search</button>
</form>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="./cart.php"><svg width="28" height="28" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11 27C11.5523 27 12 26.5523 12 26C12 25.4477 11.5523 25 11 25C10.4477 25 10 25.4477 10 26C10 26.5523 10.4477 27 11 27Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M25 27C25.5523 27 26 26.5523 26 26C26 25.4477 25.5523 25 25 25C24.4477 25 24 25.4477 24 26C24 26.5523 24.4477 27 25 27Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M3 5H7L10 22H26" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M10 16.6667H25.59C25.7056 16.6667 25.8177 16.6267 25.9072 16.5535C25.9966 16.4802 26.0579 16.3782 26.0806 16.2648L27.8806 7.26479C27.8951 7.19222 27.8934 7.11733 27.8755 7.04552C27.8575 6.97371 27.8239 6.90678 27.7769 6.84956C27.73 6.79234 27.6709 6.74625 27.604 6.71462C27.5371 6.68299 27.464 6.66661 27.39 6.66666H8" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<sup>
<?php
cart_item();
?>
</sup>
<span class="d-none">
Total Price is:
<?php
total_cart_price();
?>
</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" class="d-flex align-items-center gap-1" href="#">
<svg width="28" height="28" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24 27V24.3333C24 22.9188 23.5224 21.5623 22.6722 20.5621C21.8221 19.5619 20.669 19 19.4667 19H11.5333C10.331 19 9.17795 19.5619 8.32778 20.5621C7.47762 21.5623 7 22.9188 7 24.3333V27" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M16.5 14C18.9853 14 21 11.9853 21 9.5C21 7.01472 18.9853 5 16.5 5C14.0147 5 12 7.01472 12 9.5C12 11.9853 14.0147 14 16.5 14Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<?php
if(!isset($_SESSION['username'])){
echo "<span>
Welcome guest
</span>";
}else{
echo "<span>
Welcome ".$_SESSION['username']. "</span>";
}
?>
</a>
</li>
<?php
if(!isset($_SESSION['username'])){
echo "<li class='nav-item'>
<a class='nav-link' href='./users_area/user_login.php'>
Login
</a>
</li>";
}else{
echo "<li class='nav-item'>
<a class='nav-link' href='./users_area/logout.php'>
Logout
</a>
</li>";
}
?>
</ul>
</div>
</div>
</nav>
<!-- End NavBar -->
<!-- Start Product details -->
<div class="prod-details">
<div class="container">
<div class="sub-container pt-4 pb-4">
<?php
viewDetails();
?>
</div>
</div>
</div>
<!-- End Product details -->
<!-- Start Products -->
<div class="products">
<div class="container">
<div class="categ-header">
<div class="sub-title">
<span class="shape"></span>
<span class="title">Related Products</span>
</div>
<h2>Discover More Products</h2>
</div>
<div class="row mb-3">
<?php
getProduct(3);
cart();
?>
</div>
<div class="view d-flex justify-content-center align-items-center">
<button onclick="location.href='./products.php'">View More Products</button>
</div>
</div>
</div>
<!-- End Products -->
<!-- divider -->
<!-- <div class="container">
<div class="divider"></div>
</div> -->
<!-- divider -->
<!-- Start Footer -->
<!-- <div class="upper-nav primary-bg p-2 px-3 text-center text-break">
<span>All CopyRight ©2023</span>
</div> -->
<!-- End Footer -->
<script src="./assets//js/bootstrap.bundle.js"></script>
<script src="./assets//js/script.js"></script>
</body>
</html>