Compare commits

...

2 Commits

Author SHA1 Message Date
82f2c5c16c Tidy 2025-03-15 18:18:05 +00:00
11a1bf464b General tidy and image move 2025-03-15 18:17:21 +00:00
13 changed files with 59 additions and 59 deletions

View File

@@ -281,21 +281,21 @@ function opDetail() {
$row = $result->fetch_assoc(); $row = $result->fetch_assoc();
echo '<div class="container">'; echo '<div class="container">';
echo '<table class="details">'; echo '<table class="details">';
echo '<tr><th>Aircraft Reg:</th><td></td><td>' . $row['ac_reg'] . '</td></tr>'; echo '<tr><th>Aircraft Reg</th><td></td><td>' . $row['ac_reg'] . '</td></tr>';
echo '<tr><th>Aircraft Type:</th><td></td><td>' . $row['ac_type'] . '</td></tr>'; echo '<tr><th>Aircraft Type</th><td></td><td>' . $row['ac_type'] . '</td></tr>';
echo '<tr><th>Callsign:</th><td></td><td>' . $row['ac_call'] . '</td></tr>'; echo '<tr><th>Callsign</th><td></td><td>' . $row['ac_call'] . '</td></tr>';
echo '<tr><th>Captain\'s Name:</th><td></td><td>' . $row['captain'] . '</td></tr>'; echo '<tr><th>Captain</th><td></td><td>' . $row['captain'] . '</td></tr>';
echo '<tr><th>Arriving From:</th><td><button class="edit-button" onclick="editField(this)"><img src="edit.png" alt="Edit"></button></td><td><span class="editable" data-column="in_from">' . $row['in_from'] . '</span></td></tr>'; echo '<tr><th>Arriving From:</th><td><button class="edit-button" onclick="editField(this)"><img src="assets/edit.png" alt="Edit"></button></td><td><span class="editable" data-column="in_from">' . $row['in_from'] . '</span></td></tr>';
echo '<tr><th>POB IN:</th><td></td><td>' . $row['pob_in'] . '</td></tr>'; echo '<tr><th>POB IN</th><td><button class="edit-button" onclick="editField(this)"><img src="assets/edit.png" alt="Edit"></button></td><td><input type="number" class="editable" data-column="pob_in" value="' . $row['pob_in'] . '" readonly></td></tr>';
echo '<tr><th>ETA:</th><td><button class="edit-button" onclick="editField(this)"><img src="edit.png" alt="Edit"></button></td><td><input type="datetime-local" class="editable" data-column="eta" value="' . date('Y-m-d\TH:i', strtotime($row['eta'])) . '" readonly></td></tr>'; echo '<tr><th>ETA</th><td><button class="edit-button" onclick="editField(this)"><img src="assets/edit.png" alt="Edit"></button></td><td><input type="datetime-local" class="editable" data-column="eta" value="' . date('Y-m-d\TH:i', strtotime($row['eta'])) . '" readonly></td></tr>';
echo '<tr><th>Fuel Required:</th><td></td><td>' . $row['fuel'] . '</td></tr>'; echo '<tr><th>Fuel</th><td></td><td>' . $row['fuel'] . '</td></tr>';
echo '<tr><th>POB OUT:</th><td><button class="edit-button" onclick="editField(this)"><img src="edit.png" alt="Edit"></button></td><td><input type="number" class="editable" data-column="pob_out" value="' . $row['pob_out'] . '" readonly></td></tr>'; echo '<tr><th>POB OUT</th><td><button class="edit-button" onclick="editField(this)"><img src="assets/edit.png" alt="Edit"></button></td><td><input type="number" class="editable" data-column="pob_out" value="' . $row['pob_out'] . '" readonly></td></tr>';
echo '<tr><th>Outbound To:</th><td><button class="edit-button" onclick="editField(this)"><img src="edit.png" alt="Edit"></button></td><td><span class="editable" data-column="out_to">' . $row['out_to'] . '</span></td></tr>'; echo '<tr><th>Outbound To</th><td><button class="edit-button" onclick="editField(this)"><img src="assets/edit.png" alt="Edit"></button></td><td><span class="editable" data-column="out_to">' . $row['out_to'] . '</span></td></tr>';
echo '<tr><th>ETD:</th><td><button class="edit-button" onclick="editField(this)"><img src="edit.png" alt="Edit"></button></td><td><input type="datetime-local" class="editable" data-column="etd" value="' . date('Y-m-d\TH:i', strtotime($row['etd'])) . '" readonly></td></tr>'; echo '<tr><th>ETD</th><td><button class="edit-button" onclick="editField(this)"><img src="assets/edit.png" alt="Edit"></button></td><td><input type="datetime-local" class="editable" data-column="etd" value="' . date('Y-m-d\TH:i', strtotime($row['etd'])) . '" readonly></td></tr>';
echo '<tr><th>Email Address:</th><td></td><td>' . $row['email'] . '</td></tr>'; echo '<tr><th>Email Address</th><td></td><td>' . $row['email'] . '</td></tr>';
echo '<tr><th>Phone:</th><td></td><td>' . $row['phone'] . '</td></tr>'; echo '<tr><th>Phone</th><td></td><td>' . $row['phone'] . '</td></tr>';
echo '<tr><th>Notes:</th><td></td><td>' . $row['notes'] . '</td></tr>'; echo '<tr><th>Notes</th><td></td><td>' . $row['notes'] . '</td></tr>';
echo '<tr><th>PPR created at:</th><td></td><td>' . $row['submitted_dt'] . ' by ' . $row['created_by'] . '</td></tr>'; echo '<tr><th>PPR created</th><td></td><td>' . $row['submitted_dt'] . ' by ' . $row['created_by'] . '</td></tr>';
echo '</table>'; echo '</table>';
// Fetch journal entries // Fetch journal entries

View File

@@ -235,7 +235,7 @@ if ($result->num_rows > 0) {
echo '<td>' . htmlspecialchars($value ?? '') . '</td>'; echo '<td>' . htmlspecialchars($value ?? '') . '</td>';
} }
} }
// echo '<td><img src="cancel-icon.webp" title="Cancel PPR" style="width: 25px; height: auto;" onclick="markCancel(' . $row['id'] . ')"><img src="cancel-icon.webp" title="DELETE PPR" style="width: 25px; height: auto;" onclick="deletePpr(' . $row['id'] . ')"><img src="land.webp" title="Mark Landed" style="width: 30px; height: auto;" onclick="markLanded(' . $row['id'] . ')"></td>'; echo '<td><img src="assets/cancel-icon.webp" title="Cancel PPR" style="width: 25px; height: auto;" onclick="markCancel(' . $row['id'] . ')"><img src="assets/cancel-icon.webp" title="DELETE PPR" style="width: 25px; height: auto;" onclick="deletePpr(' . $row['id'] . ')"><img src="assets/land.webp" title="Mark Landed" style="width: 30px; height: auto;" onclick="markLanded(' . $row['id'] . ')"></td>';
echo '</tr>'; echo '</tr>';
} }

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/egfh.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -172,8 +172,10 @@ function generatePprEmail($entryId, $email, $ac_reg) {
$mail->isHTML(true); $mail->isHTML(true);
$mail->Subject = "PPR Confirmation for " . $ac_reg; $mail->Subject = "PPR Confirmation for " . $ac_reg;
$mail->Body = " $mail->Body = "
<p>This is to confirm we have received your PPR. To view or cancel your PPR please click the button:</p>
<p>Dear Pilot,<p>This is to confirm we have received your PPR information, and we look forward to welcoming you at Swansea Airport.<p>Please review our <a href=https://swansea-airport.wales/pilot-information/arrival-procedures.html>arrival procedures</a> prior to your arrival.<p>To view or cancel your PPR please click the button:</p>
<a href='$secureLink' style='display: inline-block; padding: 10px 20px; color: white; background-color: #007bff; text-decoration: none; border-radius: 5px;'>View PPR</a> <a href='$secureLink' style='display: inline-block; padding: 10px 20px; color: white; background-color: #007bff; text-decoration: none; border-radius: 5px;'>View PPR</a>
<p><img src='https://ppr.swansea-airport.wales/dev/assets/egfh.webp' alt='Swansea Airport' style='width: 200px;'>
"; ";
$mail->send(); $mail->send();

View File

@@ -137,24 +137,24 @@
<form action="newppr.php" method="POST"> <form action="newppr.php" method="POST">
<div class="form-group"> <div class="form-group">
<label for="ac_reg">Registration</label> <label for="ac_reg">Registration</label>
<input type="text" id="ac_reg" name="ac_reg" onkeyup="fetchResults()" required> <input type="text" id="ac_reg" name="ac_reg" onkeyup="fetchResults()" required maxlength="16">
</div> </div>
<div id="results"></div> <div id="results"></div>
<div class="form-group"> <div class="form-group">
<label for="ac_type">Type</label> <label for="ac_type">Type</label>
<input type="text" id="ac_type" name="ac_type" required> <input type="text" id="ac_type" name="ac_type" required maxlength="16">
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="optional-label" for="ac_call">Callsign (optional)</label> <label class="optional-label" for="ac_call">Callsign (optional)</label>
<input type="text" id="ac_call" name="ac_call"> <input type="text" id="ac_call" name="ac_call" maxlength="16">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="captain">Captain's Name</label> <label for="captain">Captain's Name</label>
<input type="text" id="captain" name="captain" required> <input type="text" id="captain" name="captain" required maxlength="64">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="in_from">Arriving From</label> <label for="in_from">Arriving From</label>
<input type="text" id="in_from" name="in_from" required> <input type="text" id="in_from" name="in_from" required maxlength="64">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="pob_in">POB Inbound</label> <label for="pob_in">POB Inbound</label>
@@ -166,7 +166,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="out_to">Out to</label> <label for="out_to">Out to</label>
<input type="text" id="out_to" name="out_to"> <input type="text" id="out_to" name="out_to" maxlength="64">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="pob_out">POB Outbound</label> <label for="pob_out">POB Outbound</label>
@@ -188,11 +188,11 @@
<div class="form-group"> <div class="form-group">
<label class="optional-label" for="email">Email (optional)</label> <label class="optional-label" for="email">Email (optional)</label>
<input type="email" id="email" name="email" > <input type="email" id="email" name="email" maxlength="128">
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="optional-label" for="phone">Phone (optional)</label> <label class="optional-label" for="phone">Phone (optional)</label>
<input type="text" id="phone" name="phone" > <input type="text" id="phone" name="phone" maxlength="16">
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@@ -146,6 +146,9 @@ function opView($entryId) {
echo "<p><strong>Notes:</strong> " . $row['notes'] . "</p></div>"; echo "<p><strong>Notes:</strong> " . $row['notes'] . "</p></div>";
echo '<button onclick="confirmWithSweetAlert(\'pilotppr.php?op=cancel&token=' . urlencode($_GET['token']) . '\')">Cancel PPR</button>'; echo '<button onclick="confirmWithSweetAlert(\'pilotppr.php?op=cancel&token=' . urlencode($_GET['token']) . '\')">Cancel PPR</button>';
echo '<p>Dear Pilot,<p>This is to confirm we have received your PPR information, and we look forward to welcoming you at Swansea Airport.<p>Please review our <a href=https://swansea-airport.wales/pilot-information/arrival-procedures.html>arrival procedures</a> prior to your arrival.<p>To view or cancel your PPR please click the button:</p>';
echo '<a href="$secureLink" style="display: inline-block; padding: 10px 20px; color: white; background-color: #007bff; text-decoration: none; border-radius: 5px;">View PPR</a>';
echo '<p><img src="https://ppr.swansea-airport.wales/dev/assets/egfh.webp" alt="Swansea Airport" style="width: 200px;">';
} else { } else {
echo ""; echo "";

View File

@@ -1,65 +1,60 @@
{ {
"form_title": "PPR Request Form", "form_title": "DEV DEV DEV PPR Request Form",
"form_slug": "ppr-request-form-joclld", "form_slug": "ppr-request-form-joclld-1",
"submission": { "submission": {
"Aircraft Registration": "G-BJAJ", "Aircraft Registration": "G-LORD",
"Aircraft Type": "AA5", "Aircraft Type": "RV-8",
"Callsign": "TEST1", "Captain or PIC Name": "The Lord Rotherwick",
"Captain or PIC Name": "TESTY MCTESTFACE", "Arriving From": "at Lodge",
"Arriving From": "Wellesbourne", "ETA": "15\/03\/2025 17:22",
"ETA": "11\/02\/2025 14:33", "POB Inbound": "1",
"POB Inbound": "2", "Fuel Required": "None",
"Fuel Required": "100LL", "Departing To": "Ranger\u2019s Lodge",
"Departing To": "Pembrey", "ETD": "20\/03\/2025 00:00",
"ETD": "12\/02\/2025 00:00", "POB Outbound": "1",
"POB Outbound": "2",
"Email": "james@pattinson.org", "Email": "james@pattinson.org",
"Phone Number": "+441212121212", "Phone Number": "+44123123123",
"Additional Information": "Here are some notes man" "Additional Information": "I am resending my PPR as I didn\u2019t receive a confirmation from my PPR yesterday."
}, },
"data": { "data": {
"617dd0cd-2d17-4d7f-826b-5348afdb30b3": { "617dd0cd-2d17-4d7f-826b-5348afdb30b3": {
"value": "G-BJAJ", "value": "G-LORD",
"name": "Aircraft Registration" "name": "Aircraft Registration"
}, },
"148a55d8-5357-49a3-b9aa-2a5d4dc64173": { "148a55d8-5357-49a3-b9aa-2a5d4dc64173": {
"value": "AA5", "value": "RV-8",
"name": "Aircraft Type" "name": "Aircraft Type"
}, },
"52d7bc90-9d26-48a1-82db-b91b4ccd2f92": {
"value": "TEST1",
"name": "Callsign"
},
"49b2de0d-5bd6-4b0c-86dd-b18b85f8b8ff": { "49b2de0d-5bd6-4b0c-86dd-b18b85f8b8ff": {
"value": "TESTY MCTESTFACE", "value": "The Lord Rotherwick",
"name": "Captain or PIC Name" "name": "Captain or PIC Name"
}, },
"4b4f7ecd-f80c-4e86-a7ab-6fadb3220df8": { "4b4f7ecd-f80c-4e86-a7ab-6fadb3220df8": {
"value": "Wellesbourne", "value": "Private strip at Ranger\u2019s",
"name": "Arriving From" "name": "Arriving From"
}, },
"ca4ac44f-0388-4a70-a072-38276ed2ac13": { "ca4ac44f-0388-4a70-a072-38276ed2ac13": {
"value": "14\/03\/2025 14:33", "value": "15\/03\/2025 17:22",
"name": "ETA" "name": "ETA"
}, },
"6fc47c54-7383-48fd-93fc-d8080f5ed8f5": { "6fc47c54-7383-48fd-93fc-d8080f5ed8f5": {
"value": "2", "value": "1",
"name": "POB Inbound" "name": "POB Inbound"
}, },
"d153c8a5-8345-4e6a-abfd-cf8adcc06f2d": { "d153c8a5-8345-4e6a-abfd-cf8adcc06f2d": {
"value": "100LL", "value": "None",
"name": "Fuel Required" "name": "Fuel Required"
}, },
"ba95fd3f-1ec0-4553-95d3-a0b6a850738d": { "ba95fd3f-1ec0-4553-95d3-a0b6a850738d": {
"value": "Pembrey", "value": "Ranger\u2019s Lodge",
"name": "Departing To" "name": "Departing To"
}, },
"53d60abd-eb75-4b1f-92b6-5d47d26367ec": { "53d60abd-eb75-4b1f-92b6-5d47d26367ec": {
"value": "12\/02\/2025 00:00", "value": "20\/03\/2025 00:00",
"name": "ETD" "name": "ETD"
}, },
"d1ac0860-31f4-4914-9d0b-cae42dfc7eda": { "d1ac0860-31f4-4914-9d0b-cae42dfc7eda": {
"value": "2", "value": "1",
"name": "POB Outbound" "name": "POB Outbound"
}, },
"0198c86c-edd1-4aaf-93a1-d68f8fc8c365": { "0198c86c-edd1-4aaf-93a1-d68f8fc8c365": {
@@ -67,11 +62,11 @@
"name": "Email" "name": "Email"
}, },
"e40ebc2d-887b-42b3-931d-c981c76b0c20": { "e40ebc2d-887b-42b3-931d-c981c76b0c20": {
"value": "+441212121212", "value": "+44123123123",
"name": "Phone Number" "name": "Phone Number"
}, },
"73d26c2c-1d3d-44e2-82fc-3a1a2600c393": { "73d26c2c-1d3d-44e2-82fc-3a1a2600c393": {
"value": "Here are some notes man", "value": "I am resending my PPR as I didn\u2019t receive a confirmation from my PPR yesterday.",
"name": "Additional Information" "name": "Additional Information"
} }
}, },

View File

@@ -319,7 +319,7 @@ if ($result->num_rows > 0) {
} }
} }
} }
echo '<td><img src="cancel-icon.webp" title="Cancel PPR" style="width: 25px; height: auto;" onclick="markCancel(' . $row['id'] . ')"><img src="arrive.png" title="Land" style="width: 30px; height: auto;" onclick="markLanded(' . $row['id'] . ')"></td>'; echo '<td><img src="assets/cancel-icon.webp" title="Cancel PPR" style="width: 25px; height: auto;" onclick="markCancel(' . $row['id'] . ')"><img src="assets/arrive.png" title="Land" style="width: 30px; height: auto;" onclick="markLanded(' . $row['id'] . ')"></td>';
echo '</tr>'; echo '</tr>';
} }
@@ -375,7 +375,7 @@ if ($result->num_rows > 0) {
} }
} }
} }
echo '<td><img src="cancel-icon.webp" title="Cancel PPR" style="width: 25px; height: auto;" onclick="markCancel(' . $row['id'] . ')"><img src="depart.png" title="Depart" style="width: 30px; height: auto;" onclick="markDeparted(' . $row['id'] . ')"></td>'; echo '<td><img src="assets/cancel-icon.webp" title="Cancel PPR" style="width: 25px; height: auto;" onclick="markCancel(' . $row['id'] . ')"><img src="assets/depart.png" title="Depart" style="width: 30px; height: auto;" onclick="markDeparted(' . $row['id'] . ')"></td>';
echo '</tr>'; echo '</tr>';
} }