#! /usr/local/bin/perl5 # HTTP cookie cutter # JRH 12/18/95 $| = 1; # script for meeting room cookies $CgiPath = '/stage/htdocs/cgi-bin/Japan/Theme'; push(@INC, "$CgiPath"); require 'jcode.pl'; # tends to be in /usr/local/lib/perl require 'read-form.pl'; # tends to be in your cgi path require 'meetinit.pl'; $ThisFile = '/stage/htdocs/cgi-bin/Japan/Theme/checkin.cgi'; $ExpDate = ''; $ExpTime = 0; $CookiePath = '/'; $ParkName = ''; # print "Content-type: text/html\n\n"; # &get_referer; &read_in_data; &log_user; &return_data; ######################################################################### # sub get_referer { # $Referer = $ENV{'HTTP_REFERER'}; # } sub read_in_data { # read in submitted form data contents into the hash %FormDataHash &ReadInFormData(\%FormDataHash); foreach $Key (keys(%FormDataHash)) { $FieldValue = $FormDataHash{$Key}; &jcode::convert(*FieldValue, 'jis'); $FormDataHash{$Key} = $FieldValue; } $UserName = $FormDataHash{'your_name'}; $LocName = $FormDataHash{'your_location'}; $ParkName = $FormDataHash{'park'}; $Referer = $FormDataHash{'referer'}; } sub log_user { open (TEXT,">> $ThemePath/logs/checkin\.log"); select (TEXT); print "$UserName : $LocName : ".gmtime(time)." GMT\n"; select (STDOUT); close (TEXT); } sub return_data { print "Set-Cookie: NAME=$UserName\; domain=$CookieDomain\; path=$CookiePath\;\n"; print "Set-Cookie: LOCATION=$LocName\; domain=$CookieDomain\; path=$CookiePath\;\n"; # print "Set-Cookie: NAME=$UserName\;\n"; # print "Set-Cookie: LOCATION=$LocName\;\n"; if ($ParkName ne '') { print "Location: $Referer\n"; print "Content-type: text/html\n\n"; print "Redirect

Redirect

"; } else { print "Location: $Referer\n"; print "Content-type: text/html\n\n"; print "Redirect

Back To Home Page

"; } }