Compare commits
187 Commits
v0.3.1-alp
...
master
Author | SHA1 | Date | |
---|---|---|---|
004d7798e2 | |||
3f66b8bf86 | |||
59791b49ec | |||
4491d5e0a3 | |||
364cec91fc | |||
96feb27b76 | |||
e3f74fd45e | |||
b4f979e596 | |||
39b54af4b5 | |||
de940d95fe | |||
268facd3e7 | |||
fd78ef1284 | |||
d1b5046a42 | |||
d99e13849e | |||
f2432e310e | |||
6a64ede3f6 | |||
b5a652344c | |||
e409ff190a | |||
8225f8eae2 | |||
b368e65bd9 | |||
f4dc85e434 | |||
62fd32b7c2 | |||
063f939abe | |||
5862764f58 | |||
78557474cb | |||
6c6a404538 | |||
5c9c385d86 | |||
5622b99adf | |||
d1904ba4bc | |||
83e2e06073 | |||
49492a42d0 | |||
78c6fa2620 | |||
4b1a8315e7 | |||
2103a2f651 | |||
ce9e30807e | |||
b4df99c961 | |||
af4f4c465a | |||
272b4786b7 | |||
7d812b8488 | |||
e18a75bf65 | |||
6fd580e3f9 | |||
e05ba27ac8 | |||
0706d90500 | |||
9a1abaeb39 | |||
1b145dfe47 | |||
a6fdc117e1 | |||
25d93f52b7 | |||
b857db2390 | |||
731ef21e4f | |||
da0af4f6a2 | |||
8dc00391fb | |||
a726bd1f3b | |||
b68b116381 | |||
a1175d0f23 | |||
13f567b5cd | |||
daa09b3aa9 | |||
9948a25832 | |||
0085db0364 | |||
e99daf9a68 | |||
b3957224a0 | |||
b2f88e0a92 | |||
3ca36cce07 | |||
3263543e68 | |||
90b19cf49c | |||
753fbfbe76 | |||
eabfdce30e | |||
118dc7357c | |||
e8678078b8 | |||
c7374c32f8 | |||
9133ad7df0 | |||
aa8e0c965f | |||
c771e080fb | |||
1f7c597c39 | |||
b3fc805763 | |||
35f87460f6 | |||
cd7e005a69 | |||
5f59766a8e | |||
d68268d6e1 | |||
cbe7953fa5 | |||
c7a489e0ac | |||
f6059c9390 | |||
ef743f7e84 | |||
518ae7e0d8 | |||
8ff87b3416 | |||
41eebb6904 | |||
b1d34ae2d9 | |||
e12cff51d0 | |||
fa418a44d9 | |||
14d65ebfde | |||
f5a8bcdec3 | |||
19c59d2eb6 | |||
f6e5fa0ee5 | |||
52e69cb89f | |||
7aee153e82 | |||
7e574334e5 | |||
dfceb41e61 | |||
86146ef523 | |||
6771a98f43 | |||
ab00082232 | |||
952383d6aa | |||
695fada5b9 | |||
9543d1cf62 | |||
2ac8c3fa83 | |||
64c69ef01c | |||
460cc282dc | |||
374333ed3a | |||
746e77ddd9 | |||
2e56d59664 | |||
ec6551e985 | |||
c94ebb62b9 | |||
175453f083 | |||
d106168b9b | |||
af0e2ec943 | |||
30b05df104 | |||
95c1ea7b93 | |||
dc44deb343 | |||
676dcfdc98 | |||
f995db23ea | |||
cacec80387 | |||
18fbd49dc3 | |||
f4c85bcd6c | |||
021a27e014 | |||
6a54ff1b9f | |||
833e81e6f3 | |||
5afdf094d5 | |||
a64a14420e | |||
bd0502ef9f | |||
542110baf0 | |||
f369cb65bf | |||
dd42127e16 | |||
018a387e54 | |||
3751b69a19 | |||
a8bcfbba61 | |||
c70c7637a3 | |||
f2f0d33e61 | |||
9d4808d64f | |||
b93e4bf1be | |||
10c069e999 | |||
82f394aa0b | |||
41b0c63eb0 | |||
49ac099e41 | |||
30ce754a24 | |||
fcfd90f79b | |||
9c259def43 | |||
fe3d73f79b | |||
b8a6dda082 | |||
7c219235c0 | |||
93f3939428 | |||
bd4a60d5cb | |||
f566d039ab | |||
cfeb196289 | |||
c0e1b256bd | |||
bc79f071a8 | |||
a323fd7825 | |||
daada35045 | |||
cb66028b77 | |||
b5da264ce6 | |||
cd000594bc | |||
80a52123d8 | |||
60a875958a | |||
807788b7f5 | |||
4f6eb06b69 | |||
46841c465e | |||
d8aa2889f5 | |||
3fa53ae69e | |||
f7885f63b5 | |||
b76ab7932c | |||
43f5e673fb | |||
ac7c291af5 | |||
5b789684b6 | |||
ed626d2f64 | |||
ca7726c426 | |||
f4ff816ef2 | |||
10ade25ee9 | |||
bf3d39121c | |||
73b73e158c | |||
542a51c4a4 | |||
3f89231959 | |||
f04f9f1733 | |||
71f09a8444 | |||
18e586f92d | |||
6fbace0a11 | |||
d0c40afdfe | |||
74fa1dfed8 | |||
f7bae7c31f | |||
ca94cbcbc7 | |||
92c20c8740 |
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
nginx.Dockerfile
|
||||
php.Dockerfile
|
||||
.dockerignore
|
||||
.gitignore
|
||||
LICENSE
|
@ -1,3 +1,5 @@
|
||||
# athena.fb-infra.uk
|
||||
|
||||
The web-app at athena.fb-infra.uk
|
||||
**Athena has been superceded by OwlBoard - [git](https://git.fjla.uk/OwlBoard) - [web](https://owlboard.info)**
|
||||
|
||||
**This repository is archived**
|
Before Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 302 B |
BIN
assets/nre/nre-powered.xcf
Normal file
BIN
assets/nre/nre-powered_1200w.jxl
Normal file
BIN
assets/nre/nre-powered_1200w.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
assets/nre/nre-powered_1200w.webp
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
assets/nre/nre-powered_1900w.jxl
Normal file
BIN
assets/nre/nre-powered_1900w.png
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
assets/nre/nre-powered_1900w.webp
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
assets/nre/nre-powered_200w.jxl
Normal file
BIN
assets/nre/nre-powered_200w.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
assets/nre/nre-powered_200w.webp
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
assets/nre/nre-powered_400w.jxl
Normal file
BIN
assets/nre/nre-powered_400w.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
assets/nre/nre-powered_400w.webp
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
assets/nre/nre-powered_800w.jxl
Normal file
BIN
assets/nre/nre-powered_800w.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
assets/nre/nre-powered_800w.webp
Normal file
After Width: | Height: | Size: 19 KiB |
13
basic-test.php
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>TEST_ONLY</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
require './php/submitIssue.php';
|
||||
|
||||
echo cleanInput($_SERVER['QUERY_STRING']);
|
||||
?>
|
||||
</body>
|
||||
</html>
|
40
conf/deploy.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOTIN="/data/in"
|
||||
ROOTOUT="/data/out"
|
||||
|
||||
echo "Running UglifyJS on /data/in folder"
|
||||
uglifyjs-folder "$ROOTIN" -x ".js" -eo "$ROOTOUT"
|
||||
|
||||
echo "Running UglifyCSS"
|
||||
CSSIN="/data/in/styles/"
|
||||
CSSOUT="/data/out/styles"
|
||||
|
||||
cd $CSSIN
|
||||
echo "Changed directory"
|
||||
for f in *
|
||||
do
|
||||
if [ -f "$f" ]; then
|
||||
uglifycss "$f" --output "$f";
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Moving 'styles' to 'out'"
|
||||
cp -r $CSSIN $CSSOUT
|
||||
|
||||
echo "Running html-minifier-terser on /folder"
|
||||
HTMLIN="/data/in/"
|
||||
HTMLOUT="/data/out"
|
||||
html-minifier-terser --collapse-whitespace --remove-comments --file-ext html --input-dir /data/in/ --output-dir /data/out/
|
||||
|
||||
echo "Moving JSON Manifest file from root to output"
|
||||
cat /data/in/manifest.json | jq -c > /data/out/manifest.json
|
||||
|
||||
echo "Moving other files folder from in/ to out/"
|
||||
cp -r /data/in/assets /data/out/assets
|
||||
cp -r /data/in/error-pages /data/out/error-pages
|
||||
cp -r /data/in/page-blocks /data/out/page-blocks
|
||||
cp -r /data/in/*.php /data/out
|
||||
|
||||
echo "Running GZIP & Brotli on all HTML, JS, CSS, JSON, SVG, TTF, VCF, PUB files"
|
||||
find /data/out -type f -name \*.html -or -name \*.vcf -or -name \*.pub -or -name \*.js -or -name \*.css -or -name \*.json -or -name \*.svg -or -name \*.ttf | while read file; do gzip -k -9 $file; brotli -k -q 11 $file; done
|
57
conf/nginx.conf
Normal file
@ -0,0 +1,57 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 128;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
access_log /var/log/nginx/access.log main;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
gzip_static on;
|
||||
brotli_static on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
root /site;
|
||||
|
||||
location ~ /(.git|php|page-blocks) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
index index.php;
|
||||
try_files $uri $uri/ $uri/index.php &uri/index.html =404;
|
||||
break;
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass localhost:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
error_page 403 /error-pages/403.php;
|
||||
error_page 404 /error-pages/404.php;
|
||||
error_page 500 501 502 503 504 /error-pages/50x.php;
|
||||
|
||||
}
|
||||
}
|
23
error-pages/403.php
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
include '../page-blocks/headers.php';
|
||||
?>
|
||||
<title>Athena - Error 403</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php require "../page-blocks/title-image.php";?>
|
||||
|
||||
<h1>You're not allowed to see that!</h1>
|
||||
|
||||
<p><a class="actionbutton" href="/">Go back to the homepage</a></p>
|
||||
|
||||
<h3>403 - Forbidden</h3>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
29
error-pages/404.php
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
include '../page-blocks/headers.php';
|
||||
?>
|
||||
<title>Athena - Error 404</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php include "../page-blocks/title-image.php";?>
|
||||
|
||||
<h1>Oh no! That page can't be found</h1>
|
||||
|
||||
<p>
|
||||
If you got here from a homescreen icon on your device, you will
|
||||
need to remove and re-add the button due to major upgrades to
|
||||
the Athena application
|
||||
</p>
|
||||
|
||||
<p><a class="actionbutton" href="/">Go back to the homepage</a></p>
|
||||
|
||||
<h3>404 - Not Found</h3>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
23
error-pages/50x.php
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
include '../page-blocks/headers.php';
|
||||
?>
|
||||
<title>Athena - Server Error</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php require "../page-blocks/title-image.php";?>
|
||||
|
||||
<h1>Ah, sorry. There's a problem at our end</h1>
|
||||
|
||||
<p><a class="actionbutton" href="/">Try the homepage</a></p>
|
||||
|
||||
<h3>50x - Server Error</h3>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
34
help.php
Normal file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php include './page-blocks/headers.php';?>
|
||||
<title>Athena - Report Issue</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Popup Menu -->
|
||||
<?php require "./page-blocks/nav-menu.php";?>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php require "./page-blocks/title-image.php";?>
|
||||
|
||||
<h2>Help</h2>
|
||||
<div class="text-description">
|
||||
<p>Just type in a three character CRS code or a TIPLOC into the text
|
||||
box and tap the Lookup button.</p>
|
||||
<p>If you enter a TIPLOC, this will not be verified - if it is
|
||||
incorrect or unavailable on Tiger, you will be redirected to a
|
||||
blank board. CRS codes will be verified against a lookup file
|
||||
before redirecting.</p>
|
||||
<p>Some stations are not on Tiger and these stations are not supported
|
||||
here either. Notably TfW and Chiltern stations that border the GWR
|
||||
network. Most GWR Central served stations are now available to
|
||||
lookup.</p>
|
||||
<p>I am working on a new version that will provide data for every
|
||||
station in the National Rail database.</p>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<?php include './page-blocks/footer.php';?>
|
||||
</body>
|
||||
</html>
|
107
index.html
@ -1,107 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Athena</title>
|
||||
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="description" content="Athena - Quick links to live train departures for traincrew."/>
|
||||
<meta name="viewport" content="width=device-width, initial=scale=1.0">
|
||||
<meta name="application-name" content="Athena">
|
||||
<meta name="author" content="Frederick Boniface">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="./styles/style.css"/>
|
||||
<link rel="icon" type="image/png" href="./assets/icons/favicon.ico"/>
|
||||
<link rel="manifest" type="application/json" href="./manifest.json"/>
|
||||
|
||||
<script src="./scripts/tiploc-finder.js"></script>
|
||||
<script src="./scripts/nav.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Popup Menu -->
|
||||
<div id="menu-button" class="menu-button">
|
||||
<img onclick="openMenu()" src="./assets/icons/menu.png"></img>
|
||||
</div>
|
||||
<div id="menu" class="menu">
|
||||
<button class="menuitem" onclick="openAboutPopup(),closeMenu()">Help</button>
|
||||
<button class="menuitem" onclick="openTiplocPopup(),closeMenu()">Code Lookup</button>
|
||||
<img onclick="closeMenu()" class="popup-close" src="./assets/icons/close-circle.png"></img>
|
||||
</div>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<img class="titleimg" src="./assets/title/title.webp"></img>
|
||||
|
||||
<br>
|
||||
|
||||
<input class="lookup-box" type="text" id="crs-lookup" name="crs-lookup" placeholder="Enter CRS/TIPLOC"/>
|
||||
<br>
|
||||
<button class="lookup-button" onclick="getTextEntry()">Lookup Departure Board</button>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h2>Quick Links</h2>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('bathspa')">BTH</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('brstltm')">BRI</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('brstpwy')">BPW</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('crdfcen')">CDF</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('gloster')">GCR</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('oldfldp')">OLF</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('soton')">SOU</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('wstbryw')">WSB</button>
|
||||
<button class="quicklink" onclick="gotoInfoBoard('wsmare')">WSM</button>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<p>This is an Alpha release and is under testing.</p>
|
||||
<p>Some features may not work and some stations may not be available.</p>
|
||||
|
||||
<!-- Popup Boxes (Usually Hidden with CSS) -->
|
||||
<div id="popup-about" class="popup-info">
|
||||
<img onclick="closeAboutPopup()" class="popup-close" src="./assets/icons/close-circle.png"></img>
|
||||
<h2>Help</h2>
|
||||
<p>Just type in a three character CRS code or a TIPLOC into the text
|
||||
box and tap the Lookup button.</p>
|
||||
<p>If you enter a TIPLOC, this will not be verified - if it is
|
||||
incorrect or unavailable on Tiger, you will be redirected to a
|
||||
blank board. CRS codes will be verified against a lookup file
|
||||
before redirecting.</p>
|
||||
<p>Use the TIPLOC Lookup option from the menu to look up a TIPLOC from
|
||||
a given CRS code.</p>
|
||||
<p>Some stations are not on Tiger and these stations are not supported
|
||||
here either. Notably TfW and Chiltern stations that border the GWR
|
||||
network. Most GWR Central served stations are now available to
|
||||
lookup.</p>
|
||||
<p>Until there is a more modern public API offering access to Darwin,
|
||||
I have no interest in supporting any more than simply linking to
|
||||
the relevent Tiger page.</p>
|
||||
</div>
|
||||
|
||||
<div id="popup-tiploc" class="popup-info">
|
||||
<img onclick="closeTiplocPopup()" class="popup-close" src="./assets/icons/close-circle.png"></img>
|
||||
<h2>Code Lookup</h2>
|
||||
<p hidden>Enter a CRS Code in the textbox and tap Go.</p>
|
||||
<p hidden>All GWR managed stations can be looked up but others cannot be
|
||||
gauranteed.</p>
|
||||
<p>THIS FEATURE IS NOT YET IMPLEMENTED</p>
|
||||
<input type="text" id="lookup-tiploc" name="lookup-tiploc" placeholder="Enter CRS"/>
|
||||
<button onclick="tiplocFinder()">Go</button>
|
||||
<br>
|
||||
<p id="resultCRS">CRS: </p>
|
||||
<p id="resultName">Name: </p>
|
||||
<p id="resultTIPLOC">TIPLOC: </p>
|
||||
<p id="resultSTANME">STANME: </p>
|
||||
<p id="resultSTANOX">STANOX: </p>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<p>Created by Fred Boniface - v0.2.1-alpha</p>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
57
index.php
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php include './page-blocks/headers.php';?>
|
||||
<title>Athena</title>
|
||||
|
||||
<script src="/js/tiploc-finder.js" async></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Popup Menu -->
|
||||
<?php include "./page-blocks/nav-menu.php";?>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php include "./page-blocks/title-image.php";?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<input class="lookup-box" type="text" id="crs-lookup" name="crs-lookup" placeholder="Enter CRS/TIPLOC"/>
|
||||
<br>
|
||||
<button class="lookup-button" onclick="getTextEntry()">Lookup Departure Board</button>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<h2 hidden>Server Maintenance</h2>
|
||||
<p hidden>Athena may become unavailable for several hours on 07/03/2023
|
||||
during a server migration. Every effort will be made to prevend downtime.
|
||||
</p>
|
||||
|
||||
<h2>Quick Links</h2>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('bathspa')">BTH</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('brstltm')">BRI</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('brstpwy')">BPW</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('crdfcen')">CDF</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('gloster')">GCR</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('oldfldp')">OLF</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('soton')">SOU</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('wstbryw')">WSB</button>
|
||||
<button class="actionbutton" onclick="gotoInfoBoard('wsmare')">WSM</button>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<div class="text-description">
|
||||
<p>Athena has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
|
||||
<p>Athena will remain available for use as OwlBoard does not yet offer staff versions of boards.</p>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<?php include "./page-blocks/footer.php";?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
67
issue.php
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
include './page-blocks/headers.php';
|
||||
include_once './php/version.php';
|
||||
?>
|
||||
<title>Athena - Report Issue</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
// Imports the functions needed to validate and submit data
|
||||
require './php/submitIssue.php';
|
||||
|
||||
// Set initial values
|
||||
$title = $detail = "";
|
||||
$ua_str = $_SERVER["HTTP_USER_AGENT"];
|
||||
|
||||
// If the page has been POSTed to then run this:
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST" ) {
|
||||
$title = cleanInput($_POST["subject"]);
|
||||
$detail = cleanInput($_POST["detail"]);
|
||||
|
||||
// Prepare $detail to POST
|
||||
$body = "Athena Version: " . $athenaVersion . "\n\n" . "User Agent: " . $ua_str . "\n\n Server PHP Version: " . PHP_VERSION . "\n\nUser Comments:\n" . $detail;
|
||||
|
||||
// Call POST function
|
||||
sendInput($title,$body);
|
||||
|
||||
// Redirect to submit-done.php
|
||||
echo "<script>setTimeout(function(){window.location.href = '/submit-done.php';}, 10);</script>";
|
||||
};
|
||||
?>
|
||||
|
||||
<!-- Popup Menu -->
|
||||
<?php require "./page-blocks/nav-menu.php";?>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php require "./page-blocks/title-image.php";?>
|
||||
|
||||
<h1>Athena is retiring</h1>
|
||||
|
||||
<p>It has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
|
||||
<p>
|
||||
Currently, OwlBoard does not offer staff versions of departure boards.
|
||||
Because of this, Athena will not have any further issues fixed but will remain
|
||||
available until OwlBoard offers this feature.
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
<span class="form-info">
|
||||
Your user agent is:
|
||||
</span>
|
||||
<br>
|
||||
<?php echo $ua_str; ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<?php include "./page-blocks/footer.php" ?>
|
||||
</body>
|
||||
|
||||
</html>
|
11
js/nav.js
Normal file
@ -0,0 +1,11 @@
|
||||
function sidebarOpen() {
|
||||
document.getElementById("sidebar").style.width = "50%";
|
||||
document.getElementById("sidebar_open_short").style.display = "none";
|
||||
document.getElementById("sidebar_close_short").style.display = "block";
|
||||
}
|
||||
|
||||
function sidebarClose() {
|
||||
document.getElementById("sidebar").style.width = "0%"
|
||||
document.getElementById("sidebar_open_short").style.display = "block";
|
||||
document.getElementById("sidebar_close_short").style.display = "none";
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
const url = "https://tiger.worldline.global/";
|
||||
const view = "/staff;scrollbar=true";
|
||||
|
||||
console.group("Athena - v0.2.1-alpha")
|
||||
console.group("Athena - Departure Boards")
|
||||
console.info("Initialising");
|
||||
|
||||
|
||||
@ -88,38 +88,3 @@ function gotoInfoBoard(station) {
|
||||
console.groupEnd();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*This function provides the Lookup TIPLOC from CRS function from the menu*/
|
||||
function tiplocFinder() {
|
||||
console.group("Athena: function: tiplocFinder()");
|
||||
let crs_to_find = document.getElementById("lookup-tiploc").value;
|
||||
console.info("You are trying to lookup the TIPLOC for:" + crs_to_find.toUpperCase());
|
||||
console.info("Checking if CRS code exists in look up data");
|
||||
let hasKey = dataGlobal.hasOwnProperty(crs_to_find);
|
||||
if (hasKey) { //If key exists then log and continue
|
||||
console.info(crs_to_find.toUpperCase() + " does exist in lookup file");
|
||||
} else { //If key does not exist then stop further processing
|
||||
console.warn(crs_to_find.toUpperCase() + "does not exist in lookup file");
|
||||
console.error(crs_to_find.toUpperCase() + " is an incorrect code or not supported.");
|
||||
alert(crs_to_find.toUpperCase() + " is not a valid or supported CRS, " +
|
||||
"please see the help section for more information");
|
||||
console.groupEnd();
|
||||
return 0;
|
||||
}
|
||||
let crs_obj = dataGlobal[crs_to_find];
|
||||
let name = crs_obj['name'].toUpperCase();
|
||||
let crs = crs_to_find.toUpperCase();
|
||||
let stanme = crs_obj['stanme'].toUpperCase();
|
||||
let stanox = crs_obj['stanox'];
|
||||
let tiploc = crs_obj['tiploc'];
|
||||
console.info("Found Data for " + crs +": Name: " + name + ", STANME: " + stanme +
|
||||
", STANOX: " + stanox + ", TIPLOC: " + tiploc);
|
||||
console.warn("Attempt writing to DOM, feature incomplete");
|
||||
document.getElementById("resultCRS").innerHTML = "CRS: " + crs_to_find.toUpperCase();
|
||||
document.getElementById("resultTIPLOC").innerHTML = "TIPLOC: " + tiploc.toUpperCase();
|
||||
document.getElementById("resultSTANME").innerHTML = "STANME: " + stanme.toUpperCase();
|
||||
document.getElementById("resultName").innerHTML = "Name: " + name.toUpperCase();
|
||||
document.getElementById("resultSTANOX").innerHTML = "STANOX: " + stanox;
|
||||
console.info("Writing to DOM Complete")
|
||||
console.groupEnd();
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Athena",
|
||||
"short_name": "Athena",
|
||||
"start_url": "/index.html",
|
||||
"start_url": "/",
|
||||
"scope": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#7fa7e6",
|
||||
|
12
nginx.Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM fedora:latest as compressor
|
||||
RUN dnf install brotli nodejs npm jq -y
|
||||
RUN npm i uglifyjs-folder uglifycss html-minifier-terser -g
|
||||
COPY . /data/in
|
||||
RUN bash /data/in/conf/deploy.sh
|
||||
|
||||
FROM fholzer/nginx-brotli:latest
|
||||
RUN rm /etc/nginx/nginx.conf
|
||||
RUN apk update
|
||||
RUN apk add --upgrade libxml2 libxslt
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=compressor /data/out/ /site/
|
6
page-blocks/footer.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
include "./php/version.php";
|
||||
?>
|
||||
<footer>
|
||||
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - v<?php echo $athenaVersion ?></p>
|
||||
</footer>
|
10
page-blocks/headers.php
Normal file
@ -0,0 +1,10 @@
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="description" content="Athena - Live train departures for traincrew."/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="application-name" content="Athena">
|
||||
<meta name="author" content="Frederick Boniface">
|
||||
<link rel="stylesheet" type="text/css" href="/styles/style.css"/>
|
||||
<link rel="icon" type="image/png" href="/assets/icons/favicon.ico"/>
|
||||
<link rel="manifest" type="application/json" href="/manifest.json"/>
|
||||
|
||||
<script src="/js/nav.js"></script>
|
9
page-blocks/nav-menu.php
Normal file
@ -0,0 +1,9 @@
|
||||
<div id="menubar_hamburger" class="hide_micro">
|
||||
<button class="sidebar_control" id="sidebar_open_short" onclick="sidebarOpen()">☰</button>
|
||||
<button class="sidebar_control" id="sidebar_close_short" onclick="sidebarClose()">×</button>
|
||||
</div>
|
||||
<div id="sidebar">
|
||||
<a href="/">Home</a>
|
||||
<a href="/help.php">Help</a>
|
||||
<a href="/issue.php">Report Issue</a>
|
||||
</div>
|
9
page-blocks/title-image.php
Normal file
@ -0,0 +1,9 @@
|
||||
<picture>
|
||||
<source media="(max-width:1000px)" srcset="/assets/title/title_355.jxl" type="image/jxl">
|
||||
<source media="(max-width:1000px)" srcset="/assets/title/title_355.webp" type="image/webp">
|
||||
<source media="(max-width:1000px)" srcset="/assets/title/title_355.png" type="image/png">
|
||||
<source srcset="/assets/title/title_600.jxl" type="image/jxl">
|
||||
<source srcset="/assets/title/title_600.webp" type="image/webp">
|
||||
<source srcset="/assets/title/title_600.png" type="image/png">
|
||||
<img class="titleimg" src="/assets/title/title_600.png" alt="Athena Owl Logo">
|
||||
</picture>
|
3
php.Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM php:8.2.1-fpm-alpine
|
||||
|
||||
COPY . /site
|
9
php/LDB-Tests/example.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
require './php/openLDBSVWS.php';
|
||||
require '/srv/php-keys/athena/gitea.php';
|
||||
date_default_timezone_set("Europe/London");
|
||||
$OpenLDBSVWS = new OpenLDBSVWS($ldbKey);
|
||||
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
|
||||
header("Content-Type: text/plain");
|
||||
print_r($response);
|
||||
?>
|
56
php/LDB-Tests/example_output.php
Normal file
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TESTING</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require("OpenLDBWS.php");
|
||||
$OpenLDBWS = new OpenLDBWS("YOUR_ACCESS_TOKEN");
|
||||
$response = $OpenLDBWS->GetDepartureBoard(10,"GTW");
|
||||
$template["header"] = "
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Destination</th>
|
||||
<th>Platform</th>
|
||||
<th>Expected</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
";
|
||||
$template["row"] = "
|
||||
<tr>
|
||||
<td>{std}</td>
|
||||
<td>{destination}</td>
|
||||
<td>{platform}</td>
|
||||
<td>{etd}</td>
|
||||
</tr>
|
||||
";
|
||||
$template["footer"] = "
|
||||
</tbody>
|
||||
</table>
|
||||
";
|
||||
if (isset($response->GetStationBoardResult->trainServices->service))
|
||||
{
|
||||
print $template["header"];
|
||||
foreach($response->GetStationBoardResult->trainServices->service as $service)
|
||||
{
|
||||
$row = $template["row"];
|
||||
$destinations = array();
|
||||
foreach($service->destination->location as $location)
|
||||
{
|
||||
$destinations[] = $location->locationName;
|
||||
}
|
||||
$row = str_replace("{std}",$service->std,$row);
|
||||
$row = str_replace("{destination}",implode(" and ",$destinations),$row);
|
||||
$row = str_replace("{platform}",(isset($service->platform)?$service->platform:" "),$row);
|
||||
$row = str_replace("{etd}",$service->etd,$row);
|
||||
print $row;
|
||||
}
|
||||
print $template["footer"];
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
65
php/LDB-Tests/example_output_SV.php
Normal file
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TESTING</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
require './php/openLDBSVWS.php';
|
||||
require './php/submitIssue.php';
|
||||
require '/srv/php-keys/athena/gitea.php';
|
||||
|
||||
echo cleanInput($_SERVER['QUERY_STRING']);
|
||||
|
||||
date_default_timezone_set("Europe/London");
|
||||
$OpenLDBSVWS = new OpenLDBSVWS($ldbKey);
|
||||
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
|
||||
$template["header"] = "
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Org.</th>
|
||||
<th>Dest.</th>
|
||||
<th>Plat.</th>
|
||||
<th>Sch</th>
|
||||
<th>Exp</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
";
|
||||
$template["row"] = "
|
||||
<tr>
|
||||
<td>{id}</td>
|
||||
<td>{org}</td>
|
||||
<td>{dest}</td>
|
||||
<td>{plat}</td>
|
||||
<td>{sch}</td>
|
||||
<td>{act}</td>
|
||||
</tr>
|
||||
";
|
||||
$template["footer"] = "
|
||||
</tbody>
|
||||
</table>
|
||||
";
|
||||
if (isset($response->GetBoardResult->trainServices->service))
|
||||
{
|
||||
print $template["header"];
|
||||
foreach($response->GetBoardResult->trainServices->service as $service)
|
||||
{
|
||||
$row = $template["row"];
|
||||
$destinations = array();
|
||||
|
||||
$row = str_replace("{id}",$service->trainid,$row);
|
||||
$row = str_replace("{org}",$service->origin->location->tiploc,$row);
|
||||
$row = str_replace("{dest}",$service->destination->location->tiploc,$row);
|
||||
$row = str_replace("{plat}",$service->platform,$row);
|
||||
$row = str_replace("{sch}",$servoce->std,$row);
|
||||
$row = str_replace("{act}",$service->etd,$row);
|
||||
print $row;
|
||||
}
|
||||
print $template["footer"];
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
500
php/LDB-Tests/example_return.php
Normal file
@ -0,0 +1,500 @@
|
||||
stdClass Object
|
||||
(
|
||||
[GetBoardResult] => stdClass Object
|
||||
(
|
||||
[generatedAt] => 2022-11-05T21:47:01.9993579+00:00
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[stationManager] => Network Rail
|
||||
[stationManagerCode] => RT
|
||||
[isTruncated] => 1
|
||||
[trainServices] => stdClass Object
|
||||
(
|
||||
[service] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057051479
|
||||
[uid] => F51479
|
||||
[trainid] => 9U02
|
||||
[rsid] => XR134200
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Elizabeth Line
|
||||
[operatorCode] => XR
|
||||
[std] => 2022-11-05T21:48:00
|
||||
[etd] => 2022-11-05T21:48:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => A
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTLL
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Abbey Wood
|
||||
[crs] => ABW
|
||||
[tiploc] => ABWDXR
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[1] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057919346
|
||||
[uid] => O19346
|
||||
[trainid] => 1T91
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Great Western Railway
|
||||
[operatorCode] => GW
|
||||
[std] => 2022-11-05T21:55:00
|
||||
[etd] => 2022-11-05T21:55:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => TD
|
||||
[platform] => 7
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTON
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Heathrow Airport T5
|
||||
[crs] => HWV
|
||||
[tiploc] => HTRWTM5
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[2] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057051484
|
||||
[uid] => F51484
|
||||
[trainid] => 9U04
|
||||
[rsid] => XR134700
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Elizabeth Line
|
||||
[operatorCode] => XR
|
||||
[std] => 2022-11-05T21:58:00
|
||||
[etd] => 2022-11-05T21:58:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => A
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTLL
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Abbey Wood
|
||||
[crs] => ABW
|
||||
[tiploc] => ABWDXR
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[3] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057051488
|
||||
[uid] => F51488
|
||||
[trainid] => 9U06
|
||||
[rsid] => XR135100
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Elizabeth Line
|
||||
[operatorCode] => XR
|
||||
[std] => 2022-11-05T22:08:00
|
||||
[etd] => 2022-11-05T22:08:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => A
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTLL
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Abbey Wood
|
||||
[crs] => ABW
|
||||
[tiploc] => ABWDXR
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[4] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057919347
|
||||
[uid] => O19347
|
||||
[trainid] => 1T92
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Great Western Railway
|
||||
[operatorCode] => GW
|
||||
[std] => 2022-11-05T22:10:00
|
||||
[etd] => 2022-11-05T22:10:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => TD
|
||||
[platform] => 6
|
||||
[platformIsHidden] => 1
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTON
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Heathrow Airport T5
|
||||
[crs] => HWV
|
||||
[tiploc] => HTRWTM5
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[5] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057051492
|
||||
[uid] => F51492
|
||||
[trainid] => 9U08
|
||||
[rsid] => XR135500
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Elizabeth Line
|
||||
[operatorCode] => XR
|
||||
[std] => 2022-11-05T22:18:00
|
||||
[etd] => 2022-11-05T22:18:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => A
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTLL
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Abbey Wood
|
||||
[crs] => ABW
|
||||
[tiploc] => ABWDXR
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[6] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057919350
|
||||
[uid] => O19350
|
||||
[trainid] => 1T93
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Great Western Railway
|
||||
[operatorCode] => GW
|
||||
[std] => 2022-11-05T22:25:00
|
||||
[etd] => 2022-11-05T22:25:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => 7
|
||||
[platformIsHidden] => 1
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTON
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Heathrow Airport T5
|
||||
[crs] => HWV
|
||||
[tiploc] => HTRWTM5
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[7] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057051497
|
||||
[uid] => F51497
|
||||
[trainid] => 9U10
|
||||
[rsid] => XR136000
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Elizabeth Line
|
||||
[operatorCode] => XR
|
||||
[std] => 2022-11-05T22:28:00
|
||||
[etd] => 2022-11-05T22:28:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => A
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTLL
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Abbey Wood
|
||||
[crs] => ABW
|
||||
[tiploc] => ABWDXR
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[8] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057051502
|
||||
[uid] => F51502
|
||||
[trainid] => 9U12
|
||||
[rsid] => XR136500
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Elizabeth Line
|
||||
[operatorCode] => XR
|
||||
[std] => 2022-11-05T22:38:00
|
||||
[etd] => 2022-11-05T22:38:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => A
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTLL
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Abbey Wood
|
||||
[crs] => ABW
|
||||
[tiploc] => ABWDXR
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
[9] => stdClass Object
|
||||
(
|
||||
[rid] => 202211057919351
|
||||
[uid] => O19351
|
||||
[trainid] => 1T94
|
||||
[sdd] => 2022-11-05
|
||||
[operator] => Great Western Railway
|
||||
[operatorCode] => GW
|
||||
[std] => 2022-11-05T22:40:00
|
||||
[etd] => 2022-11-05T22:40:00
|
||||
[departureType] => Forecast
|
||||
[departureSource] => Darwin
|
||||
[platform] => 6
|
||||
[platformIsHidden] => 1
|
||||
[origin] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => London Paddington
|
||||
[crs] => PAD
|
||||
[tiploc] => PADTON
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[destination] => stdClass Object
|
||||
(
|
||||
[location] => Array
|
||||
(
|
||||
[0] => stdClass Object
|
||||
(
|
||||
[locationName] => Heathrow Airport T5
|
||||
[crs] => HWV
|
||||
[tiploc] => HTRWTM5
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[category] => OO
|
||||
[activities] => TB
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
3
php/LDB-Tests/test.php
Executable file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
341
php/openLDBSVWS.php
Normal file
@ -0,0 +1,341 @@
|
||||
<?php
|
||||
class OpenLDBSVWS
|
||||
{
|
||||
private $accessToken;
|
||||
|
||||
private $trace;
|
||||
|
||||
private $wsdl = '<?xml version="1.0" encoding="utf-8"?>
|
||||
<wsdl:definitions
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
|
||||
xmlns:sv="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/"
|
||||
targetNamespace="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/">
|
||||
<wsdl:import
|
||||
namespace="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/"
|
||||
location="http://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/rtti_2017-10-01_ldbsv.wsdl"/>
|
||||
<wsdl:service name="ldbsv">
|
||||
<wsdl:port name="LDBSVServiceSoap12" binding="sv:LDBSVServiceSoap12">
|
||||
<soap12:address location="http://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/ldbsv12.asmx"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>';
|
||||
|
||||
function __construct($accessToken,$trace=FALSE)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
|
||||
$this->trace = $trace;
|
||||
|
||||
$soapOptions = array("trace"=>$this->trace,"soap_version"=>SOAP_1_2,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||
|
||||
if (extension_loaded("zlib")) $soapOptions["compression"] = SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP;
|
||||
|
||||
$this->soapClient = new SoapClient("data:text/plain;base64,".base64_encode($this->wsdl),$soapOptions);
|
||||
|
||||
$soapVar = new SoapVar(array("ns2:TokenValue"=>$this->accessToken),SOAP_ENC_OBJECT);
|
||||
|
||||
$soapHeader = new SoapHeader("http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes","AccessToken",$soapVar,FALSE);
|
||||
|
||||
$this->soapClient->__setSoapHeaders($soapHeader);
|
||||
}
|
||||
|
||||
private function call($method,$params)
|
||||
{
|
||||
try
|
||||
{
|
||||
$response = $this->soapClient->$method($params);
|
||||
}
|
||||
catch(SoapFault $soapFault)
|
||||
{
|
||||
if ($this->trace)
|
||||
{
|
||||
$traceOutput["soapFaultMessage"] = $soapFault->getMessage();
|
||||
|
||||
$traceOutput["soapClientRequest"] = str_replace($this->accessToken,"",$this->soapClient->__getLastRequest());
|
||||
|
||||
$traceOutput["soapClientResponse"] = $this->soapClient->__getLastResponse();
|
||||
|
||||
print_r($traceOutput);
|
||||
}
|
||||
}
|
||||
|
||||
return (isset($response)?$response:FALSE);
|
||||
}
|
||||
|
||||
function GetBoardByCRS($method,$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices)
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($numRows) $params["numRows"] = $numRows;
|
||||
|
||||
if ($crs) $params["crs"] = $crs;
|
||||
|
||||
if ($time) $params["time"] = $time;
|
||||
|
||||
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||
|
||||
if ($filtercrs) $params["filtercrs"] = $filtercrs;
|
||||
|
||||
if ($filterType) $params["filterType"] = $filterType;
|
||||
|
||||
if ($filterTOC) $params["filterTOC"] = $filterTOC;
|
||||
|
||||
if ($services) $params["services"] = $services;
|
||||
|
||||
if ($getNonPassengerServices) $params["getNonPassengerServices"] = $getNonPassengerServices;
|
||||
|
||||
return $this->call($method,$params);
|
||||
}
|
||||
|
||||
function GetArrivalDepartureBoardByCRS($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByCRS("GetArrivalDepartureBoardByCRS",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetArrivalBoardByCRS($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByCRS("GetArrivalBoardByCRS",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetDepartureBoardByCRS($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByCRS("GetDepartureBoardByCRS",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetArrDepBoardWithDetails($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByCRS("GetArrDepBoardWithDetails",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetArrBoardWithDetails($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByCRS("GetArrBoardWithDetails",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetDepBoardWithDetails($numRows="",$crs="",$time="",$timeWindow="",$filtercrs="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByCRS("GetDepBoardWithDetails",$numRows,$crs,$time,$timeWindow,$filtercrs,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetBoardByTIPLOC($method,$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices)
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($numRows) $params["numRows"] = $numRows;
|
||||
|
||||
if ($tiploc) $params["tiploc"] = $tiploc;
|
||||
|
||||
if ($time) $params["time"] = $time;
|
||||
|
||||
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||
|
||||
if ($filterTiploc) $params["filterTiploc"] = $filterTiploc;
|
||||
|
||||
if ($filterType) $params["filterType"] = $filterType;
|
||||
|
||||
if ($filterTOC) $params["filterTOC"] = $filterTOC;
|
||||
|
||||
if ($services) $params["services"] = $services;
|
||||
|
||||
if ($getNonPassengerServices) $params["getNonPassengerServices"] = $getNonPassengerServices;
|
||||
|
||||
return $this->call($method,$params);
|
||||
}
|
||||
|
||||
function GetArrivalDepartureBoardByTIPLOC($numRows="",$tiploc="",$time="",$timeWindow="",$filterTiploc="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByTIPLOC("GetArrivalDepartureBoardByTIPLOC",$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetArrivalBoardByTIPLOC($numRows="",$tiploc="",$time="",$timeWindow="",$filterTiploc="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByTIPLOC("GetArrivalBoardByTIPLOC",$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetDepartureBoardByTIPLOC($numRows="",$tiploc="",$time="",$timeWindow="",$filterTiploc="",$filterType="",$filterTOC="",$services="",$getNonPassengerServices="")
|
||||
{
|
||||
return $this->GetBoardByTIPLOC("GetDepartureBoardByTIPLOC",$numRows,$tiploc,$time,$timeWindow,$filterTiploc,$filterType,$filterTOC,$services,$getNonPassengerServices);
|
||||
}
|
||||
|
||||
function GetDepartures($method,$crs,$filterList,$time,$timeWindow,$filterTOC,$services)
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($crs) $params["crs"] = $crs;
|
||||
|
||||
if ($filterList) $params["filterList"] = $filterList;
|
||||
|
||||
if ($time) $params["time"] = $time;
|
||||
|
||||
if ($timeWindow) $params["timeWindow"] = $timeWindow;
|
||||
|
||||
if ($filterTOC) $params["filterTOC"] = $filterTOC;
|
||||
|
||||
if ($services) $params["services"] = $services;
|
||||
|
||||
return $this->call($method,$params);
|
||||
}
|
||||
|
||||
function GetNextDepartures($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||
{
|
||||
return $this->GetDepartures("GetNextDepartures",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||
}
|
||||
|
||||
function GetFastestDepartures($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||
{
|
||||
return $this->GetDepartures("GetFastestDepartures",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||
}
|
||||
|
||||
function GetNextDeparturesWithDetails($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||
{
|
||||
return $this->GetDepartures("GetNextDeparturesWithDetails",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||
}
|
||||
|
||||
function GetFastestDeparturesWithDetails($crs="",$filterList="",$time="",$timeWindow="",$filterTOC="",$services="")
|
||||
{
|
||||
return $this->GetDepartures("GetFastestDeparturesWithDetails",$crs,$filterList,$time,$timeWindow,$filterTOC,$services);
|
||||
}
|
||||
|
||||
function GetServiceDetailsByRID($rid="")
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($rid) $params["rid"] = $rid;
|
||||
|
||||
return $this->call("GetServiceDetailsByRID",$params);
|
||||
}
|
||||
|
||||
function QueryServices($serviceID="",$sdd="",$filterTime="",$filtercrs="",$tocFilter="")
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($serviceID) $params["serviceID"] = $serviceID;
|
||||
|
||||
if ($sdd) $params["sdd"] = $sdd;
|
||||
|
||||
if ($filterTime) $params["filterTime"] = $filterTime;
|
||||
|
||||
if ($filtercrs) $params["filtercrs"] = $filtercrs;
|
||||
|
||||
if ($tocFilter) $params["tocFilter"] = $tocFilter;
|
||||
|
||||
return $this->call("QueryServices",$params);
|
||||
}
|
||||
|
||||
function GetDisruptionList($CRSList="")
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($CRSList) $params["CRSList"] = $CRSList;
|
||||
|
||||
return $this->call("GetDisruptionList",$params);
|
||||
}
|
||||
}
|
||||
|
||||
class OpenLDBSVREFWS
|
||||
{
|
||||
private $accessToken;
|
||||
|
||||
private $trace;
|
||||
|
||||
private $wsdl = '<?xml version="1.0" encoding="utf-8"?>
|
||||
<wsdl:definitions
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
|
||||
xmlns:sv="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/"
|
||||
targetNamespace="http://thalesgroup.com/RTTI/2017-10-01/ldbsv/">
|
||||
<wsdl:import
|
||||
namespace="http://thalesgroup.com/RTTI/2015-05-14/ldbsv_ref/"
|
||||
location="http://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/rtti_2015-05-14_ldbsv_ref.wsdl"/>
|
||||
<wsdl:service name="ldbsv">
|
||||
<wsdl:port name="LDBSVRefServiceSoap12" binding="ref:LDBSVRefServiceSoap12">
|
||||
<soap12:address location="http://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/ldbsvref.asmx"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>';
|
||||
|
||||
function __construct($accessToken,$trace=FALSE)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
|
||||
$this->trace = $trace;
|
||||
|
||||
$soapOptions = array("trace"=>$this->trace,"soap_version"=>SOAP_1_2,"features"=>SOAP_SINGLE_ELEMENT_ARRAYS);
|
||||
|
||||
if (extension_loaded("zlib")) $soapOptions["compression"] = SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP;
|
||||
|
||||
$this->soapClient = new SoapClient("data:text/plain;base64,".base64_encode($this->wsdl),$soapOptions);
|
||||
|
||||
$soapVar = new SoapVar(array("ns2:TokenValue"=>$this->accessToken),SOAP_ENC_OBJECT);
|
||||
|
||||
$soapHeader = new SoapHeader("http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes","AccessToken",$soapVar,FALSE);
|
||||
|
||||
$this->soapClient->__setSoapHeaders($soapHeader);
|
||||
}
|
||||
|
||||
private function call($method,$params)
|
||||
{
|
||||
try
|
||||
{
|
||||
$response = $this->soapClient->$method($params);
|
||||
}
|
||||
catch(SoapFault $soapFault)
|
||||
{
|
||||
if ($this->trace)
|
||||
{
|
||||
$traceOutput["soapFaultMessage"] = $soapFault->getMessage();
|
||||
|
||||
$traceOutput["soapClientRequest"] = str_replace($this->accessToken,"",$this->soapClient->__getLastRequest());
|
||||
|
||||
$traceOutput["soapClientResponse"] = $this->soapClient->__getLastResponse();
|
||||
|
||||
print_r($traceOutput);
|
||||
}
|
||||
}
|
||||
|
||||
return (isset($response)?$response:FALSE);
|
||||
}
|
||||
|
||||
function GetReasonCode($reasonCode="")
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($reasonCode) $params["reasonCode"] = $reasonCode;
|
||||
|
||||
return $this->call("GetReasonCode",$params);
|
||||
}
|
||||
|
||||
function GetReasonCodeList()
|
||||
{
|
||||
$params = array();
|
||||
|
||||
return $this->call("GetReasonCodeList",$params);
|
||||
}
|
||||
|
||||
function GetSourceInstanceNames()
|
||||
{
|
||||
$params = array();
|
||||
|
||||
return $this->call("GetSourceInstanceNames",$params);
|
||||
}
|
||||
|
||||
function GetTOCList($currentVersion="")
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($currentVersion) $params["currentVersion"] = $currentVersion;
|
||||
|
||||
return $this->call("GetTOCList",$params);
|
||||
}
|
||||
|
||||
function GetStationList($currentVersion="")
|
||||
{
|
||||
$params = array();
|
||||
|
||||
if ($currentVersion) $params["currentVersion"] = $currentVersion;
|
||||
|
||||
return $this->call("GetStationList",$params);
|
||||
}
|
||||
}
|
||||
?>
|
41
php/submitIssue.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
function sendInput($title,$body) {
|
||||
|
||||
// Get API Key for git.fjla.uk
|
||||
require '/srv/keys/athena/apiKeys.php';
|
||||
|
||||
// Set httpHeaders
|
||||
$httpHeaders = array(
|
||||
"accept: application/json",
|
||||
$giteaKey,
|
||||
"Content-Type: application/json"
|
||||
);
|
||||
|
||||
// Prepare the request
|
||||
$rawData = array(
|
||||
'body' => $body,
|
||||
'title' => $title
|
||||
);
|
||||
|
||||
$preparedData = json_encode($rawData);
|
||||
|
||||
// Prepare CURL
|
||||
$curlConnection = curl_init('https://git.fjla.uk/api/v1/repos/fred.boniface/athena.fb-infra.uk/issues');
|
||||
curl_setopt($curlConnection, CURLOPT_POSTFIELDS, $preparedData);
|
||||
curl_setopt($curlConnection, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curlConnection, CURLOPT_HTTPHEADER, $httpHeaders);
|
||||
|
||||
// Get response and exit CURL
|
||||
$response = curl_exec($curlConnection);
|
||||
curl_close($curlConnection);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
function cleanInput($data) {
|
||||
$data = trim($data);
|
||||
$data = stripslashes($data);
|
||||
$data = htmlspecialchars($data);
|
||||
return $data;
|
||||
}
|
2
php/version.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
$athenaVersion = '0.4.4-alpha';
|
@ -1,23 +0,0 @@
|
||||
function openMenu() {
|
||||
document.getElementById("menu").style.display = "block";
|
||||
}
|
||||
|
||||
function closeMenu() {
|
||||
document.getElementById("menu").style.display = "none";
|
||||
}
|
||||
|
||||
function closeAboutPopup() {
|
||||
document.getElementById("popup-about").style.display = "none";
|
||||
}
|
||||
|
||||
function openAboutPopup() {
|
||||
document.getElementById("popup-about").style.display = "block";
|
||||
}
|
||||
|
||||
function closeTiplocPopup() {
|
||||
document.getElementById("popup-tiploc").style.display = "none";
|
||||
}
|
||||
|
||||
function openTiplocPopup() {
|
||||
document.getElementById("popup-tiploc").style.display = "block";
|
||||
}
|
188
styles/style.css
@ -1,31 +1,78 @@
|
||||
/* COLOR VARS */
|
||||
:root {
|
||||
--main-bg-color: #aac4ee;
|
||||
--accent-color: #7fa7e6;
|
||||
--overlay-color: #7fa6e6de;
|
||||
--main-text-color: #016ec7;
|
||||
--link-color: azure;
|
||||
--link-visited-color: azure;
|
||||
}
|
||||
body {
|
||||
background-color: #aac4ee;
|
||||
color: #359aff;
|
||||
background-color: var(--main-bg-color);
|
||||
color: var(--main-text-color);
|
||||
font-family: sans-serif;
|
||||
text-align: center;
|
||||
padding-bottom: 60px; /*Footer height*/
|
||||
}
|
||||
|
||||
.titleimg {
|
||||
width: 80%;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 50px;
|
||||
padding-bottom: 10px;
|
||||
max-width: 500px;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.lookup-box {
|
||||
text-align: center;
|
||||
border: black;
|
||||
padding-top: 40px;
|
||||
border-radius: 40px;
|
||||
padding: 10px;
|
||||
margin-bottom: 5px;
|
||||
font-size: 18px;
|
||||
text-transform: uppercase;
|
||||
transition: 0.2s;
|
||||
}
|
||||
|
||||
.form-text-small {
|
||||
text-align: center;
|
||||
border: black;
|
||||
width: 80%;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
font-size: 18px;
|
||||
transition: 0.2s;
|
||||
}
|
||||
@media only screen and (min-width: 600px) {.form-text-small{width: 50%}}
|
||||
.form-text-large {
|
||||
text-align: left;
|
||||
border: black;
|
||||
width: 80%;
|
||||
height: 90px;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
font-size: 16px;
|
||||
transition: 0.2s;
|
||||
}
|
||||
@media only screen and (min-width: 600px) {.form-text-large{width: 50%}}
|
||||
.form-info {
|
||||
color: var(--main-text-color);
|
||||
font-size: 17px;
|
||||
font-weight: bolder;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.text-description {
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
color: var(--main-text-color);
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
transition: 0.2s;
|
||||
}
|
||||
@media only screen and (min-width: 600px) {.text-description{width: 50%}}
|
||||
.lookup-button {
|
||||
background-color: #3c78d8;
|
||||
color: #f6f5f4;
|
||||
color: var(--link-color);
|
||||
border: none;
|
||||
border-radius: 18px;
|
||||
font-size: 16px;
|
||||
@ -33,93 +80,88 @@ body {
|
||||
padding: 5px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a {
|
||||
display: float;
|
||||
background-color: #3c78d8;
|
||||
color: #f6f5f4;
|
||||
padding: 7px;
|
||||
border-radius: 5px;
|
||||
text-decoration: none;
|
||||
margin-bottom: 10px;
|
||||
line-height: 3;
|
||||
}
|
||||
|
||||
.quicklink {
|
||||
.actionbutton {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
background-color: #3c78d8;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
color: #f6f5f4;
|
||||
color: var(--link-color);
|
||||
padding: 7px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: none;
|
||||
background-color: #3c78d8;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
position: absolute;
|
||||
background-color: #aac4ee;
|
||||
border: none;
|
||||
right: 30px;
|
||||
.inlinelink {
|
||||
text-decoration: underline;
|
||||
color: var(--link-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menuitem {
|
||||
background-color: #2256aa;
|
||||
color: #f6f5f4;
|
||||
border: none;
|
||||
border-radius: 18px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
padding: 3px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menuitem:hover {
|
||||
background-color: #112b55;
|
||||
}
|
||||
|
||||
.popup-info {
|
||||
display: none;
|
||||
/* START MENU STYLE */
|
||||
#menubar_hamburger {
|
||||
position: absolute;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
top: 2px;
|
||||
right: 0;
|
||||
top: 20px;
|
||||
width: 80%;
|
||||
background-color: rgba(41,106,163,0.9);
|
||||
color: white;
|
||||
border-radius: 50px;
|
||||
padding: 30px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.popup-close {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
cursor: pointer;
|
||||
.sidebar_control {
|
||||
background-color: transparent;
|
||||
color: var(--link-color);
|
||||
border: none;
|
||||
font-family: sans-serif;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
#sidebar_open_short {display: block;}
|
||||
#sidebar_close_short {
|
||||
display: none;
|
||||
font-size: x-large;
|
||||
}
|
||||
#sidebar {
|
||||
position: fixed;
|
||||
top: 40px;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
display: block;
|
||||
max-width: 250px;
|
||||
width: 0;
|
||||
border-top-left-radius: 45px;
|
||||
border-bottom-left-radius: 45px;
|
||||
background-color: var(--overlay-color);
|
||||
transition: 0.4s;
|
||||
}
|
||||
#sidebar a {
|
||||
padding: 8px 8px 8px 8px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
font-family: indie-flower, sans-serif;
|
||||
font-weight: 300;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
font-size: 25px;
|
||||
color: var(--link-color);
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
transition: 0.5s;
|
||||
}
|
||||
/* Footer Styles */
|
||||
footer {
|
||||
background-color: #7fa7e6;
|
||||
background-color: var(--accent-color);
|
||||
color: white;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
footer a {
|
||||
text-decoration: underline;
|
||||
color: white;
|
||||
}
|
||||
footer a:visited {
|
||||
color: white;
|
||||
}
|
||||
footer a:hover {
|
||||
color: beige;
|
||||
}
|
40
submit-done.php
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php include './page-blocks/headers.php';?>
|
||||
<title>Sent</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Popup Menu -->
|
||||
<?php require "./page-blocks/nav-menu.php";?>
|
||||
|
||||
<!-- Main Content Begins -->
|
||||
<?php require "./page-blocks/title-image.php";?>
|
||||
|
||||
<br>
|
||||
|
||||
<h1>Report Submitted</h1>
|
||||
|
||||
<div class="text-description">
|
||||
<p>Thanks for your report or suggestion.</p>
|
||||
<p>You're helping to make Athena better for everyone.</p>
|
||||
<br>
|
||||
<br>
|
||||
<p>You will be redirected to the homepage in three seconds.</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
window.location.href = '/';
|
||||
}, 3000);
|
||||
</script>
|
||||
|
||||
<!-- Footer -->
|
||||
<?php include "./page-blocks/footer.php" ?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|