-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProductManagement.php
69 lines (60 loc) · 1.36 KB
/
ProductManagement.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
<?php
session_start();
include "ProductDetails.php";
$home = new ProductDetails();
$result = $home->homepage();
?>
<html>
<head>
</head>
<style>
table,th,td {
border: 1px solid black;
line-height:45px;
}
</style>
<table>
<th>Id</th>
<th>User Id</th>
<th>Product Type</th>
<th>Product Name</th>
<th>Vendor</th>
<th>Stock</th>
<th>Product Price</th>
<th>image</th>
<th>Best Deals</th>
<?php
foreach ($result as $data) {
?>
<?php
$images = explode(",", $data->getImage());
$deals = explode(",", $data->getBestDeals());
?>
<tr>
<td> <?php echo $data->getId();?> </td>
<td> <?php echo $data->getUserId(); ?> </td>
<td> <?php echo $data->getProductType(); ?> </td>
<td> <?php echo $data->getProductName(); ?> </td>
<td> <?php echo $data->getVendor(); ?> </td>
<td> <?php echo $data->getStock(); ?> </td>
<td> <?php echo $data->getProductPrice(); ?> </td>
<td>
<?php
foreach($images as $image){
echo"<img src='uploads/$image' width ='100px' height = '100px'>";
}
?>
</td>
<td>
<?php
foreach($deals as $best){
echo"<img src='uploads/$best' width ='80px' height ='100px'>";
}
?>
</td>
</tr>
<?php
}
?>
</table>
</html>