General tidy
This commit is contained in:
15
pilotppr.php
15
pilotppr.php
@@ -7,7 +7,7 @@ include("functions.php");
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Row Details</title>
|
||||
<title>Swansea PPR Details</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
@@ -78,6 +78,10 @@ include("functions.php");
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container" id="message">
|
||||
These details have been submitted as your PPR. We look forward to seeing you at Swansea Airport!<p>To cancel your PPR, use the button below. It is currently not possible to make any changes here, but please feel free to cancel if you need to and create a new PPR.
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
if (isset($_GET['token'])) {
|
||||
@@ -110,8 +114,7 @@ function opCancel($entryId) {
|
||||
$result = $conn->query($sql);
|
||||
logJournal($conn, $entryId, "Marked Canceled by Pilot");
|
||||
$conn->close();
|
||||
echo "<p>Your PPR has been canceled. Thank you for letting us know!</p>";
|
||||
|
||||
echo'<script>document.getElementById("message").innerHTML = "Your PPR has been canceled. Thank you for letting us know!";</script>';
|
||||
}
|
||||
|
||||
function opView($entryId) {
|
||||
@@ -145,7 +148,8 @@ function opView($entryId) {
|
||||
echo '<button onclick="confirmWithSweetAlert(\'pilotppr.php?op=cancel&token=' . urlencode($_GET['token']) . '\')">Cancel PPR</button>';
|
||||
|
||||
} else {
|
||||
echo "<p>No details found for the given ID. This could mean the PPR has been canceled already.</p>";
|
||||
echo "";
|
||||
echo'<script>document.getElementById("message").innerHTML = "No details found for the given ID. This could mean the PPR has been canceled already.";</script>';
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
@@ -166,7 +170,8 @@ function confirmWithSweetAlert(url) {
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
confirmButtonText: "Cancel PPR"
|
||||
confirmButtonText: "Cancel PPR",
|
||||
cancelButtonText: "Keep PPR"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = url;
|
||||
|
||||
Reference in New Issue
Block a user