#!/usr/local/bin/perl -wT ######################################################################### # Setup Variables Below ######################################################################### $title = "Bill Stephenson"; ######################################################################### # End Logon Setup ######################################################################### ######################################################################### # Load Modules and Libraries ######################################################################### #use lib "/Library/WebServer/CGI-Executables/Tickets"; use lib "/usr/local/etc/httpd/cgi-bin/perlhelp"; use CGI; require "LogOn.pl"; require "LogOn_setup.pl"; # Create a new CGI object. $query = new CGI; ######################################################################### # Authenicate the User ######################################################################### # Check to see if the user has clicked the "Log_Off" button. # If they have not, set the $authenicate variable to "no" # and require them to go through the "logOn" subroutine. # # If they did click the "Log_Off" button then send them to # the "Log_Off" subroutine. my ($authenticate); $authenticate = $query->param('authenticate'); if (!defined ($authenticate)) {$authenticate = "no";} if ($authenticate eq "Log_Off"){ &logOff; &goodbye_page; } else { &logOn(); } ######################################################################### # Start the main app here ######################################################################### my ($bgcolor); $bgcolor = $query->param('bgcolor'); if (!defined ($bgcolor)) {$bgcolor = "White";} print $query->start_html(-title=>"$title", -meta=>{'keywords'=>'Bill, Background, Page', 'copyright'=>'copyright 2001 Bill'}, -BGCOLOR=>"$bgcolor"); print $query->startform; print "You Passed and get a Cookie.
"; print "your color is $bgcolor.
"; print $query->submit('authenticate','Log_Off'),"
"; print $query->submit('action','Continue'),"
"; print $query->radio_group(-name=>'bgcolor', -values=>[Blue,Red,White], -default=>'White'); print $query->endform; print $query->end_html; exit; sub goodbye_page { print $query->start_html("$title Logon Page"); print $query->startform; print "You Logged Off. Click Log_On to Continue
"; print $query->submit('authenticate','Log_On'); print $query->endform; print $query->end_html; exit; }