Dave's public board

This commit is contained in:
2025-04-07 16:27:01 +00:00
parent 391f057824
commit 94010fec01
7 changed files with 251 additions and 32 deletions

View File

@@ -25,56 +25,53 @@ include("functions.php");
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Swansea Daily PPR</title>
<style>
/* Styling for the table */
table {
width: 80%;
width: 90%;
border-collapse: collapse;
margin: 20px 0;
margin-left: auto; /* Automatically adjusts left margin */
margin-right: auto; /* Automatically adjusts right margin */
margin: 20px auto;
background-color: #000; /* Black background for digital display effect */
color: #0f0; /* Bright green text for digital display effect */
font-family: 'Courier New', Courier, monospace; /* Monospace font for digital look */
font-size: 18px;
text-align: center;
}
table, th, td {
border: 1px solid #ddd;
border: 1px solid #444; /* Subtle border for table cells */
}
th {
padding: 8px;
text-align: center;
padding: 10px;
background-color: #222; /* Darker background for headers */
color: #fff; /* White text for headers */
font-weight: bold;
text-transform: uppercase;
}
td {
padding: 8px;
text-align: center;
font-family: Arial, sans-serif;
font-size: 16pt;
}
th {
background-color: #f2f2f2;
padding: 10px;
}
tr:nth-child(even) {
background-color: #f9f9f9;
background-color: #111; /* Slightly lighter background for even rows */
}
tr:hover {
background-color: #f1f1f1;
background-color: #333; /* Highlight row on hover */
}
/* Highlight styles for fuel types */
.highlight100LL {
background-color: #ADD8E6 !important;
#font-weight: bold;
background-color: #0044cc !important; /* Blue for 100LL */
color: #fff !important; /* White text */
}
.highlightJET {
background-color: yellow !important; /* Allow it to override the odd/even shading */
#font-weight: bold;
}
.acreg {
padding: 4px;
text-align: center;
font-family: Arial, sans-serif;
font-size: 10pt;
font-style: italic;
background-color: #ffcc00 !important; /* Yellow for JET A1 */
color: #000 !important; /* Black text */
}
/* Styling for aircraft registration */
.acreg {
font-size: 14px;
font-style: italic;
color: #ccc; /* Light gray for subtle emphasis */
}
</style>
</head>
<body>

