3 foreach (glob("$Page$Args/2*") as $url) {
4 $parts = pathinfo($url);
5 @list ($date, $suffix) = explode('.', $parts['filename'], 2);
6 $cal[$date][ $suffix ? '' : @$parts['extension'] ] =
7 preg_replace('/\.html$/', '', $url);
11 if (count($cal) > 5) print ' class="cols"';
13 foreach (array_reverse($cal) as $title => $versions) {
15 if ($url = @$versions['html']) {
16 printf('<a href="/%s">%s</a>', $url, $title);
18 elseif (implode('', array_keys($versions))) {
19 list ($format, $url) = each($versions);
20 include_once('format.inc.php');
21 printf('%s (<a href="/%s">%sB %s</a>)',
22 $title, $url, showsize(filesize($url)), $format