dl/htdocs/index.php

64 lines
1.3 KiB
PHP
Raw Normal View History

2020-06-17 18:49:28 +00:00
<?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();
}
2020-06-18 13:37:52 +00:00
?><!DOCTYPE html>
2020-06-17 18:49:28 +00:00
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=240, initial-scale=1" />
<meta name="format-detection" content="telephone=no" />
2020-06-18 13:37:52 +00:00
<link rel="shortcut icon" href="img/favicon.png" sizes="16x16" />
<link rel="shortcut icon" href="img/favicon-32.png" sizes="32x32" />
2020-06-17 18:49:28 +00:00
<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>