home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / cgi-bin / Japan / Theme / checkin.cgi < prev    next >
Text File  |  2017-09-21  |  2KB  |  97 lines

  1. #! /usr/local/bin/perl5
  2.  
  3. # HTTP cookie cutter
  4. # JRH 12/18/95
  5.  
  6. $| = 1;
  7. # script for meeting room cookies
  8.  
  9. $CgiPath      = '/stage/htdocs/cgi-bin/Japan/Theme';
  10. push(@INC, "$CgiPath");
  11. require 'jcode.pl'; # tends to be in /usr/local/lib/perl
  12. require 'read-form.pl'; # tends to be in your cgi path
  13. require 'meetinit.pl';
  14.  
  15. $ThisFile = '/stage/htdocs/cgi-bin/Japan/Theme/checkin.cgi';
  16. $ExpDate = '';
  17. $ExpTime = 0;
  18. $CookiePath = '/';
  19. $ParkName = '';
  20. # print "Content-type: text/html\n\n";
  21.  
  22. # &get_referer;
  23. &read_in_data;
  24. &log_user;
  25. &return_data;
  26.  
  27. #########################################################################
  28.  
  29. # sub get_referer {
  30.  
  31. #   $Referer = $ENV{'HTTP_REFERER'};
  32. # }
  33.  
  34.  
  35. sub read_in_data {
  36.  
  37. # read in submitted form data contents into the hash %FormDataHash
  38. &ReadInFormData(\%FormDataHash);
  39.  
  40. foreach $Key (keys(%FormDataHash)) {
  41.  
  42.   $FieldValue = $FormDataHash{$Key};
  43.  
  44.   &jcode::convert(*FieldValue, 'jis');
  45.  
  46.   $FormDataHash{$Key} = $FieldValue;
  47. }
  48.  
  49.  
  50. $UserName = $FormDataHash{'your_name'};
  51. $LocName = $FormDataHash{'your_location'};
  52. $ParkName = $FormDataHash{'park'};
  53. $Referer = $FormDataHash{'referer'};
  54.  
  55. }
  56.  
  57. sub log_user {
  58.  
  59.   open (TEXT,">> $ThemePath/logs/checkin\.log");
  60.   select (TEXT);
  61.   print "$UserName : $LocName : ".gmtime(time)." GMT\n";
  62.   select (STDOUT);
  63.   close (TEXT);
  64. }
  65.  
  66. sub return_data {
  67.  
  68.   print "Set-Cookie: NAME=$UserName\; domain=$CookieDomain\; path=$CookiePath\;\n";
  69.   print "Set-Cookie: LOCATION=$LocName\; domain=$CookieDomain\; path=$CookiePath\;\n";
  70. #  print "Set-Cookie: NAME=$UserName\;\n";
  71. #  print "Set-Cookie: LOCATION=$LocName\;\n";
  72.   if ($ParkName ne '') {
  73.  
  74.     print "Location: $Referer\n";
  75.     print "Content-type: text/html\n\n";
  76.     print "<HTML><HEAD><TITLE>Redirect</TITLE></HEAD><BODY><H1>Redirect</H1></BODY></HTML>";
  77.   }
  78.   else {
  79.     print "Location: $Referer\n";
  80.     print "Content-type: text/html\n\n";
  81.     print "<HTML><HEAD><TITLE>Redirect</TITLE></HEAD><BODY><H1><A HREF=\"$ThemeSite$ThemeURL/index.html\">Back To Home Page</A></H1></BODY></HTML>";
  82.   }
  83.  
  84. }
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.