5 use CGI qw/:html *table *Tr *center/;
10 opendir(D,'.') || die "cannot open current directory: $!";
11 while (my $de=readdir(D)) {
12 next if ($de =~/^\./);
14 if ($de =~ /^\d\d\d\d$/) {
38 print start_html(-title=>'Gallery'),"\n";
39 print start_center,"\n";
40 print h1("Gallery Index"),"\n";
41 print start_table({-cellspacing=>3}),"\n";
42 foreach my $yr(sort @years) {
44 print td({-bgcolor=>"#ffc0ff"},$yr);
45 for (my $mo=1;$mo<=12;$mo++) {
46 my $dir=sprintf "%04d/%02d",$yr,$mo;
48 print td({-bgcolor=>"#ffffc0"},a({-href=>$dir.'/'},$mn[$mo]));
50 print td({-bgcolor=>"#c0c0c0"},$mn[$mo]);
55 print end_table,p,"\n";
57 print start_table({-cellspacing=>3}),"\n";
58 foreach my $sub(sort @subdirs) {
59 print Tr(td({-bgcolor=>"#ffffc0"},a({-href=>$sub.'/'},$sub)));
63 print end_center,"\n";