BIN
assets/WBCAFE.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
assets/flightImg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -16,7 +16,7 @@ $mailPort = 465;
$mailFromAddress = 'noreply@swansea-airport.wales';
$mailFromName = 'Swansea Airport';
$baseUrl = "https://ppr.swansea-airport.wales/dev";
$baseUrl = "https://pprdev.swansea-airport.wales";
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
@@ -150,7 +150,7 @@ function generatePprEmail($entryId, $email, $ac_reg) {
global $conn, $mailHost, $mailSMTPAuth, $mailUsername, $mailPassword, $mailPort, $baseUrl, $mailFromAddress, $mailFromName;
if (!class_exists('PHPMailer\PHPMailer\PHPMailer')) {
require '../vendor/autoload.php';
require 'vendor/autoload.php';
}
$token = generateSecureToken($email, $entryId);

106
public.css Normal file
View File

@@ -0,0 +1,106 @@
/* Overall page styling */
body {
margin: 0;
font-family: Arial, sans-serif;
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr;
height: 100vh;
font-size: 30px; /* Increased font size */
}
/* Header styles */
header {
background-color: #333;
color: white;
padding: 20px;
text-align: center;
img.left-image {
position: absolute;
top: 0;
left: 0;
height: auto;
}
img.right-image {
position: absolute;
top: 0;
right: 0;
width: 9%;
height: auto;
}
}
/* Main section styles */
main {
display: grid;
grid-template-columns: 1fr 1fr; /* Two equal-width columns */
gap: 20px;
padding: 20px;
overflow-y: auto;
}
/* Table styles */
table {
width: 100%;
border-collapse: collapse;
margin: 0;
border: 1px solid #ccc;
}
th, td {
padding: 12px;
text-align: left;
border: 1px solid #ccc;
}
th {
background-color: #f4f4f4;
}
tr:nth-child(even) {
background-color: #d3d3d3;
}
/* Footer styles */
footer {
background-color: #333;
color: white;
text-align: center;
padding: 10px 0;
position: relative;
overflow: hidden;
}
/* Marquee container */
.marquee {
display: inline-block;
white-space: nowrap;
padding-right: 100%; /* This makes the text start out of view */
animation: scroll-left 20s linear infinte;
}
/* Keyframes for scrolling animation */
@keyframes scroll-left {
from {
transform: translateX(100%);
}
to {
transform: translateX(-100%);
}
}
/* Marquee text styling */
.marquee-text {
font-size: 18px;
font-weight: bold;
color: #f4f4f4;
padding-left: 50px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
/* Responsive adjustments */
@media (max-width: 768px) {
main {
grid-template-columns: 1fr; /* Stack columns on smaller screens */
}
}

116
public.php Normal file
View File

@@ -0,0 +1,116 @@
<?php
include("functions.php");
// Create connection
$conn = connectDb();
// Fetch arrivals for today's date with status 'NEW'
$arrivalsSql = "SELECT ac_reg, ac_type, in_from, TIME_FORMAT(eta, '%H:%i') AS due
FROM submitted
WHERE DATE(eta) = CURDATE() AND status = 'NEW'
ORDER BY eta ASC";
$arrivalsResult = $conn->query($arrivalsSql);
// Fetch departures for today's date with status 'LANDED'
$departuresSql = "SELECT ac_reg, ac_type, out_to, TIME_FORMAT(etd, '%H:%i') AS due
FROM submitted
WHERE DATE(etd) = CURDATE() AND status = 'LANDED'
ORDER BY etd ASC";
$departuresResult = $conn->query($departuresSql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="300">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Swansea Airport - Arrivals & Departures</title>
<link rel="stylesheet" href="public.css">
</head>
<body>
<header>
<img src="assets/logo.png" alt="EGFH Logo" class="left-image">
<h1>Arrivals/Departures Information</h1>
<img src="assets/flightImg.png" alt="EGFH Logo" class="right-image">
</header>
<main>
<!-- Left column with arrivals table -->
<div>
<h2><center>Arrivals</center></h2>
<table>
<thead>
<tr>
<th>Registration</th>
<th>Aircraft Type</th>
<th>From</th>
<th>Due</th>
</tr>
</thead>
<tbody>
<?php if ($arrivalsResult->num_rows > 0): ?>
<?php while ($row = $arrivalsResult->fetch_assoc()): ?>
<tr>
<td><?= htmlspecialchars($row['ac_reg']) ?></td>
<td><?= htmlspecialchars($row['ac_type']) ?></td>
<td><?= htmlspecialchars($row['in_from']) ?></td>
<td><?= htmlspecialchars($row['due']) ?></td>
</tr>
<?php endwhile; ?>
<?php else: ?>
<tr>
<td colspan="4">No arrivals found.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<!-- Right column with departures table -->
<div>
<h2><center>Departures</center></h2>
<table>
<thead>
<tr>
<th>Registration</th>
<th>Aircraft Type</th>
<th>To</th>
<th>Due</th>
</tr>
</thead>
<tbody>
<?php if ($departuresResult->num_rows > 0): ?>
<?php while ($row = $departuresResult->fetch_assoc()): ?>
<tr>
<td><?= htmlspecialchars($row['ac_reg']) ?></td>
<td><?= htmlspecialchars($row['ac_type']) ?></td>
<td><?= htmlspecialchars($row['out_to']) ?></td>
<td><?= htmlspecialchars($row['due']) ?></td>
</tr>
<?php endwhile; ?>
<?php else: ?>
<tr>
<td colspan="4">No departures found.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</main>
<footer>
<!-- Footer content -->
<div class="iso-marquee-linkwrap">
<div class="iso-marquee--long iso-marquee">
<!-- Add marquee content here -->
</div>
</div>
</footer>
</body>
</html>
<?php
// Close the database connection
$conn->close();
?>