-
Notifications
You must be signed in to change notification settings - Fork 0
/
Order_details.php
111 lines (84 loc) · 3.04 KB
/
Order_details.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
<?php
include("connection.php");
include("Inc_admin_dash.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>View Categories</title>
<!--Font Awesome and online Links --->
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<!--style1 css--->
<link rel="stylesheet" href="dash_css/style1.css">
<!--End Here--->
<body>
<div id="page-wrapper" class="gray-bg dashbard-1">
<div class="content-main">
<!--banner-->
<div class="banner">
<h2>
<a href="index.php">Home</a>
<i class="fa fa-angle-right"></i>
<span>Order Details</span>
</h2>
</div>
<!-- here -->
<div class="container">
<div class="row">
<div class="col-md-9 col-sm-10">
<h2 class="text-center" style="padding-top:20px;">Total Orders</h2>
<div class="table-responsive">
<table method="post" id="mytable" class="table table-bordred table-striped">
<thead>
<th>Product Id</th>
<th>Username</th>
<th>Product Name</th>
<th>Image</th>
<th>Quantity</th>
<th>Price</th>
<th>Order Time</th>
</thead>
<tbody>
<tr>
<!--PHP Code -->
<?php
$username = $_SESSION['user'];
$query = "select * from order_info ";
$run = mysqli_query($con,$query);
while($row = mysqli_fetch_array($run))
{
echo "
<tr>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td><img src='images/".$row['p_img']."' style='height:50px; width:50px;'></td>
<td>$row[5]</td>
<td>$row[6]</td>
<td>$row[7]</td>
</tr>
";
}
$username = $_SESSION['user'];
$query = "select SUM(total_amount) from order_info ";
$run = mysqli_query($con,$query);
while ($row = mysqli_fetch_array($run))
{
echo
"
<td align='center' colspan='6'><strong> Your Total Amount is:</strong></td>
<td><strong>Rs.".$row['SUM(total_amount)']."</strong></td>
";
}
?>
<!-- End Here -->
</tbody>
</table>
<div class="text-center" style="float:right; margin-right:10px; margin-top:10px;">
<button onclick="window.print();" class="btn btn-danger" id="print-btn">Print</button>
</div>
</body>
</html>