#!/usr/bin/perl -w # # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is Mozilla Leak-o-Matic. # # The Initial Developer of the Original Code is Netscape # Communications Corp. Portions created by Netscape Communucations # Corp. are Copyright (C) 1999 Netscape Communications Corp. All # Rights Reserved. # # Contributor(s): # Chris Waterson # # $Id: logs.cgi,v 1.6 1999/11/17 22:19:07 leaf%mozilla.org Exp $ # # # ``Front door'' script that shows all of the logs that are # available for perusal # use 5.004; use strict; use CGI; use POSIX; $::query = new CGI(); $::logdir = $::query->param('logdir'); $::logdir = 'data' unless $::logdir; # default is 'data' subdir print $::query->header; print $::query->start_html("Leak-o-Matic"); print qq{
mozilla.org

Leak-o-Matic

Welcome to the Marvelous Leak-o-Matic. Listed below are the leak logs that are currently available for your perusal.

}; # ``ls'' the directory, ``-1r'' returns it sorted by name, reversed, so # the most recent logs will be at the top. ZIP: foreach (qx/ls -1r $::logdir\/*.zip/) { chomp; next ZIP unless (/(\d\d\d\d)(\d\d)(\d\d)/); my ($year, $month, $day) = ($1, $2, $3); print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; } print qq{
Leak-o-Matic Logs
$month/$day/$yearLeaksBloat Log

For more information on how to use the Leak-o-Matic, see the instructions.

}; print '$Id: logs.cgi,v 1.6 1999/11/17 22:19:07 leaf%mozilla.org Exp $'; print $::query->end_html;