<?php
$files = glob('data/*.{txt}', GLOB_BRACE);
echo "<h2>Please select your Spotrep map:</h2>";
	echo '<a href="map/?d='.str_replace("=", "", base64_encode("ALL")).'">ALL Data</a><br />';

foreach($files as $file) {
	echo '<a href="map/?d='.str_replace("=", "", base64_encode(str_replace(array("data/spotrep-", ".txt"), "", $file))).'">'.str_replace(array("data/spotrep-", ".txt"), "", $file).'</a><br />';
}

?>