#!/usr/bin/perl use CGI::Carp 'fatalsToBrowser'; #### Background colors for your tables ########## $bg1 = "#320657"; $bg2 = "#C5D3E3"; $template = "template.html"; @insert = ""; read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); ($ENV{'REQUEST_METHOD'} =~ /get/i) and $forminfo = $ENV{'QUERY_STRING'}; @forminfo = split(/&/,$buffer); foreach $pair (@forminfo) { ($var, $value) = split(/=/,$pair); $value =~ s/%([a-fA-F\d][a-fA-F\d])/pack("C",hex($1))/eg; $value =~ s/\+/ /g; $forminfo{$var} = $value; } &date; if ($forminfo{'submit'} ne "") {&new_entry;} else {&display_journal;} ################################################# ################################################# ############ PRINT OUT TO BROWSER ############ ################################################# print "content-type: text/html\n\n"; open(TEMPLATE, "$template") or die "can't open $!"; local($/) = undef; $temp =