Narbacular Drop Level Downloads
A convenient list of all the published maps on this server
function sort_by_mtime($file1,$file2) {
$file_name_without_extension1 = substr($file1, 0, -5);
$file_name_without_extension2 = substr($file2, 0, -5);
$time1 = filemtime($file_name_without_extension1);
$time2 = filemtime($file_name_without_extension2);
if ($time1 == $time2) {
return 0;
}
return ($time1 < $time2) ? 1 : -1;
}
function globr($sDir, $sPattern, $nFlags = NULL)
{
$sDir = escapeshellcmd($sDir);
$aFiles = glob("$sDir/$sPattern", $nFlags);
foreach (glob("$sDir/*", GLOB_ONLYDIR) as $sSubDir)
{
$aSubFiles = globr($sSubDir, $sPattern, $nFlags);
$aFiles = array_merge($aFiles, $aSubFiles);
}
return $aFiles;
}
$dir_to_scan_for_stuff = "..";
// http://php.net/[whatever] will look up a function (such as glob)
$list_of_matching_files = globr($dir_to_scan_for_stuff, "*.info");
usort($list_of_matching_files, "sort_by_mtime");
?>
$on_the_left = true;
foreach ($list_of_matching_files as $one_file) {
$file_name_without_dir = basename($one_file);
$file_name_without_extension = substr($one_file, 0, -5);
$file_name_only = basename($file_name_without_extension);
$info_file_contents = file_get_contents($one_file);
$last_modified = filemtime($file_name_without_extension);
// echo the output to browser
echo "" . date("dS F, Y", $last_modified) . " ";
}
?>