Compare commits
6 Commits
v1.0.0-dev
...
master
Author | SHA1 | Date | |
---|---|---|---|
004d7798e2 | |||
3f66b8bf86 | |||
59791b49ec | |||
4491d5e0a3 | |||
364cec91fc | |||
96feb27b76 |
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
nginx.Dockerfile
|
||||||
|
php.Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
.gitignore
|
||||||
|
LICENSE
|
@ -1,3 +1,5 @@
|
|||||||
# athena.fb-infra.uk
|
# 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**
|
40
conf/deploy.sh
Normal file
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
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -27,8 +27,9 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2 hidden>Server Maintenance</h2>
|
<h2 hidden>Server Maintenance</h2>
|
||||||
<p hidden>Athena may be completely or partially unavailable between 1900-2300 on 07/10/2022,
|
<p hidden>Athena may become unavailable for several hours on 07/03/2023
|
||||||
apologies for any inconvinience caused to you.</p>
|
during a server migration. Every effort will be made to prevend downtime.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2>Quick Links</h2>
|
<h2>Quick Links</h2>
|
||||||
<button class="actionbutton" onclick="gotoInfoBoard('bathspa')">BTH</button>
|
<button class="actionbutton" onclick="gotoInfoBoard('bathspa')">BTH</button>
|
||||||
@ -44,8 +45,8 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="text-description">
|
<div class="text-description">
|
||||||
<p>This is an Alpha release and is under testing.</p>
|
<p>Athena has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
|
||||||
<p>Some features may not work and some stations may not be available.</p>
|
<p>Athena will remain available for use as OwlBoard does not yet offer staff versions of boards.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
|
26
issue.php
26
issue.php
@ -41,29 +41,13 @@
|
|||||||
<!-- Main Content Begins -->
|
<!-- Main Content Begins -->
|
||||||
<?php require "./page-blocks/title-image.php";?>
|
<?php require "./page-blocks/title-image.php";?>
|
||||||
|
|
||||||
<h1>Please help us fix your issue</h1>
|
<h1>Athena is retiring</h1>
|
||||||
|
|
||||||
<p>Give as much detail as possible so we can try to fix the problem.</p>
|
<p>It has been replaced with <a href="https://owlboard.info">OwlBoard</a>.</p>
|
||||||
|
|
||||||
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
|
|
||||||
<span class="form-info">Subject:</span>
|
|
||||||
<br>
|
|
||||||
<input class="form-text-small" type="text" name="subject" placeholder="Subject" value="<?php echo $title;?>">
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<span class="form-info">Details:</span>
|
|
||||||
<br>
|
|
||||||
<textarea class="form-text-large" placeholder="Please give as much detail here as possible" name="detail"><?php echo $detail;?></textarea>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<input class="actionbutton" type="submit">
|
|
||||||
<br>
|
|
||||||
<div class="text-description">
|
|
||||||
<p>
|
<p>
|
||||||
On submission of this form, your browsers User Agent string will be
|
Currently, OwlBoard does not offer staff versions of departure boards.
|
||||||
collected alongside the information you provide above and will be
|
Because of this, Athena will not have any further issues fixed but will remain
|
||||||
posted to the <a class="inlinelink" href="https://git.fjla.uk/fred.boniface/athena.fb-infra.uk/issues?q=&state=open">
|
available until OwlBoard offers this feature.
|
||||||
issue tracker</a>.
|
|
||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
include("./php/LDBWS.php");
|
|
||||||
include("/srv/keys/athena/apiKeys.php");
|
|
||||||
$response = GetDepartureBoard(10,'BRI');
|
|
||||||
echo $response;
|
|
12
nginx.Dockerfile
Normal file
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/
|
3
php.Dockerfile
Normal file
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
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
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>
|
@ -5,15 +5,15 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
require './php/openLDBWS.php';
|
require './php/openLDBSVWS.php';
|
||||||
require './php/submitIssue.php';
|
require './php/submitIssue.php';
|
||||||
require '/srv/keys/athena/apiKeys.php';
|
require '/srv/php-keys/athena/gitea.php';
|
||||||
|
|
||||||
echo cleanInput($_SERVER['QUERY_STRING']);
|
echo cleanInput($_SERVER['QUERY_STRING']);
|
||||||
|
|
||||||
date_default_timezone_set("Europe/London");
|
date_default_timezone_set("Europe/London");
|
||||||
$OpenLDBWS = new OpenLDBWS($ldbKey);
|
$OpenLDBSVWS = new OpenLDBSVWS($ldbKey);
|
||||||
$response = $OpenLDBWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
|
$response = $OpenLDBSVWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True");
|
||||||
$template["header"] = "
|
$template["header"] = "
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
500
php/LDB-Tests/example_return.php
Normal file
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
3
php/LDB-Tests/test.php
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
phpinfo();
|
||||||
|
?>
|
341
php/openLDBSVWS.php
Normal file
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -1,2 +1,2 @@
|
|||||||
<?php
|
<?php
|
||||||
$athenaVersion = '1.0.0-devel';
|
$athenaVersion = '0.4.4-alpha';
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,21 +1,3 @@
|
|||||||
/* FONTS */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'firamono';
|
|
||||||
src: url('/styles/fonts/firamono/firamono-regular.woff2') format('woff2'),
|
|
||||||
url('/styles/fonts/firamono/firamono-regular.woff') format('woff'),
|
|
||||||
url('/styles/fonts/firamono/firamono-regular.ttf') format('truetype');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'firamono';
|
|
||||||
src: url('/styles/fonts/firamono/firemono-500.woff2') format('woff2'),
|
|
||||||
url('/styles/fonts/firamono/firemono-500.woff') format('woff'),
|
|
||||||
url('/styles/fonts/firamono/firemono-500.ttf') format('truetype');
|
|
||||||
font-weight: 500;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* COLOR VARS */
|
/* COLOR VARS */
|
||||||
:root {
|
:root {
|
||||||
--main-bg-color: #aac4ee;
|
--main-bg-color: #aac4ee;
|
||||||
@ -104,8 +86,6 @@ body {
|
|||||||
.actionbutton {
|
.actionbutton {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-family: 'firamono', monospace;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #3c78d8;
|
background-color: #3c78d8;
|
||||||
border: none;
|
border: none;
|
||||||
|
Reference in New Issue
Block a user