#!/usr/bin/perl -w use CGI qw(:standard -debug); use CGI::Pretty ":standard"; use CGI::Carp qw(fatalsToBrowser); ########### Credits ################# # Script written by R. Todd Vandenbark ##################################### #----------- define variables ---------- my $orgname; # Greek organization name my $contact; # contact name my $cphone; # contact phone my $contem; # contact email my $inputfile='../org.txt'; # file containing org info my @orglist=""; # list of Greek organizations my $key; # item in array # ---- read input file ------ open (IN, "$inputfile") || die "Can't open $inputfile: $!\n"; @orglist = ; close IN; # ---- start selection form ---- $method = 'post'; $action = 'orgreport2.cgi'; $encoding = 'application/x-www-form-urlencoded'; my $css = ''; my $title = 'Report by organization'; $logo = ''; $subtitle = 'Select: '; print header(); print start_html(-title => $title, -head => $css, -class => 'oneColFixCtrHdr'); print '
' . "\n"; print '
'; print startform($method,$action,$encoding); print qq{

$subtitle

' . "\n"; print '

'; print reset; print '   '; print submit(-name=>'submit', -value=>'Create report'); print end_form(); print <

Report a problem.
Main menu. Help function EOF print '
'. ''. '
'; print end_html; #------------------------------------- # get timestamp #------------------------------------- # arg1 = epoch time # r.v. = ("MM-DD-YY","HH:MN:SS") #------------------------------------- sub datetime { my($time)=@_; my ($ss,$mn,$hh,$dd,$mm,$yy,$wkd,$yrd,$isdl) = localtime($time); # month goes from 0 to 11 $mm= $mm+1; # convert to 4 digit year my $yy2= $yy+1900; # put leading zeros foreach ($ss,$mn,$hh,$dd,$mm) { $_= sprintf("%02d",$_); } return ("$yy2-$mm-$dd","$hh:$mn:$ss"); }