-
Notifications
You must be signed in to change notification settings - Fork 0
/
rentals.php
149 lines (140 loc) · 9.59 KB
/
rentals.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
<?php
include_once 'functions/authentication.php';
include_once 'functions/connection.php';
?>
<!DOCTYPE html>
<html data-bs-theme="light" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Dashboard - BHRMS</title>
<meta name="description" content="Boarding House Rental Management System">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&display=swap">
<link rel="stylesheet" href="assets/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="assets/css/Change-Password-floating-Label.css">
<link rel="stylesheet" href="assets/css/Navbar-Right-Links-icons.css">
<link rel="stylesheet" href="assets/css/Profile-with-data-and-skills.css">
</head>
<body id="page-top">
<div id="wrapper">
<div class="d-flex flex-column" id="content-wrapper" style="background: rgb(255,255,255);">
<nav class="navbar navbar-expand-lg shadow py-3 border mb-4 navbar-light">
<div class="container-fluid"><span class="bs-icon-md bs-icon-rounded bs-icon-semi-white border rounded-circle border-primary-subtle shadow-lg d-flex justify-content-center align-items-center me-2 bs-icon"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 16 16" class="bi bi-house-heart-fill">
<path d="M7.293 1.5a1 1 0 0 1 1.414 0L11 3.793V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v3.293l2.354 2.353a.5.5 0 0 1-.708.707L8 2.207 1.354 8.853a.5.5 0 1 1-.708-.707L7.293 1.5Z"></path>
<path d="m14 9.293-6-6-6 6V13.5A1.5 1.5 0 0 0 3.5 15h9a1.5 1.5 0 0 0 1.5-1.5V9.293Zm-6-.811c1.664-1.673 5.825 1.254 0 5.018-5.825-3.764-1.664-6.691 0-5.018Z"></path>
</svg></span><a class="navbar-brand d-flex align-items-center" href="/"><span> BHRMS</span></a><button data-bs-toggle="collapse" data-bs-target="#navcol-1" class="navbar-toggler"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navcol-1">
<ul class="navbar-nav mx-auto">
<li class="nav-item"><a class="nav-link" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-original-title="Here you can see your Dashboard." data-bs-placement="bottom" href="index.php" style="color:#393939;" title="Here you can see your Dashboard."><i class="fas fa-th-list"></i> Dashboard</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-original-title="Here you can see your Dashboard." data-bs-placement="bottom" href="boarders.php" style="color:#393939;" title="Here you can view and manage the boarders."><i class="fas fa-users"></i> Boarders</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-original-title="Here you can see your Dashboard." data-bs-placement="bottom" href="rooms.php" style="color:#393939;" title="Here you can view and manage the rooms."><i class="fas fa-home"></i> Rooms</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-original-title="Here you can see your Dashboard." data-bs-placement="bottom" href="rentals.php" style="color:#393939;" title="Here you can view and transact payments."><i class="fas fa-credit-card"></i> Rental</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-original-title="Here you can see your Sales & Transactions." data-bs-placement="bottom" href="reports.php" style="color:#393939;" title="Here you can view, export and print the sales reports."><i class="fas fa-chart-pie"></i> Reports</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-original-title="Here you can manage your account." data-bs-placement="bottom" href="account.php" style="color:#393939;" title="Here you can manage your account."><i class="fas fa-user-shield"></i> My Account</a></li>
</ul><a class="btn btn-light shadow" role="button" data-bs-original-title="Here you can logout your acccount." data-bs-placement="left" data-bs-toggle="tooltip" data-bss-tooltip="" href="functions/logout.php">logout</a>
</div>
</div>
</nav>
<div id="content">
<div class="container-fluid">
<div class="d-sm-flex justify-content-between align-items-center mb-4">
<h3 class="text-dark mb-0">Rentals - Under Maintenance</h3>
</div>
<div class="card shadow">
<div class="card-header py-3">
<p class="text-primary m-0 fw-bold">Rentals Lists</p>
</div>
<div class="card-body">
<div class="table-responsive table mt-2" id="dataTable-1" role="grid" aria-describedby="dataTable_info">
<table class="table my-0" id="dataTable">
<thead>
<tr>
<th>Boarders</th>
<th>Room</th>
<th>Rent</th>
<th>Total</th>
<th>Start date</th>
<th>Status</th>
<th>Days (Overdue)</th>
<th class="text-center">Options</th>
</tr>
</thead>
<tbody>
<?php include_once 'functions/views/rentals.php' ?>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div><a class="border rounded d-inline scroll-to-top" href="#page-top"><i class="fas fa-angle-up"></i></a>
</div>
<div class="modal fade" role="dialog" tabindex="-1" id="pay">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Payment</h4><button class="btn-close" type="button" aria-label="Close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<form action="functions/payment.php" method="post">
<input type="hidden" name="id">
<input type="hidden" name="room">
<input type="hidden" name="total">
<div class="form-floating mb-3"><input class="form-control form-control" type="number" placeholder="Amount" min="1" name="amount"><label class="form-label" for="floatingInput">Amount</label></div>
</form>
</div>
<div class="modal-footer"><button class="btn btn-primary" type="button">Save</button></div>
</div>
</div>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/bs-init.js"></script>
<script src="assets/js/jquery.dataTables.min.js"></script>
<script src="assets/js/dataTables.bootstrap5.min.js"></script>
<script src="assets/js/dataTables.buttons.min.js"></script>
<script src="assets/js/jszip.min.js"></script>
<script src="assets/js/pdfmake.min.js"></script>
<script src="assets/js/vfs_fonts.js"></script>
<script src="assets/js/buttons.html5.min.js"></script>
<script src="assets/js/buttons.print.min.js"></script>
<script src="assets/js/theme.js"></script>
<script src="assets/js/sweetalert.min.js"></script>
<script src="assets/js/main.js"></script>
<script>
$(document).ready(function() {
$('#dataTable').DataTable({
dom: 'Blfrtip',
buttons: [{
extend: 'excel',
className: 'btn btn-primary'
},
{
extend: 'pdf',
className: 'btn btn-primary'
},
{
extend: 'print',
className: 'btn btn-primary'
}
]
});
$('a[data-bs-target="#pay"]').on('click', function() {
var id = $(this).data('id');
var room = $(this).data('room');
var total = $(this).data('total');
console.log(id, total, room);
$('input[name="id"]').val(id);
$('input[name="room"]').val(room);
$('input[name="amount"]').val(total);
$('input[name="total"]').val(total);
});
});
</script>
</body>
</html>