-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules_payments_accomodations.php
119 lines (109 loc) · 5.2 KB
/
modules_payments_accomodations.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
<?php
session_start();
require_once('config/config.php');
require_once('config/checklogin.php');
require_once('config/codeGen.php');
checklogin();
/* Delete Payment */
if (isset($_GET['delete'])) {
$delete = $_GET['delete'];
$adn = "DELETE FROM payments WHERE payment_id =?";
$stmt = $mysqli->prepare($adn);
$stmt->bind_param('s', $delete);
$stmt->execute();
$stmt->close();
if ($stmt) {
$success = "Deleted" && header("refresh:1; url=modules_payments_accomodations");
} else {
$err = "Please Try Again Later";
}
}
require_once('partials/head.php');
?>
<body class="theme-red">
<!-- Page Loader -->
<div class="page-loader-wrapper">
<?php require_once('partials/loader.php'); ?>
</div>
<!-- Overlay For Sidebars -->
<div class="overlay"></div>
<!-- Top Bar -->
<?php require_once('partials/navigation.php'); ?>
<!-- Left Sidebar -->
<?php require_once('partials/sidebar.php'); ?>
<!-- Add Staff Modal -->
<section class="content">
<div class="container-fluid">
<div class="block-header">
<div class="row">
<div class="col-lg-12 col-md-6 col-sm-7">
<h2>Payments - Guest Room Accomodations Payments</h2>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="dashboard">Dashboard</a></li>
<li class="breadcrumb-item"><a href="">Payments</a></li>
<li class="breadcrumb-item active">Accomodations</li>
</ul>
</div>
</div>
</div>
<hr>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover js-basic-example dataTable">
<thead>
<tr>
<th>Member Details</th>
<th>Room Details</th>
<th>Dates</th>
<th>Payment Details</th>
</tr>
</thead>
<tbody>
<?php
$ret = "SELECT * FROM payments p
INNER JOIN accomodations a ON a.accomodation_id = p.payment_service_paid_id
INNER JOIN users u ON p.payment_user_id = u.user_id
INNER JOIN rooms r ON r.room_id = a.accomodation_room_id
";
$stmt = $mysqli->prepare($ret);
$stmt->execute(); //ok
$res = $stmt->get_result();
while ($payments = $res->fetch_object()) {
?>
<tr>
<td>
<a href="modules_payments_accomodation?view=<?php echo $payments->payment_id; ?>&service=<?php echo $payments->payment_service_paid_id; ?>">
Name : <?php echo $payments->user_name; ?> <br>
Email : <?php echo $payments->user_email; ?> <br>
Phone : <?php echo $payments->user_phone; ?> <br>
</a>
</td>
<td>
Number: <?php echo $payments->room_number; ?><br>
Category: <?php echo $payments->room_type; ?><br>
Rate: Ksh <?php echo $payments->room_rate; ?>
</td>
<td>
Check In : <?php echo date('M, d Y', strtotime($payments->accomodation_check_indate)); ?><br>
Check Out: <?php echo date('M, d Y', strtotime($payments->accomodation_check_out_date)); ?><br>
</td>
<td>
Confirmation ID : <?php echo $payments->payment_confirmation_code; ?><br>
Amount Paid : Ksh <?php echo $payments->payment_amount; ?><br>
Date Paid: <?php echo date('M, d y g:ia', strtotime($payments->payment_created_at)); ?>
</td>
</tr>
<?php
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<!-- Scripts -->
<?php require_once('partials/scripts.php'); ?>
</body>
</html>