-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfirmItem.php
214 lines (175 loc) · 5.18 KB
/
confirmItem.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
<?php
include 'connect.php';
session_start();
if(isset($_SESSION["uid"])){
//echo $_SESSION["uid"];
}else{
header("Location:login.php");
}
$pid = $_GET['pid'];
$aid = $_GET['aid'];
$quantity = $_GET['quantity'];
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: "Lato", sans-serif;
}
.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
.sidenav a:hover {
color: #f1f1f1;
}
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
}
#main {
transition: margin-left .5s;
padding: 16px;
}
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}
}
.color2{
background-color:grey;
margin-left: 35px;
}
.color3{
background-color:yellow;
}
.color5{
margin-left: 35px;
background-color: skyblue;
height: 400px;
padding: 40px;
}
.text1{
color:red;
}
.pc{
color: black;
}
.Round{
padding-top:30px;
}
.Round1{
padding-top:30px;
}
.Round2{
padding-top:30px;
padding-bottom:70px;
}
.jumbotron{
padding-bottom:0;
padding-top:10px;
}
.navbar-right{
padding-bottom:0;
}
.hello{
background-color:purple;
}
</style>
</head>
<body>
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a href="dashboard.php">Home</a>
<a href="shop.php">Shop</a>
<a href="sellItem.php">Sell Items</a>
<a href="addAddress.php">Add address</a>
<a href="items.php">Bag</a>
<a href="#">Contact Us</a>
<a href="logout.php">Logout</a>
</div>
<div id="main">
<span style="font-size:30px;cursor:pointer" onclick="openNav()">☰ </span>
<section id="RectangleFrames" class="color1 Round1">
<div class="container">
<div class="card-group">
<?php
$uid = $_SESSION["uid"];
$q = "SELECT * from items where id = $pid";
$sp = mysqli_prepare($conn,$q);
mysqli_stmt_execute($sp);
$result = mysqli_stmt_get_result($sp);
$count = 0;
while($rows = $result->fetch_assoc()){
$price = $rows['price']*$quantity;
echo '<div class="col-auto mb-2">';
echo '<div style="width: 18rem;" class="card color2">';
echo '<img style="width:100%;height: 200px;" src="'.$rows['imagepath'].'" class="card-img-top" alt="EyeGlasses">
<div class="card-body ">
<h5 class="card-title">'.$rows['itemname'].'</h5>
<p class="card-text"><h6>'.$rows['description'].'</h6></p>
<p class="card-text text1"><label class="pc">Price is '.$price.'</label></p> <form action = "confirmBackened.php" method = "post">
<input type = "hidden" value = '."".$pid."".' name = "pid"><input type = "hidden" value = '."".$aid."".' name = "aid"><input type = "hidden" value = '."".$quantity."".' name = "quantity">
<input type = "submit" name="confirm" class="btn btn-primary" value="Confirm"></form>
</div>';
echo '</div>';
echo '</div>';
}
$r = "select * from userdetails where ind = $aid";
$sp1 = mysqli_prepare($conn,$r);
mysqli_stmt_execute($sp1);
$result1 = mysqli_stmt_get_result($sp1);
while($rows1 = $result1->fetch_assoc()){
echo '<div class="col-auto mb-2">';
echo '<div style="width: 40rem;" class="card color5">';
echo '
<div class="card-body ">
<h1>Address</h1>
<h5 class="card-title"> <b>Name : </b>'.$rows1['name'].'</h5>
<p class="card-text"><h6><b>HouseNo : </b>'.$rows1['houseno'].'</h6></p>
<p class="card-text"><h6><b>City : </b>'.$rows1['city'].'</h6></p>
<p class="card-text"><h6><b>State : </b>'.$rows1['state'].'</h6></p>
<p class="card-text"><h6><b>Phone : </b>'.$rows1['phone'].'</h6></p>
</div>';
echo '</div>';
echo '</div>';
}
?>
</div>
</div>
</section>
</div>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft= "0";
}
</script>
</body>
</html>