#!/usr/local/bin/perl

#
#Container for page's parts.
#

$path="/home/yourid/public_html/store";

%filez=();
%fileztoday=();

$tot=0;
($csec,$cmin,$chour,$cmday,$cmon,$cyear,$cwday,$cyday,$cisdst) =localtime(time);
$cyear=$cyear+1900;
$cmon=$cmon+1;


open(INF,"< $path/downloadz.inf");
while (<INF>){
	$item=$_;
	if($item=~/(\w+.\w+)(\d+\/\d+)([^\s]*?)/gi){
		$filez{$1}++;
		print "so\n";
		print "$2\n";
		$tot++;				
	};

};
close(INF);
print "Content-type: text/html\n\n";
print "<html>\n <head>\n";
print "  <title>Downloadz stat</title>\n";
print " </head>\n <body>\n";
print " <table border=1>\n";

while ( ($key, $value) = each %filez) {
        print "<tr><td>$key</td><td>$value</td></tr>\n";
    }

print qq~<tr><td bgcolor=#DDDDDD>Total:</td><td bgcolor=#DDDDDD>$tot</td></tr>\n~;
print "</table></body></html>";

exit;                 

