64 lines
1.2 KiB
PHP
64 lines
1.2 KiB
PHP
<?php
|
||
|
||
error_reporting(0);
|
||
ini_set('display_errors', 'Off');
|
||
|
||
require('./main.php');
|
||
|
||
|
||
$ui;
|
||
|
||
// Display stop info board or search for stops
|
||
if (isset($_GET['h']) && $_GET['h']) {
|
||
$stop = $_GET['h'];
|
||
|
||
if (preg_match('/^\d{5,}$/', $stop) === 1) {
|
||
|
||
$ui = new StopInfoboard($stop);
|
||
|
||
} else {
|
||
|
||
$searchquery = new SearchQuery($stop, SEARCH_STOPS);
|
||
$searchresults = $searchquery->execute();
|
||
|
||
$ui = new ResultsInterface($stop, $searchresults);
|
||
|
||
}
|
||
|
||
}
|
||
|
||
// Display line info board or search for lines
|
||
/* elseif (isset($_GET['l'])) {
|
||
$lineRef = $_GET['l'];
|
||
|
||
$ui = new LineInfoboard($lineRef);
|
||
}*/
|
||
|
||
// Show search interface
|
||
else {
|
||
$ui = new SearchUI();
|
||
}
|
||
|
||
|
||
?>
|
||
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=240, initial-scale=1" />
|
||
<meta name="format-detection" content="telephone=no" />
|
||
<link rel="shortcut icon" href="img/favicon.ico" />
|
||
<title><?php $title = $ui->title(); if ($title) echo $title . ' – '; ?>De Lijn Reisinformatie lite</title>
|
||
<style>
|
||
@import url('css/main.css');
|
||
@import url('css/searchresults.css');
|
||
@import url('css/infoboards.css');
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<?php
|
||
$ui->display();
|
||
?>
|
||
</body>
|
||
</html>
|