read())) { if ($f == "." || $f == "..") { continue; } $p = $d->path . '/' . $f; if (!is_dir($p . '/html/')) { continue; } if (is_dir($p)) { $c = substr($f,0, 1); if ($datesOnly) { if ($c != '0' && $c != '1') { continue; } $t1 = explode('-', $f); $year = $t1[2]; $a = $retVal[$year]; $a[$f] = $f; $retVal[$year] = $a; } else { if ($c == '0' || $c == '1') { continue; } $retVal[$f] = array($f); } } } $d->close(); arsort($retVal); while (list ($key, $a1) = each($retVal)) { arsort($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); } } } } ?>