-
Notifications
You must be signed in to change notification settings - Fork 0
/
retailbuyproduct.php
147 lines (99 loc) · 3.48 KB
/
retailbuyproduct.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
<?php
ob_start();
include 'css/style.css';
include 'connection1.php';
include 'userheader.php';
$sql = "select * from addpdis";
$result = $conn->query($sql);
?>
<html>
<head>
<title>products RETAILER</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
.btn {
background-color: YELLOW;
border: none;
color: BLACK;
padding: 12px 16px;
font-size: 16px;
cursor: pointer;
}
/* Darker background on mouse-over */
.btn:hover {
background-color: GREEN;
}
.btn-square-md {
width: 50px !important;
max-width: 100% !important;
max-height: 100% !important;
height: 50px !important;
text-align: center;
padding: 0px;
font-size:19px;
}.material-icons.md-48 { font-size: 48px; }
</style>
</head>
<body>
<a href="userhome.php"><h3> <font color="#0000FF" > <i class="material-icons md-48" >arrow_circle_left</i></font></h3></a>
<div class="div-center">
<div class="div-center">
<div class="row">
<div class="col-md-12">
<table >
<tr>
<th> </th>
<th> </th>
<th> </th>
<th> </th>
<th> </th>
<th> </th>
</tr>
<tr >
<?php
if($result->num_rows > 0){
while($row=$result->fetch_assoc()){
?>
<td height="400" width="400"><?php echo '
<img src="data:image/jpeg;base64,'.base64_encode($row['filename']).'" style="width: 280px ;">
'; ?></td>
<td WIDTH="300"><b><?php echo strtoupper($row['name']); ?><br><br>
RS:<?php echo $row['price']; ?><br><br>
Description:<br></b><i><?php echo $row['description']; ?></i><BR> <br><B>
<?php if($row['stock']==0 )
{
echo '<p style="color:red;">NOSTOCK</p>';
}else{
echo '<p style="color:GREEN;">INSTOCK</p>';
}
?></b>
</td>
<td >
<div class="btn-">
<a href="cartshop.php?id=<?php echo $row['id']?>" onClick="return confirm('Are you sure you want to order this product')">
<button class="btn btn-sm btn-CIRCLE-md" ><i class="fa fa-shopping-cart"></i>ORDER </BUTTON>
</a>
</td>
</tr>
</div>
<?php
}
}
if(isset($_POST['delete'])){
$id = $_POST['delete'];
$sql2 = "delete from tbl_containment where id= '$id' ";
$result = $conn->query($sql2);
if($result){
header("Location:staff_view_containment.php");
echo 'Data Deleted';
}
}
?>
</table>
</div>
</body>
</html>