-
Notifications
You must be signed in to change notification settings - Fork 0
/
order.php
105 lines (72 loc) · 2.66 KB
/
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php include 'inc/header.php'; ?>
<?php
$login = Session::get("cuslogin");
if ($login == false) {
header("Location:login.php");
}
?>
<style>
#tblone td{text-align: center;}
#tblone tr th{text-align: center; font-weight: bold;}
</style>
<div class="main">
<div class="content">
<div class="section group">
<div class="notfound">
<h2> <span>Tvoji detalji porudzbine</span> </h2>
<table class="table table-bordered table-hover" id="tblone">
<tr>
<th>Id</th>
<th>Knjiga</th>
<th>Slika</th>
<th>Kolicina</th>
<th>Ukupna cijena</th>
<th>Datum</th>
<th>Status</th>
<!-- <th>Akcija</th> -->
</tr>
<?php
$cmrId = Session::get("cmrId");
$getOrder = $ct->getOrderProduct($cmrId);
if ($getOrder) {
$i = 0;
while ($result = $getOrder->fetch_assoc()) {
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><a href="preview.php?proid=<?php echo $result['productId']; ?>"><?php echo $result['productName']; ?></td>
<td><img src="admin/pages/tables/<?php echo $result['image']; ?>" height="100px;" width="80px;" alt=""/></td>
<td> <?php echo $result['quantity']; ?></td>
<td>€
<?php
$total = $result['price'] * $result['quantity'];
echo $total;
?>
</td>
<td><?php echo $fm->formatDate($result['date']); ?></td>
<td>
<?php
if ($result['status'] == '0') { ?>
<span class="badge badge-warning">Na cekanju</span>
<?php }else { ?>
<span class="badge badge-success">Primljeno</span>
<?php }
?>
</td>
<?php /*
if ($result['status'] == '1') { ?>
<td><a onclick="return confirm('Da li ste sigurni?');" href=" ">X</a></td>
<?php }else { ?>
<td>Nema odgovora </td>
<?php } */ ?>
</tr>
<?php } } ?>
</table>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<?php include 'inc/footer.php'; ?>