Update of /cvsroot/woc/woc/cgi-bin/cache/dadml
In directory usw-pr-cvs1:/tmp/cvs-serv10119/cache/dadml
Added Files:
list_content.pl
Log Message:
Added HTPLP dir (and a bit more).
--- NEW FILE: list_content.pl ---
#!/usr/local/bin/perl -w
use strict;
use diagnostics;
print "Content-type: text/html\n\n";
my $cachedir = "/tmp/woc/dadml-cache";
my @files = <$cachedir/*>;
print "<b>Cache bevat " . scalar(@files) . " items.</b>$/";
if (scalar(@files) > 0) {
print " <table>$/";
print " <tr><th>CAS-nummer</th><th>Leeftijd</th></tr>$/";
foreach my $file (@files) {
my $age = -M $file;
$age =~ s/(\d*)\.\d*/$1/;
if ($age eq "0") {
$age = "<1 dag"
} elsif ($age eq "1") {
$age .= " dag";
} else {
$age .= " dagen";
};
$file =~ s/.*NUMBER(.*)/$1/;
print " <tr>$/";
print " <td>$file</td>$/";
print " <td>" . $age . "</td>$/";
print " </tr>$/";
}
print " </table>$/";
}
1;
|