head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2002.02.14.17.02.49; author rse; state dead; branches; next 1.2; 1.2 date 2002.02.14.16.48.12; author rse; state Exp; branches; next 1.1; 1.1 date 2002.02.13.16.34.56; author rse; state Exp; branches; next ; desc @@ 1.3 log @use new pkg_status @ text @## ## ossp_filelist.wml -- News Flash ## Copyright (c) 2000-2001 Ralf S. Engelschall ## # define a tag which can be used to create a file listing which # is optically more compact than the stuff Apache's mod_autoindex creates. # Especially the current version is marked red, too. <: my $url = ""; $url =~ s|/+$||sg; my $directory = ""; my $files = ""; my $highlight = ""; my $odir = chdir($directory) || die; my @@F = reverse sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($files)); chdir($odir); my $O = ''; @@COL = ( '#e5e5e0', 'NONE', ); $ncol = 1; foreach my $f (@@F) { my @@S = stat($f); $f = "$f/" if (-d $f); my @@T = localtime($S[9]); my @@moy = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); $f = "$f"; $ncol = ($ncol + 1) % 2; $col = $COL[$ncol]; my $e = ($col eq "NONE" ? "" : ""). "" . "" . "". ""; $O .= $e . "\n"; } print $O; :>
File BytesTimestamp
".$f."    ".$S[7]."  ".sprintf("%"."02d-%"."s-%"."04d", $T[3], $moy[$T[4]], 1900+$T[5]) . "
@ 1.2 log @new layout for filelist @ text @@ 1.1 log @Wohhoooo! First cut for our long awaited OSSP website... @ text @d14 5 a18 3
   Bytes      Timestamp       Filename
________ ____________________ ____________________________
d29 5
d41 7
a47 2
    my $e = sprintf("%"."8d %"."s %"."2d %"."02d:%"."02d:%"."02d %"."d %"."s",
                    $S[7], $moy[$T[4]], $T[3], $T[2], $T[1], $T[0], 1900+$T[5], $f);
d52 1
a52 1
@