package SPA_JeopardyForm;
use strict;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use HTML::Entities;
$SIG{CHLD} = 'IGNORE';
$main::cgi = new CGI; # to take advantage of the "param" decoding method
my %States;
my $Current_Screen;
%States = (
'Default' => \&SPA_JeopardyForm::input_page,
'Submit' => \&SPA_JeopardyForm::submission_result_page
);
$Current_Screen = param(".State") || "Default";
die "No screen for $Current_Screen" unless $States{$Current_Screen};
!>
2002 Winter Meeting
Pediatric Anesthesiology 2002
March 7-10, 2002
Fontainebleau Hilton Resort
Miami Beach, Florida
;
print start_form();
while (my($screen_name, $function) = each %States) {
$function->($screen_name eq $Current_Screen);
}
print end_form();
!>
Meeting Table of Contents
;
sub input_page {
my $active = shift;
return unless $active;
!>
Submit Jeopardy Questions
In order to allow the Jeopardy faculty at Pediatric Anesthesiology 2002
to prepare more
comprehensive answers to your most important questions, we offer you the
option to submit
them via the SPA website in advance of the meeting. We hope this will
elevate the caliber
of discussion at the new "evidence-based" Jeopardy format.
Of course, we will still have on-site capability to submit questions as
well.
Your contributions are really what continue to make this meeting so
lively and valuable for
us all. Fill out the form below to send us a question.
Reminder: Hotel cut-off is February 5. Registration fees increase
February 8. On-line registration is available.
my $referer = referer();
print hidden('referer', $referer);
}
sub submission_result_page {
my $active = shift;
return unless $active;
my $sender = 0;
my $subject = 0;
if (param('message')) {
my $recipient = "spa\@societyhq.com";
$sender = "SPA Jeopardy Question CGI ";
my $buffer = 0;
$buffer = param('message');
$buffer .= "\n\nReferrer: " . param('referer');
$buffer .= "\nPosting host: " . remote_host();
$buffer .= "\nUser agent: " . user_agent();
open (MAIL, "|/usr/lib/sendmail -oi -t") or die "can't fork sendmail: $!";
print MAIL "From: $sender
To: $recipient
Subject: SPA Jeopardy Questions
";
print MAIL $buffer;
close (MAIL);
//!>
Jeopardy Question Submission Form
Your question:
-
print encode_entities(param('message')) !>
has been submitted.
} else {
//!>
Contact Form
Jeopardy Question Submission Form
You are trying to submit an empty message. Please go back and correct this.
}
}
sub to_page { submit(-NAME => ".State", -VALUE => shift) }
!>