-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrentalReport.php
61 lines (61 loc) · 2.52 KB
/
rentalReport.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
<!--
Author: Mark Kelly
Date: 03/03/2016
File Name: rentalReport.php
Purpose: To allow user to view a report on rentals
-->
<?php
include 'header.php';
?>
<form class="form" id="rentalReport">
<h2>Rental Report</h2>
<table class="tableHead"> <!-- Table head is outside tableScroll div to remain fixed --->
<tr>
<th id="companyName">Company Name</th>
<th id="dateOfRental">Date of Rental</th>
<th id="durationOfRental">Duration of Rental</th>
<th id="costOfRental">Cost of Rental</th>
</tr>
</table>
<?php
include 'doRentalReport.php';
?>
<!-- Company contact informaton fieldset --->
<fieldset disabled>
<legend>Contact Information</legend>
<label for="compName">Name</label>
<input name="compName" id="compName" type="text">
<label for="compAdd">Address</label>
<textarea name="compAdd" id="compAdd" type="text"></textarea>
<label for="compPhone">Phone Number</label>
<input name="compPhone" id="compPhone" type="text">
</fieldset>
<!-- Company account informaton fieldset --->
<fieldset class="fieldsetRight" disabled>
<legend>Account Information</legend>
<label for="currentBalance" >Balance</label>
<input name="currentBalance" id="currentBalance" type="text">
<label for="creditLimit" >Credit Limit</label>
<input name="creditLimit" id="creditLimit" type="text">
<label for="numberOfRentals" >Number of Rentals</label>
<input name="numberOfRentals" id="numberOfRentals" type="text">
<label for="timesOnBlacklist" >Number of Times Blacklisted</label>
<input name="timesOnBlacklist" id="timesOnBlacklist" type="text">
</fieldset><br>
</form>
<script>
// Gets the company details when the "Client Info" button is clicked
function getCompanyDetails(clientInfo) {
var companyDetails = clientInfo.split(',');
document.getElementById("compName").value = companyDetails[0];
document.getElementById("compAdd").value = companyDetails[1] + ",\n" + companyDetails[2] + ",\n" + companyDetails[3] + ".";
document.getElementById("compPhone").value = companyDetails[4];
document.getElementById("currentBalance").value = "\u20AC" + companyDetails[5]; // u20AC = Unicode value for Euro symbol
document.getElementById("creditLimit").value = "\u20AC" + companyDetails[6]; // u20AC = Unicode value for Euro symbol
document.getElementById("timesOnBlacklist").value = companyDetails[7];
document.getElementById("numberOfRentals").value = companyDetails[8];
} // end getCompanyDetails
</script>
<?php
include 'footer.php';
?>