home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Japan / Fujitsu- / GJ / americas / austral / makesubsite < prev    next >
Encoding:
Text File  |  2017-09-21  |  13.5 KB  |  305 lines

  1. #!/usr/local/bin/perl
  2. #
  3. # CREATE FRAME PAGES, THE FILMSTRIP PAGES, AND THE CONTENT PAGES.
  4. #
  5. #
  6. use Guppy
  7. $Pwhere = "http://japan.park.org/Japan/Fujitsu/GJ";
  8. $Iwhere = "../../i";
  9. $usefolder = shift(ARGV);
  10. $readlist = shift(ARGV);
  11. $path = `pwd`;
  12.  
  13. system(clear);
  14.  
  15. unless ($Pwhere) {
  16.     print("The pdocs path has not been established. Please enter its value: ");
  17.     $Pwhere = <STDIN>;
  18.     chop $Pwhere;
  19. }
  20. unless ($Iwhere) {
  21.     print("The idocs path has not been established. Please enter its value: ");
  22.     $Iwhere = <STDIN>;
  23.     chop $Iwhere;
  24. }
  25. unless (-e "$path/$readfile") {
  26.     die ("Can't find readfile $readfile\n");
  27. }
  28.  
  29. print("Running with pdocs as $Pwhere\n\t and idocs as $Iwhere\n\n");
  30. print("\tIs this correct? (y/n) ");
  31. $ans = <STDIN>;
  32. unless ($ans =~ /y/) {
  33.     die ("\tOkay, then change it, buster!\n\n");
  34. }
  35.  
  36. &Include("$readlist");
  37.  
  38.  
  39. sub NAVLINE {
  40.     $Itemp = $Iwhere;
  41.     # print correct navline on each page, remember that different sections have different nav requirements.
  42.     my $now = shift;
  43.     my $locount = shift;
  44.     $Itemp = $Iwhere;
  45.     $Itemp = "../$Iwhere" if ($now eq "pix");
  46.     my $pageURL = $MachineURL.$StateURL;
  47.     $topP   = &Guppy::HtmlTarget("pix");
  48.     $topT   = &Guppy::HtmlTarget('_top');
  49.     $out = undef;
  50.     $out .= "<TABLE BORDER=0 WIDTH=60%>\n";
  51.     unless ($now eq "pix" || $now eq "anthro")  {
  52.         $out .= "<TR>\n<TD ALIGN=CENTER><img src=\"$Itemp/java/classes/images/lowerfiller.gif\" border=0 width=95 height=26></TD></TR>\n";
  53.     }
  54.     $out .= "<TR><TD ALIGN=CENTER VALIGN=TOP><TABLE BORDER=0><TR>\n";
  55.     if ($now eq "pix" || $now eq "anthro") {
  56.         $out .= "<TD ALIGN=CENTER VALIGN=TOP WIDTH=50%>\n";
  57.         $out .= "<applet codebase = \"$Itemp/java/classes/\" code=\"navIcon.class\" width=95 height=54>\n";
  58.         $out .= "<param name=image value = \"sekr\">\n";
  59.         $out .= "<param name=txt value = \"sekrtxt\">\n";
  60.         $out .= "<param name=bakg value = \"lowerfiller\">\n";
  61.         $out .= "<param name=xmin value = \"36\">\n";
  62.         $out .= "<param name=xmax value = \"72\">\n";
  63.         $out .= "<param name=ymin value = \"5\">\n";
  64.         $out .= "<param name=ymax value = \"36\">\n";
  65.         $out .= "<param name=xposimage value = \"0\">\n";
  66.         $out .= "<param name=xpostxt value = \"0\">\n";
  67.         $out .= "<param name=URL value = \"$Pwhere/americas/austral/$default\">\n";
  68.         $out .= "<param name=target value=\"_self\">\n";
  69.         $out .= "<A HREF = \"$Pwhere/americas/austral/$default\">\n";
  70.         $out .= "<img src=\"$Itemp/java/classes/images/sekr.gif\" border=0 width=95 height=26><br>\n";
  71.         $out .= "<img src=\"$Itemp/java/classes/images/sekrtxt.gif\" border=0 width=95 height=28></A>\n";
  72.         $out .= "<P></TD>\n";
  73.     }
  74.     if (($locations[$locount]{'anthro'}) && $now ne "anthro") {
  75.         my $anthro = $locations[$locount]{'anthro'};
  76.         $out .= "<TD ALIGN=CENTER VALIGN=TOP WIDTH=50%>\n";
  77.         $out .= "<center><applet codebase = \"$Itemp/java/classes/\" code=\"navIcon.class\" width=95 height=54>\n";
  78.         $out .= "<param name=image value = \"anthro\">\n";
  79.         $out .= "<param name=txt value = \"anthrotxt\">\n";
  80.         $out .= "<param name=bakg value = \"lowerfiller\">\n";
  81.         $out .= "<param name=xmin value = \"36\">\n";
  82.         $out .= "<param name=xmax value = \"72\">\n";
  83.         $out .= "<param name=ymin value = \"5\">\n";
  84.         $out .= "<param name=ymax value = \"36\">\n";
  85.         $out .= "<param name=xposimage value = \"0\">\n";
  86.         $out .= "<param name=xpostxt value = \"0\">\n";
  87.         $out .= "<param name=URL value = \"$Pwhere/americas/austral/$anthro\">\n";
  88.         $out .= "<param name=target value=\"_self\">\n";
  89.         $out .= "<A HREF = \"$Pwhere/americas/austral/$anthro\">\n";
  90.         $out .= "<img src=\"$Itemp/java/classes/images/anthro.gif\" border=0 width=95 height=26><br>\n";
  91.         $out .= "<img src=\"$Itemp/java/classes/images/anthrotxt.gif\" border=0 width=95 height=28></A></applet>\n";
  92.         $out .= "<P></TD>\n";
  93.     }
  94.     $out .= "</TR></TABLE></TD></TR><TR><TD VALIGN=TOP ALIGN=CENTER>\n<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR>\n";
  95.     $out .= "<TD ALIGN=CENTER><applet codebase = \"$Itemp/java/classes/\" code=\"navIcon.class\" width=95 height=54>\n";
  96.     $out .= "<param name=image value = \"intro\">\n";
  97.     $out .= "<param name=txt value = \"introtxt\">\n";
  98.     $out .= "<param name=bakg value = \"lowerfiller\">\n";
  99.     $out .= "<param name=xmin value = \"36\">\n";
  100.     $out .= "<param name=xmax value = \"72\">\n";
  101.     $out .= "<param name=ymin value = \"5\">\n";
  102.     $out .= "<param name=ymax value = \"36\">\n";
  103.     $out .= "<param name=xposimage value = \"0\">\n";
  104.     $out .= "<param name=xpostxt value = \"0\">\n";
  105.     $out .= "<param name=URL value = \"$Pwhere/intro.html\">\n";
  106.     $out .= "<param name=target value=\"_top\">\n";
  107.     $out .= "<A HREF = \"$Pwhere/intro.html\"  TARGET=\"_top\">\n";
  108.     $out .= "<img src=\"$Itemp/java/classes/images/intro.gif\" border=0 width=95 height=26><br>\n";
  109.     $out .= "<img src=\"$Itemp/java/classes/images/introtxt.gif\" border=0 width=95 height=28></A></applet></TD>\n";
  110.     
  111.     
  112.     $out .= "<TD ALIGN=CENTER><applet codebase = \"$Itemp/java/classes/\" code=\"navIcon.class\" width=95 height=54>\n";
  113.     $out .= "<param name=image value = \"home\">\n";
  114.     $out .= "<param name=txt value = \"hometxt\">\n";
  115.     $out .= "<param name=bakg value = \"lowerfiller\">\n";
  116.     $out .= "<param name=xmin value = \"36\">\n";
  117.     $out .= "<param name=xmax value = \"72\">\n";
  118.     $out .= "<param name=ymin value = \"5\">\n";
  119.     $out .= "<param name=ymax value = \"36\">\n";
  120.     $out .= "<param name=xposimage value = \"0\">\n";
  121.     $out .= "<param name=xpostxt value = \"0\">\n";
  122.     $out .= "<param name=URL value = \"$Pwhere/home.html\">\n";
  123.     $out .= "<param name=target value=\"_top\">\n";
  124.     $out .= "<A HREF = \"$Pwhere/home.html\"  TARGET=\"_top\">\n";
  125.     $out .= "<img src=\"$Itemp/java/classes/images/home.gif\" border=0 width=95 height=26><br>\n";
  126.     $out .= "<img src=\"$Itemp/java/classes/images/hometxt.gif\" border=0 width=95 height=28></A></applet></TD>\n";
  127.     
  128.  
  129.     $out .= "<TD ALIGN=CENTER><applet codebase = \"$Itemp/java/classes/\" code=\"navIcon.class\" width=95 height=54>\n";
  130.     $out .= "<param name=image value = \"sek\">\n";
  131.     $out .= "<param name=txt value = \"sektxt\">\n";
  132.     $out .= "<param name=bakg value = \"lowerfiller\">\n";
  133.     $out .= "<param name=xmin value = \"36\">\n";
  134.     $out .= "<param name=xmax value = \"72\">\n";
  135.     $out .= "<param name=ymin value = \"5\">\n";
  136.     $out .= "<param name=ymax value = \"36\">\n";
  137.     $out .= "<param name=xposimage value = \"0\">\n";
  138.     $out .= "<param name=xpostxt value = \"0\">\n";
  139.     $out .= "<param name=URL value = \"$Pwhere/sekino/\">\n";
  140.     $out .= "<param name=target value=\"_top\">\n";
  141.     $out .= "<A HREF = \"$Pwhere/sekino/\"  TARGET=\"_top\">\n";
  142.     $out .= "<img src=\"$Itemp/java/classes/images/sek.gif\" border=0 width=95 height=26><br>\n";
  143.     $out .= "<img src=\"$Itemp/java/classes/images/sektxt.gif\" border=0 width=95 height=28></A></applet></TD>\n";
  144.     
  145.  
  146.     $out .= "<TD ALIGN=CENTER><applet codebase = \"$Itemp/java/classes/\" code=\"navIcon.class\" width=95 height=54>\n";
  147.     $out .= "<param name=image value = \"amer\">\n";
  148.     $out .= "<param name=txt value = \"amertxt\">\n";
  149.     $out .= "<param name=bakg value = \"lowerfiller\">\n";
  150.     $out .= "<param name=xmin value = \"36\">\n";
  151.     $out .= "<param name=xmax value = \"72\">\n";
  152.     $out .= "<param name=ymin value = \"5\">\n";
  153.     $out .= "<param name=ymax value = \"36\">\n";
  154.     $out .= "<param name=xposimage value = \"0\">\n";
  155.     $out .= "<param name=xpostxt value = \"0\">\n";
  156.     $out .= "<param name=URL value = \"$Pwhere/americas/\">\n";
  157.     $out .= "<param name=target value=\"_top\">\n";
  158.     $out .= "<A HREF = \"$Pwhere/americas/\"  TARGET=\"_top\">\n";
  159.     $out .= "<img src=\"$Itemp/java/classes/images/amer.gif\" border=0 width=95 height=26><br>\n";
  160.     $out .= "<img src=\"$Itemp/java/classes/images/amertxt.gif\" border=0 width=95 height=28></A></applet></TD>\n";
  161.     $out .= "</TR><TR>\n";
  162.     $out .= "<TD ALIGN=CENTER><img src=\"$Itemp/java/classes/images/lowerfiller.gif\" border=0 width=95 height=26></TD>\n";
  163.     $out .= "</TR></TABLE></TD></TR></TABLE>\n";
  164.     $out;
  165. }
  166.  
  167. $count = 0;
  168. print ("Creating content pages...\n");
  169. while ($count<=$#descriptions) {
  170.     my $filename = $descriptions[$count]{'num'};
  171.     $filename .= ".html";
  172.     print ("\tWorking on page $filename...");
  173.     open (FILE, ">/home/aboveb/wex/sites/fujitsu/htdocs/GJ/americas/austral/pictures/$filename") || die("Can't open $filename for write.\n");
  174.     print FILE ("<HTML><HEAD><TITLE>The Great Journey: The Images</TITLE>\n</HEAD><BODY BGCOLOR=\"#000000\" TEXT=\"#FFFFFF\" LINK=\"#BB0000\" ALINK=\"#000000\" VLINK=\"#925656\">\n");
  175.     print FILE ("<CENTER><P><BR>\n");
  176.     if ($count<=26) {
  177.         $header = "PATAGONIA";
  178.         $locount = 0;
  179.     } elsif ($count<=39 && $count>26) {
  180.         $header = "THE SOUTHERN ANDES";
  181.         $locount = 1;
  182.     } elsif ($count<=65 && $count>39) {
  183.         $header = "THE BOLIVAIN ALTIPLANO";
  184.         $locount = 2;
  185.     } elsif ($count>65) {
  186.         $header = "THE PERUVIAN ANDES";
  187.         $locount = 3;
  188.     }
  189.     $default = $locations[$locount]{'default'};
  190.     print FILE ("$header\n<TABLE BORDER=0 HEIGHT=70%><TR><TD ALIGN=CENTER>\n");
  191.     my $image = $descriptions[$count]{'num'};
  192.     $image .= ".jpeg";
  193.     print FILE ("<IMG BORDER=0 HSPACE=0 SRC=\"../$Iwhere/americas/austral/pictures/$image\">\n<BR>\n");
  194.     my $text = $descriptions[$count]{'text'};
  195.     print FILE ("<FONT SIZE=-1>$text</FONT>\n");
  196.     print FILE ("</TD></TR></TABLE>\n");
  197.     print FILE (&NAVLINE("pix",$locount));
  198.     print FILE ("</CENTER><\BODY><\HTML>");
  199.     close (FILE);
  200.     print("\t$filename Done. Yipee!!!\n");
  201.     $count++;
  202. }
  203.  
  204. print("\nContent Pages Complete, Starting Filmstip Pages...\n\n");
  205.  
  206. $count = 0;
  207. while ($count<=$#locations) {
  208.     my $filename = $locations[$count]{'list'};
  209.     my $title = $locations[$count]{'gif'};
  210.     print("\tWorking on $filename...\n");
  211.     open (FILE, ">/home/aboveb/wex/sites/fujitsu/htdocs/GJ/americas/austral/$filename") || die("Can't open $filename for write.\n");
  212.     print FILE ("<HTML><HEAD><TITLE>The Great Journey: The Images</TITLE>\n</HEAD><BODY BGCOLOR=\"#000000\" TEXT=\"#FFFFFF\" LINK=\"#BB0000\" ALINK=\"#000000\" VLINK=\"#925656\">\n");
  213.     print FILE ("<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR>\n");
  214.     print FILE ("<TD VALIGN=TOP><img src=\"$Iwhere/americas/austral/$title\" border=0 alt=\"\" width=108 height=100></TD>\n");
  215.     $i = $locations[$count]{'start'};
  216.     while ($i<=($locations[$count]{'end'})) {
  217.         print FILE ("<TD VALIGN=TOP><a href=\"pictures/$i.html\" target=\"pix\"><img BORDER=0 ALIGN=LEFT HSPACE=0 src=\"$Iwhere/americas/austral/smallpix/$i.gif\" alt=\"\" width=108 height=100></a></TD>\n");
  218.         $i++;
  219.     }
  220.     print FILE ("<TD NOWRAP>more REPORTS....</TD>\n");
  221.     $more = 0;
  222.     while ($more<4) {
  223.         unless ($more == $count) {
  224.             $url = $locations[$more]{'url'};
  225.             $image = $locations[$more]{'image'};
  226.             print FILE ("<TD><a href=\"$url\" target=\"_top\"><img src=\"$Iwhere/americas/austral/$image\" border=0 alt=\"\" width=108 height=100></a></TD>\n");
  227.         }
  228.     $more++;
  229.     }
  230.     print FILE ("</TR></TABLE>\n<\BODY><\HTML>");
  231.     close (FILE);
  232.     print("\t$filename Done! I'm not dead yet... I'm getting better...\n");
  233.     $count++;
  234. }
  235.  
  236. print ("\nFilmstrip Pages Complete, Starting Frame Pages...\n\n");
  237.  
  238. $count = 0;
  239. while ($count<=$#locations) {
  240.     my $filename = $locations[$count]{'url'};
  241.     my $header = $locations[$count]{'name'};
  242.     print ("\tWorking on $filename...\n");
  243.     my $list = $locations[$count]{'list'};
  244.     my $default = $locations[$count]{'default'};
  245.     open (FILE, ">/home/aboveb/wex/sites/fujitsu/htdocs/GJ/americas/austral/$filename") || die("Can't open $filename for write.\n");
  246.     print FILE ("<HTML>\n<HEAD><TITLE>$header</TITLE></HEAD>\n<FRAMESET rows=\"*,120\">\n<FRAME NAME=\"pix\" MARGINWIDTH=0 MARGINHEIGHT=0 SRC=\"$default\">\n");
  247.     print FILE ("<FRAME NAME=\"list\" MARGINWIDTH=0 MARGINHEIGHT=0 noresize SRC=\"$list\">\n");
  248.     print FILE ("</FRAMESET></HTML>");
  249.     close (FILE);
  250.     $count++;
  251.     print("\t$filename Done. It's like there's a party in my mouth, and everyone's invited!!!\n");
  252. }
  253.  
  254. print ("\nFrame Pages Done, Starting Anthro Pages...\n\n");
  255.  
  256. $count = 0;
  257. while ($count<=$#locations) {
  258.     if ($locations[$count]{'anthro'}) {
  259.         my $filename = $locations[$count]{'anthro'};
  260.         my $header = $locations[$count]{'name'};
  261.         $default = $locations[$count]{'default'};
  262.         my $x = $count+1;
  263.         my $readfile = "anthro$x.html";
  264.         print ("\tWorking on $filename...\n");
  265.         open (FILE, ">/home/aboveb/wex/sites/fujitsu/htdocs/GJ/americas/austral/$filename") || die("Can't open $filename for write.\n");
  266.         open (READ, "/home/aboveb/wex/sites/fujitsu/pdocs/americas/reports/austral/$readfile") || die("Can't open $readfile for read.\n");
  267.         while ($line = <READ>) {
  268.             print FILE ("$line");
  269.         }
  270.         print FILE ("<CENTER>\n");
  271.         print FILE (&NAVLINE("anthro",$count));
  272.         print FILE ("</CENTER>\n</BODY></HTML>");
  273.         print("\t$filename Done... \'cause we are the champions of the world, my friend...\n");
  274.     }
  275.     $count++;
  276. }
  277.  
  278. print ("\nAnthro Pages Done, Starting Default Content Pages...\n\n");
  279.  
  280. $count = 0;
  281. while ($count<=$#locations) {
  282.     my $filename = $locations[$count]{'default'};
  283.     my $x = $count+1;
  284.     my $readfile = "section$x.eng";
  285.     print ("\tWorking on $filename...\n");
  286.     my $header = $locations[$count]{'name'};
  287.     open (FILE, ">/home/aboveb/wex/sites/fujitsu/htdocs/GJ/americas/austral/$filename") || die("Can't open $filename for write.\n");
  288.     open (READ, "/home/aboveb/wex/sites/fujitsu/pdocs/americas/reports/austral/$readfile") || die("Can't open $readfile for read.\n");
  289.     print FILE ("<HTML><HEAD><TITLE>The Great Journey: $header</TITLE>\n</HEAD><BODY BGCOLOR=\"#000000\" TEXT=\"#FFFFFF\" LINK=\"#BB0000\" ALINK=\"#000000\" VLINK=\"#925656\">\n");
  290.     print FILE (" <P><CENTER><FONT SIZE=+1>SEKINO'S REPORT</FONT></CENTER>\n<BLOCKQUOTE>");
  291.     while ($line = <READ>) {
  292.         print FILE ("$line");
  293.     }
  294.     print FILE ("<FONT SIZE=+1><CENTER>CLICK ON SLIDES</FONT>\n");
  295.     print FILE (&NAVLINE("def",$count));
  296.     print FILE ("</BLOCKQUOTE></CENTER>\n<\BODY><\HTML>");
  297.     close (FILE);
  298.     print("\t$filename Done. I can't believe it's not butter!\n");
  299.     $count++;
  300. }
  301.  
  302. print("\nDefault Content Pages Done.\n\nYou're finished, kido, I'm going to Disneyland!!!!!!\n\n\n");
  303.  
  304. exit(0);
  305.