Added a header with the id/name of the stop/route/line the page is talking about.
This commit is contained in:
parent
a830d412d8
commit
9f674c505a
3 changed files with 6 additions and 3 deletions
|
@ -18,6 +18,7 @@ on the map.</p>
|
|||
include 'libdata.php';
|
||||
|
||||
if (isValidLine($_GET["line"])){
|
||||
echo '<header><h1>Line ' . $_GET["line"] . '</h1></header>';
|
||||
PrintRoutes($_GET["line"]);
|
||||
} else {
|
||||
echo '<span style="display:inline-block" class="alert alert-danger" role="alert">No such line. <a href="javascript:history.back()">Go back?</a></span>';
|
||||
|
|
|
@ -17,8 +17,9 @@ and view its position on a map.</p>
|
|||
<?php
|
||||
include 'libdata.php';
|
||||
|
||||
if (isValidRoute($_GET["route"])){
|
||||
$route = getRouteInfo($_GET["route"]);
|
||||
if (isValidRoute($_GET['route'])){
|
||||
$route = getRouteInfo($_GET['route']);
|
||||
echo '<header><h1>' . $route['line'] . ' - ' . $route['name'] . '</h1></header>';
|
||||
PrintStops($route,'go');
|
||||
PrintStops($route,'come');
|
||||
} else {
|
||||
|
|
|
@ -20,8 +20,9 @@ is also a map showing the location of the requested stop.</p>
|
|||
include 'libdata.php';
|
||||
|
||||
if (isValidStop($_GET["stop"])){
|
||||
PrintRoutes($_GET["stop"]);
|
||||
$stop=getStopInfo($_GET["stop"]);
|
||||
echo '<header><h1>' . $stop['id'] . ' - ' . $stop['name'] . '</h1></header>';
|
||||
PrintRoutes($_GET["stop"]);
|
||||
ShowMap($stop['lat'],$stop['lon']);
|
||||
} else {
|
||||
echo '<span style="display:inline-block" class="alert alert-danger" role="alert">No such stop. <a href="javascript:history.back()">Go back?</a></span>';
|
||||
|
|
Reference in a new issue