Dave's public board
This commit is contained in:
57
arrivals.php
57
arrivals.php
@@ -25,56 +25,53 @@ include("functions.php");
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Swansea Daily PPR</title>
|
<title>Swansea Daily PPR</title>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
/* Styling for the table */
|
/* Styling for the table */
|
||||||
table {
|
table {
|
||||||
width: 80%;
|
width: 90%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin: 20px 0;
|
margin: 20px auto;
|
||||||
margin-left: auto; /* Automatically adjusts left margin */
|
background-color: #000; /* Black background for digital display effect */
|
||||||
margin-right: auto; /* Automatically adjusts right margin */
|
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 {
|
table, th, td {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #444; /* Subtle border for table cells */
|
||||||
}
|
}
|
||||||
th {
|
th {
|
||||||
padding: 8px;
|
padding: 10px;
|
||||||
text-align: center;
|
background-color: #222; /* Darker background for headers */
|
||||||
|
color: #fff; /* White text for headers */
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
td {
|
td {
|
||||||
padding: 8px;
|
padding: 10px;
|
||||||
text-align: center;
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
font-size: 16pt;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
}
|
||||||
tr:nth-child(even) {
|
tr:nth-child(even) {
|
||||||
background-color: #f9f9f9;
|
background-color: #111; /* Slightly lighter background for even rows */
|
||||||
}
|
}
|
||||||
tr:hover {
|
tr:hover {
|
||||||
background-color: #f1f1f1;
|
background-color: #333; /* Highlight row on hover */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Highlight styles for fuel types */
|
||||||
.highlight100LL {
|
.highlight100LL {
|
||||||
background-color: #ADD8E6 !important;
|
background-color: #0044cc !important; /* Blue for 100LL */
|
||||||
#font-weight: bold;
|
color: #fff !important; /* White text */
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlightJET {
|
.highlightJET {
|
||||||
background-color: yellow !important; /* Allow it to override the odd/even shading */
|
background-color: #ffcc00 !important; /* Yellow for JET A1 */
|
||||||
#font-weight: bold;
|
color: #000 !important; /* Black text */
|
||||||
}
|
|
||||||
.acreg {
|
|
||||||
padding: 4px;
|
|
||||||
text-align: center;
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
font-size: 10pt;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Styling for aircraft registration */
|
||||||
|
.acreg {
|
||||||
|
font-size: 14px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #ccc; /* Light gray for subtle emphasis */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
BIN
assets/WBCAFE.jpg
Normal file
BIN
assets/WBCAFE.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
assets/flightImg.png
Normal file
BIN
assets/flightImg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
assets/logo.png
Normal file
BIN
assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -16,7 +16,7 @@ $mailPort = 465;
|
|||||||
$mailFromAddress = 'noreply@swansea-airport.wales';
|
$mailFromAddress = 'noreply@swansea-airport.wales';
|
||||||
$mailFromName = 'Swansea Airport';
|
$mailFromName = 'Swansea Airport';
|
||||||
|
|
||||||
$baseUrl = "https://ppr.swansea-airport.wales/dev";
|
$baseUrl = "https://pprdev.swansea-airport.wales";
|
||||||
|
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use PHPMailer\PHPMailer\Exception;
|
use PHPMailer\PHPMailer\Exception;
|
||||||
@@ -150,7 +150,7 @@ function generatePprEmail($entryId, $email, $ac_reg) {
|
|||||||
global $conn, $mailHost, $mailSMTPAuth, $mailUsername, $mailPassword, $mailPort, $baseUrl, $mailFromAddress, $mailFromName;
|
global $conn, $mailHost, $mailSMTPAuth, $mailUsername, $mailPassword, $mailPort, $baseUrl, $mailFromAddress, $mailFromName;
|
||||||
|
|
||||||
if (!class_exists('PHPMailer\PHPMailer\PHPMailer')) {
|
if (!class_exists('PHPMailer\PHPMailer\PHPMailer')) {
|
||||||
require '../vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$token = generateSecureToken($email, $entryId);
|
$token = generateSecureToken($email, $entryId);
|
||||||
|
|||||||
106
public.css
Normal file
106
public.css
Normal 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
116
public.php
Normal 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();
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user