Before refactor

This commit is contained in:
2025-03-31 07:59:02 +00:00
parent 4385a13498
commit 07cb5d1419
2 changed files with 10 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
"Aircraft Type": "RV-8",
"Captain or PIC Name": "The Lord Rotherwick",
"Arriving From": "at Lodge",
"ETA": "15\/03\/2025 17:22",
"ETA": "17\/03\/2025 17:22",
"POB Inbound": "1",
"Fuel Required": "None",
"Departing To": "Ranger\u2019s Lodge",
@@ -34,7 +34,7 @@
"name": "Arriving From"
},
"ca4ac44f-0388-4a70-a072-38276ed2ac13": {
"value": "16\/03\/2025 17:22",
"value": "31\/03\/2025 17:22",
"name": "ETA"
},
"6fc47c54-7383-48fd-93fc-d8080f5ed8f5": {
@@ -50,7 +50,7 @@
"name": "Departing To"
},
"53d60abd-eb75-4b1f-92b6-5d47d26367ec": {
"value": "20\/03\/2025 00:00",
"value": "31\/03\/2025 00:00",
"name": "ETD"
},
"d1ac0860-31f4-4914-9d0b-cae42dfc7eda": {

View File

@@ -205,11 +205,11 @@ function markAction(id, action, title, buttonText) {
}
function markDeparted(id) {
markAction(id, "departed", "Depart Aircraft at time", "Departed");
markAction(id, "departed", "Depart Aircraft at time (UTC)", "Departed");
}
function markLanded(id) {
markAction(id, "landed", "Land Aircraft at time", "Landed");
markAction(id, "landed", "Land Aircraft at time (UTC)", "Landed");
}
function markCancel(id) {
@@ -285,7 +285,11 @@ if ($result->num_rows > 0) {
foreach ($row as $key => $value) {
if ($key != 'notes' && $key != 'status' && $key != 'id' && $key != 'ac_call') {
if ($key == 'ac_reg' && $row['ac_call'] != NULL) {
echo '<td>' . htmlspecialchars($row['ac_call'] ?? '') . "<br><span class=acreg>" . $value . '</span></td>';
if (!empty($row['notes'])) {
echo '<td class="red-triangle" data-notes="' . htmlspecialchars($row['notes'] ?? '') . '">' . htmlspecialchars($row['ac_call'] ?? '') . "<br><span class=acreg>" . $value . '</span></td>';
} else {
echo '<td>' . htmlspecialchars($row['ac_call'] ?? '') . "<br><span class=acreg>" . $value . '</span></td>';
}
} else if ($key == 'ac_reg' && !empty($row['notes'])) {
echo '<td class="red-triangle" data-notes="' . htmlspecialchars($row['notes'] ?? '') . '">' . htmlspecialchars($value ?? '') . '</td>';
} else {