-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathviewproduct.php
79 lines (65 loc) · 3.46 KB
/
viewproduct.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
<?php
include_once('config/connectdb.php');
session_start();
include_once('inc/header.php');
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
View Product.
<small>View Product Details.</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
<li class="active">Here</li>
</ol>
</section>
<!-- Main content -->
<section class="content container-fluid">
<!--------------------------
| Your Page Content Here |
-------------------------->
<div class="box box-primary">
<div class="box-header with-border">
<a href="productlist.php" class="btn btn-success btn-sm" role ="button"><span class="glyphicon glyphicon-align-justify" title="Product List"></span> Back to Products List</a>
</div>
<div class="box-body">
<?php
$id = $_GET['id'];
$select = $pdo->prepare(" SELECT * FROM tbl_product WHERE pid=".$id);
$select->execute();
while($record = $select->fetch(PDO::FETCH_OBJ)) {
echo'
<div class="col-md-6">
<p align="center" class="list-group-item list-group-item-info"><strong>Product Details</strong></p>
<ul class="list-group">
<li class="list-group-item">Product ID: <span class="label label-success pull-right">'.$record->pid.'</span></li>
<li class="list-group-item">Product Name: <span class="label label-success pull-right">'.$record->pname.'</span></li>
<li class="list-group-item">Product Model: <span class="label label-success pull-right">'.$record->pmodel.'</span></li>
<li class="list-group-item">Product Category: <span class="label label-success pull-right">'.$record->pcategory.'</span></li>
<li class="list-group-item">Sales Price: <span class="label label-success pull-right">'.$record->sales_price.'</span></li>
<li class="list-group-item">Purchase Price: <span class="label label-success pull-right">'.$record->purchase_price.'</span></li>
<li class="list-group-item">Expected Profit <span class="label label-success pull-right">'.($record->sales_price - $record->purchase_price ).'</span></li>
<li class="list-group-item">Stock in Hand: <span class="label label-success pull-right">'.$record->pstock.'</span></li>
<li class="list-group-item"><strong>Description:</strong> <span class="">'.$record->pdescription.'</span></li>
</ul>
</div>
<div class="col-md-6">
<p align="center" class="list-group-item list-group-item-info"><strong>Product Image</strong></p>
<ul class="list-group text-center">
<li class="list-group-item center"><img src="productimages/'.$record->pimage.'"class=img-responsive"></li>
</ul>
</div>
';
}
?>
</div>
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php
include_once('inc/footer.php');
?>