error_reporting(E_ALL & ~E_NOTICE);
// Set an explicit referrer policy to limit referrer headers, but also
// override some browser privacy measures that drop all referrer headers,
// which makes OSM unhappy: https://wiki.openstreetmap.org/wiki/Referer
header("Referrer-Policy: strict-origin-when-cross-origin");
if (isset($_GET['page'])) {
echo file_get_contents('pages/'.$_GET['page']);
exit;
}
$dataSelection = '';
if (isset($_GET['layer'])) {
$layer = $_GET['layer'];
switch($layer) {
case 'hittekaart':
if (isset($_GET['start']) && $_GET['start']) $dataSelection.= ($dataSelection?'&':'?').'start='.urldecode($_GET['start']);
if (isset($_GET['end']) && $_GET['end']) $dataSelection.= ($dataSelection?'&':'?').'end='.urldecode($_GET['end']);
if(isset($_GET['ids']) && $_GET['ids']) $dataSelection.= ($dataSelection?'&':'?').'ids='.preg_replace_callback('/(\d+)-(\d+)/', function($m) { return implode(',', range($m[1], $m[2]));}, urldecode($_GET['ids']));
break;
}
}
$ploc = 'Amf';
$reinit = 0;
if (isset($_GET['loc'])) {
$ploc = $_GET['loc'];
if (isset($_GET['reinit'])) {
$reinit = $_GET['reinit'];
$reinit = round($reinit);
if ($reinit < 0) $reinit = 0;
}
}
#printf("ploc=%s\treinit=%s
\n", $ploc, $reinit);
?>