#!/usr/bin/perl
# I wanted something VERY SIMPLE for generating an
# HTML calendar. I didn't want to wade through the interface
# for HTML::Calendar::Simple, or worry about Entities.
# This script looks at the time, backtracks to the first of
# the month, and then prints out an HTML calendar for this
# month. You can manipulate the month being printed by fiddling
# with the $now variable and you can put information into the
# calendar easily where commented.
# Oakbox Productions - Richard Still (oakbox)
use strict;
my $message; # variable to hold output
my $now = time;
my @wday = localtime($now);
my %dayrev = ( "0" => "Sun",
"1" => "Mon",
"2" => "Tue",
"3" => "Wed",
"4" => "Thu",
"5" => "Fri",
"6" => "Sat");
my %monrev = ( "0" => "Jan",
"1" => "Feb",
"2" => "Mar",
"3" => "Apr",
"4" => "May",
"5" => "Jun",
"6" => "Jul",
"7" => "Aug",
"8" => "Sep",
"9" => "Oct",
"10" => "Nov",
"11" => "Dec");
use Time::Local;
$message.=qq( $monrev{$wday[4]}
| $dayrev{0} | $dayrev{1} | $dayrev{2} | $dayrev{3} | $dayrev{4} | $dayrev{5} | $dayrev{6} |
| ); } }else{ $message.=qq( | ||||||
| $daycount
| \n);
if($ltime[6] eq "6"){ $message.=qq(||||||
| ); } } $message.=qq( |
$message
); print "Content-type: text/html\n\n"; print "$html_frame"; exit;