Display all the routes in a table.

This commit is contained in:
George Kaklamanos 2015-07-16 14:15:26 +03:00
parent 13d26994f8
commit 3034497a81

44
Routes.php Normal file
View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>uBus - Routes</title>
<?php include 'head.php'; ?>
</head>
<body>
<?php include 'nav.php'; ?>
<h1>Routes</h1>
<p>This is a table of all the routes. Click on a route's name to see a list of
its bus stops and the position of the bus on the map. Click on a line number
to see a list of routes that have this line number</p>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Line #</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<?php
include 'libdata.php';
foreach ($routes as $route){
echo '<tr>';
echo '<td><a href="ShowLine.php?line=' . $route['line'] . '">' . $route['line'] . '</a></td>';
echo '<td><a href="ShowRoute.php?route=' . $route['id'] . '">' . $route['name'] . '</a></td>';
echo '</tr>';
}
?>
</tbody>
</table>
<?php include 'foot.php'; ?>
</body>
</html