This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuser.refunds.php
166 lines (140 loc) · 5.94 KB
/
user.refunds.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
session_start();
include_once ('db_config.php');
if(isset($_SESSION['userID']) && !empty($_SESSION['userID']) && !($_SESSION['userID']=='0')) {
$user = "SELECT * FROM tbl_users WHERE `user_id` = '{$_SESSION['userID']}'";
$user_result = $db->query($user);
$user_row = $user_result->fetch_assoc();
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<!--JQuery Toast CSS-->
<link rel="stylesheet" type="text/css" href="css/jquery.toast.min.css">
<!--Custom Style CSS-->
<link rel="stylesheet" type="text/css" href="css/style.css?v=<?php echo time(); ?>">
<link rel="shortcut icon" type="image/png" href="images/icon.png">
<title>InstaMovies - <?php echo $user_row['first_name'];?> | Refunds</title>
<style>
.navbar {
background:black !important;
}
</style>
</head>
<body id="itemid-3">
<!--Navbar Code - Start-->
<?php include('header.php'); ?>
<!--Navbar Code - End-->
<div style="padding-top:85px;padding-bottom:25px;background-color:#ebebeb">
<div class="container mt-3" style="background:#FFF;padding-bottom:15px">
<div style="padding:15px"><h1 style="font-size: 35px;font-weight: normal;">Refunds</h1></div>
<div class="table-responsive" style="min-height:297px; padding:0 15px">
<table class="table table-striped table-bordered table-sm" id="refunds_table">
<thead style="text-align:center">
<tr>
<th>#</th>
<th>Transaction Time</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM tbl_refunds WHERE `user_id` = '{$_SESSION['userID']}' ORDER BY transaction_id DESC";
$result = $db->query($sql);
if($result->num_rows>0){
$i=0;
while($row=$result->fetch_assoc()){
$i++;
echo "<tr style='text-align:center'>";
echo "<td>{$i}</td>";
echo "<td>";
if($row['transaction_time'] != '0000-00-00 00:00:00'){
echo $row['transaction_time'];
}
echo "</td>";
echo "<td>Rs. ".number_format((float)$row['amount'], 2, '.', '')."</td>";
echo "<td>";
if($row['status'] == '0'){
echo "<span style='font-weight:bold;font-size:15px;color:red'>Pending</span>";
}else if($row['status'] == '1'){
echo "<span style='font-weight:bold;font-size:15px;color:green'>✓</span>";
}
echo "</td>";
echo "</tr>";
}
}else{
echo "<tr><td colspan='4' style='padding-left:7px'>No refunds available.</td></tr>";
}
?>
</tbody>
<tfoot style="text-align:center">
<tr>
<th>#</th>
<th>Transaction Time</th>
<th>Amount</th>
<th>Status</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<div class="modal fade" id="redeemModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content" style="background:white">
<div class="modal-header">
<h5 class="modal-title">Redeem Refund</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="outline:none">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form id="redeemForm">
<div class="form-group row">
<label class="col-sm-4 col-form-label">Account Type:</label>
<div class="col-sm-8">
<select class="form-control">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
<div class="form-group row" style="margin-bottom:0">
<label class="col-sm-4 col-form-label">Account Number:</label>
<div class="col-sm-8">
<input id="ticket_id" type="text" class="form-control" maxlength="15" style="text-transform:uppercase">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="confirm" type="button" class="btn btn-primary">Confirm</button>
</div>
</div>
</div>
</div>
<!--Footer Code - Start-->
<?php include('footer.php') ?>
<!--Footer Code - End-->
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js,then Owl_Carousel, then Bootstrap JS -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.toast.min.js"></script>
</body>
</html>
<?php
}else{
header('location: index.php');
}
?>