-
Notifications
You must be signed in to change notification settings - Fork 0
/
customer_order.php
129 lines (78 loc) · 2.52 KB
/
customer_order.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
<?php
//require "config/constants.php";
session_start();
if(!isset($_SESSION["uid"])){
header("location:index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Khan Store</title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<script src="js/jquery2.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="main.js"></script>
<style>
table tr td {padding:10px;}
</style>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a href="#" class="navbar-brand">Khan Store</a>
</div>
<ul class="nav navbar-nav">
<li><a href="index.php"><span class="glyphicon glyphicon-home"></span>Home</a></li>
<li><a href="index.php"><span class="glyphicon glyphicon-modal-window"></span>Product</a></li>
</ul>
</div>
</div>
<p><br/></p>
<p><br/></p>
<p><br/></p>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="panel panel-default">
<div class="panel-heading"></div>
<div class="panel-body">
<h1>Customer Order details</h1>
<hr/>
<?php
include_once("db.php");
$user_id = $_SESSION["uid"];
$orders_list = "SELECT o.order_id,o.user_id,o.product_id,o.qty,o.trx_id,o.p_status,p.product_title,p.product_price,p.product_image FROM orders o,products p WHERE o.user_id='$user_id' AND o.product_id=p.product_id";
$query = mysqli_query($con,$orders_list);
if (mysqli_num_rows($query) > 0) {
while ($row=mysqli_fetch_array($query)) {
?>
<div class="row">
<div class="col-md-6">
<img style="float:right;" src="product_images/<?php echo $row['product_image']; ?>" class="img-responsive img-thumbnail"/>
</div>
<div class="col-md-6">
<table>
<tr><td>Product Name</td><td><b><?php echo $row["product_title"]; ?></b> </td></tr>
<tr><td>Product Price</td><td><b><?php echo CURRENCY." ".$row["product_price"]; ?></b></td></tr>
<tr><td>Quantity</td><td><b><?php echo $row["qty"]; ?></b></td></tr>
<tr><td>Transaction Id</td><td><b><?php echo $row["trx_id"]; ?></b></td></tr>
</table>
</div>
</div>
<?php
}
}
?>
</div>
<div class="panel-footer"></div>
</div>
</div>
<div class="col-md-2"></div>
</div>
</div>
</body>
</html>