read())) { if ($fileName == "." || $fileName == "..") { continue; } $p = $d->path . '/' . $fileName; if (!is_dir($p . '/html/')) { continue; } if (is_dir($p)) { $c = substr($fileName,0, 1); if ($datesOnly) { // if ( !is_numeric($c) ) { // $c == '0' || $c == '1') { if ($c != '0' && $c != '1') { continue; } $t1 = explode('-', $fileName); $year = $t1[2]; if ( isset($retVal[$year]) ) { $a = $retVal[$year]; } else { $a = Array(); } // printf("Year '%s'\n", $year); $a[$fileName] = $fileName; $retVal[$year] = $a; } else { if ( is_numeric($c) ) { continue; } $retVal[$fileName] = array($fileName); } } } $d->close(); // arsort($retVal); krsort($retVal); while (list ($key, $a1) = each($retVal)) { // arsort($a1); krsort($a1); $retVal[$key] = $a1; } reset($retVal); return $retVal; } function buildDateSelection($sPath = ".") { $files = getDirDateArray($sPath); printf("\n"); } function buildSpecialEventSelection($sPath = ".") { $files = getDirDateArray($sPath, false); printf("\n"); } function displayArray($sPath = ".", $html = 'true', $datesOnly = 'true') { $files = getDirDateArray($sPath, $datesOnly); while (list ($key, $name) = each($files)) { while (list ($key1, $name1) = each($name)) { if ($html) { printf("%s%s\n", $name1, $key); } else { printf("value='%s' key='%s'\n", $name1, $key); } } } } ?>