From 4385a1349843b01de32f892194aab1bade39b189 Mon Sep 17 00:00:00 2001 From: James Pattinson Date: Mon, 17 Mar 2025 20:41:13 +0000 Subject: [PATCH] revert 15b2d36bf643191f9a51e33a81b6be7e5afc2d7d revert Notes on main screen --- tower.php | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/tower.php b/tower.php index beca3c4..07884d9 100644 --- a/tower.php +++ b/tower.php @@ -140,6 +140,35 @@ require_db_auth(); cursor: pointer; } + /* Add this CSS for the red triangle */ + .red-triangle { + position: relative; + } + + .red-triangle::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 0; + height: 0; + border-left: 10px solid red; + border-bottom: 10px solid transparent; + } + + .red-triangle:hover::after { + content: attr(data-notes); + position: absolute; + top: 20px; + left: 0; + background: #fff; + border: 1px solid #ddd; + padding: 5px; + border-radius: 5px; + white-space: nowrap; + z-index: 10; + } + @@ -211,7 +240,7 @@ function openDetail(id) { --> -
Inbound PPR
+
Inbound Aircraft
connect_error) { } // Define your SQL query -$sql = "SELECT id, status, ac_reg, ac_type, ac_call, TIME_FORMAT(eta,'%H:%i') AS ETA, fuel, in_from, pob_in FROM submitted WHERE DATE(eta) = CURDATE() AND (status = 'NEW' OR status = 'CANCELED') ORDER BY eta ASC;"; // Replace with your table name +$sql = "SELECT id, status, ac_reg, ac_type, ac_call, TIME_FORMAT(eta,'%H:%i') AS ETA, fuel, in_from, pob_in, notes FROM submitted WHERE DATE(eta) = CURDATE() AND (status = 'NEW' OR status = 'CANCELED') ORDER BY eta ASC;"; // Replace with your table name // Execute the query $result = $conn->query($sql); @@ -239,7 +268,7 @@ if ($result->num_rows > 0) { // Output table headers (assuming column names are known) $fields = $result->fetch_fields(); foreach ($fields as $field) { - if ($field->name != 'status' && $field->name != 'id' && $field->name != 'ac_call') { + if ($field->name != 'notes' && $field->name != 'status' && $field->name != 'id' && $field->name != 'ac_call') { echo '' . htmlspecialchars($field->name ?? '') . ''; } @@ -254,12 +283,14 @@ if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo ''; foreach ($row as $key => $value) { - if ($key != 'status' && $key != 'id' && $key != 'ac_call') { + if ($key != 'notes' && $key != 'status' && $key != 'id' && $key != 'ac_call') { if ($key == 'ac_reg' && $row['ac_call'] != NULL) { echo '' . htmlspecialchars($row['ac_call'] ?? '') . "
" . $value . ''; + } else if ($key == 'ac_reg' && !empty($row['notes'])) { + echo '' . htmlspecialchars($value ?? '') . ''; } else { echo '' . htmlspecialchars($value ?? '') . ''; - } + } } } echo ''; @@ -273,14 +304,14 @@ if ($result->num_rows > 0) { ?> -
Booking Out
+
Visiting Aircraft
query($sql); @@ -295,7 +326,7 @@ if ($result->num_rows > 0) { // Output table headers (assuming column names are known) $fields = $result->fetch_fields(); foreach ($fields as $field) { - if ($field->name != 'status' && $field->name != 'id' && $field->name != 'ac_call') { + if ($field->name != 'notes' && $field->name != 'status' && $field->name != 'id' && $field->name != 'ac_call') { echo '' . htmlspecialchars($field->name ?? '') . ''; } @@ -310,12 +341,14 @@ if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { echo ''; foreach ($row as $key => $value) { - if ($key != 'status' && $key != 'id' && $key != 'ac_call') { + if ($key != 'notes' && $key != 'status' && $key != 'id' && $key != 'ac_call') { if ($key == 'ac_reg' && $row['ac_call'] != NULL) { echo '' . htmlspecialchars($row['ac_call'] ?? '') . "
" . $value . ''; + } else if ($key == 'ac_reg' && !empty($row['notes'])) { + echo '' . htmlspecialchars($value ?? '') . ''; } else { echo '' . htmlspecialchars($value ?? '') . ''; - } + } } } echo '';