#!/usr/bin/perl -w #--------------------------------------------------------------- # Study Log: Continue Studying CGI # By Crystal White # April 26, 2009 # Task: # -deletes cookie # Input: cookie # Output: loutout page, deletes cookie #--------------------------------------------------------------- use CGI qw(:standard -debug); use CGI::Carp qw(fatalsToBrowser); # HTML form $form1= "http://studylog.firesidelibrarian.com/studentid.html"; # Set stylesheet $css = ''; # ---- delete cookie and page time out-------------------- # $delcookie1 = cookie(-name=>'studylog_username',-value=>'0',-expires=>'-1h'); $delcookie2 = cookie(-name=>'studylog_passwd',-value=>'0',-expires=>'-1h'); $jscript = 'function jumptostart () ' . "\n" . 'window.location = "../studentid.html"' . "\n" . '}' . "\n"; $function = "setTimeout('jumptostart()', 5000)"; #Print HTML for Student Log Main Menu print header(-cookie=>[$delcookie1, $delcookie2]); print start_html(-title=>"Logged Out", -head=>$css, -script=>$jscript, -onLoad=>"$function" ); print h1("Logged Out"); print "\n"; print qq|Back to Main Login|; print "\n"; print ''. "\n" . ''. "\n" . '' . "\n"; print end_html();