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 / pp_chat_log.cgi < prev    next >
Text File  |  2017-09-21  |  2KB  |  80 lines

  1. #!/usr/local/bin/perl
  2.  
  3. $| = 1;
  4.  
  5. # script for meeting room
  6.  
  7. # jrh
  8. $CgiPath      = '/stage/htdocs/cgi-bin/Japan/Theme';
  9. push(@INC, "$CgiPath");
  10. require 'jcode.pl'; # tends to be in /usr/local/lib/perl
  11. require 'read-form.pl'; # tends to be in your cgi path
  12. require 'meetinit.pl';
  13.  
  14. $ThisFile = '/stage/htdocs/cgi-bin/Japan/Theme/pp_chat_log.cgi';
  15.  
  16. # print "Content-type: text/html\n\n";
  17.  
  18. &init_dbm;
  19. &print_frame;
  20. &close_dbm;
  21.  
  22. #########################################################################
  23.  
  24.  
  25.  
  26.  
  27. sub init_dbm {
  28.     
  29.     $TextPath = "$ThemeDBMPath/$PPName/$TextLocation";
  30.     dbmopen(%TextDB,$TextPath,0666);
  31.  
  32. }
  33.  
  34. sub numerically { $a <=> $b; }
  35.  
  36. sub print_frame {
  37.     select(STDOUT);
  38.     print "Content-type: text/html\n\n";
  39.  
  40.     print '
  41.         <HEAD><TITLE>"sensorium" Pocket park</TITLE></HEAD>
  42.         <BODY BGCOLOR=#ffffcc>
  43.     <FONT SIZE=2><i>10 Most-Recent Messages</I></FONT><P>
  44.         ';
  45.     print "<TABLE>\n";
  46.  
  47.     #foreach $Key (sort numerically(keys(%TextDB))) {
  48.     foreach $Key (0..10) {
  49.         ($Name, $Date, $Text) = split(/ : /, $TextDB{$Key});
  50.         print "<TR><TD WIDTH=\"150\" VALIGN=\"top\">$Name";
  51.         print "<BR>";
  52.         print "<I><FONT SIZE=\"1\">$Date</FONT></I></TD>";
  53.         print "<TD>$Text</TD></TR>\n";
  54.     }
  55.  
  56.     print '</TABLE><P><BR>
  57.         <FONT SIZE=2><I>Frame out....</I></FONT><P>
  58.  
  59.         <HR>
  60.         <ADDRESS><CENTER>
  61.         <FONT SIZE="2">
  62.         Theme pavilion "sensorium" </FONT>
  63.         <FONT SIZE="1">(<A HREF="http://park.org/Japan/Theme/index.html" TARGET="_top">
  64.          sensorium home page</a>)<br>
  65.         INTERNET 1996 WORLD EXPOSITION (<A HREF="http://park.org/main.text.html" TARGET="_top">
  66.          World Public Park</A>) / JAPAN
  67.          (<A HREF="http://park.org/Japan/" TARGET="_top"> Japan EXPO home page</A>)</FONT>
  68.         </CENTER></ADDRESS>
  69.         </HTML>
  70.         ';
  71. }
  72.  
  73.  
  74. sub close_dbm {
  75.  
  76.     dbmclose(%TextDB);
  77.  
  78. }
  79.  
  80.