#!/usr/local/bin/perl print "Content-type: text/html\n\n"; use CGI::Carp qw(fatalsToBrowser); #use strict; use CGI; my $q = new CGI; my ($month, $num, @data, $date, $hours, $name, $member, $member1); my $ttlevnts = 0; my $name1 = $q->param("name"); my %ttlhrs = ("bottum", 0, "budrow", 0, "captan", 0, "hughes", 0, "marchand", 0, "medina", 0, "newbrough", 0, "rico", 0, "shelton", 0, "sweredoski", 0, "tryon", 0, "werner", 0, "williamspearce", 0); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); my @members = ("bottum", "budrow", "captan", "hughes", "marchand", "medina", "newbrough", "rico", "shelton", "sweredoski", "tryon", "werner", "williamspearce"); my $month1 = $mon+1; my $year1 = $year+1900; my $date1 = "$month1\/$mday\/$year1"; my %hoursWorked; open(DATA, "/host/n/b/p/p/o/r/nbpdexplorers.port5.com/cgi-bin/data2.txt") or die "Cannot open database file: $!"; while () { chomp($_); @data = split(/\+/, $_); $month = shift(@data); $hours = pop(@data); $ttlevnts++; foreach $name (@data) { $hoursWorked{$month}{$name} += $hours; } } close(DATA); for my $month1 (keys %ttlhrs) { $total{$_} += $ttlhrs{$month1}{$_} for keys %{$ttlhrs{$month1}}; } print $q->start_html( -title => "Hours Worked Status", -bgcolor => "white", -base => true, -xbase => "http://nbpdexplorers.port5.com/" ), $q->br; print "
"; print $q->h1("Hours Worked Status"), $q->br, $q->h3("Today's Date: $date1"), $q->br, $q->h3("Total Event(s): $ttlevnts"); print "\n"; print "\n"; print "\n"; foreach $member (@members) { $member1 = ucfirst($member); #### } print "
JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberTotal Hours

Back To Administrative Options

\n"; print "

\n";