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

  1. #!/usr/local/bin/perl
  2.  
  3. # This script simply takes one argument, the name of the page
  4. # we are on, and return the correct menu bar, with simply one
  5. # less element in the client-side imagemap.
  6. # Currently it simply doesn't show the icon that is already selected
  7. # Later, it could be a Java applet that grays out the selected icon. :-)
  8.  
  9.  
  10. ####
  11.  
  12. %elements=("online","0,0,112,80","libretto","0,80,112,180","growth","0,180,112,268","onsite","0,268,112,346","home","0,346,112,464");
  13. $main_graphic= "/graphics/menus/main-long.gif";
  14.  
  15.  
  16. $frame_name="menu";
  17.  
  18. ####
  19.  
  20.  
  21.  
  22. do '/web-cgi-bin/cgi-hacks.pl';
  23. do '/web-cgi-bin/user-agent.pl';
  24.  
  25. &find_form_args("page");
  26.  
  27. print "Content-type: text/html\n";
  28. print "Window-target: $frame_name\n\n";
  29.  
  30. print "<HEAD><TITLE>Brain Opera Main Menu</TITLE></HEAD>\n";
  31. print "<BODY bgcolor=#000000 text=#ffffff link=#bbbbbb vlink=#bbbbbb>\n";
  32.  
  33. print " \n";
  34. print "<p>";
  35. print " \n";
  36. print "<p>";
  37. print " \n";
  38. print "<p>";
  39. print " \n";
  40. print "<p>";
  41.  
  42.  
  43. print "<img border=0 src=\"$main_graphic\" USEMAP=\"#menu-map\">\n";
  44. # $HTTP_REFERER=&get_http_referer();
  45. $HTTP_REFERER= "online/index.html";
  46. #print "<h5><a target=body href=\"/cgi-bin/credits.cgi?page=babyhead&referer=/$HTTP_REFERER\">Photo Credit</h5></a>";
  47. print "<MAP name=\"menu-map\">\n";
  48. foreach $ele (keys(%elements)) {
  49.  
  50. ## Here I have taken out the condition which cancels the mapping in case you're
  51. ## already on that page, just until I find a better scheme
  52.  
  53.     $destination="/$ele/main.html";
  54.     $target="body";
  55.  
  56.     if ($ele eq "home") {
  57.     $destination="/home.html";
  58.     $target="_top";
  59.     }
  60.  
  61.     if (1==1) {
  62.     print "<AREA target=$target SHAPE=\"Rect\" COORDS=\"$elements{$ele}\" HREF=\"$destination\">\n";
  63.     }
  64. }
  65.  
  66.  
  67. print"</MAP>\n";
  68.  
  69. print "</BODY>";
  70.  
  71.