#!/usr/bin/perl
#
# join-form, a CGI
#    purpose:  to read several files from JGTEMP/port_no/remote_host:
#              join-object-1, parameters and from_loc
#              and display the contents of the first 2
#              then, to allow users to return to previous screen
#              by presenting a 'Cancel' button pointing to from_loc
#
# NB: this file belongs in the directory configured as ScriptAlias /jg/
#     on this HTTPD server.  (typically htmlbin or optbin)
#     Generated from a template by a makefile in the source tree
#  
#
do 'getfile1vars.pl';

  print "Content-type: text/html\n\n";
  print "<BODY BGCOLOR=\"ffffff\">\n";
#
# getfile1vars gets/sets these values from files in JGTEMP/port:
#   $object1
#   $dispobj
#   $dispss
#   $subsels
#   $refloc  myaddr /jg/otheropt
#
#
  if ($subsels eq "") {
    $display_full_object="$dispobj";
  } else {
    $display_full_object="$dispobj"."("."$dispss".")";
  }
  &print_top_frame;

################### print_top_frame
sub print_top_frame{

  $cancel_string="http://"."$refloc"."$dispobj"."?"."$subsels";
  print <<ENDOFSUB;
   <FORM METHOD="POST" ACTION="$cancel_string" TARGET="_top">
   <DL><DT><B><FONT SIZE="4">Join object:$display_full_object
   <DD>  with:  </FONT> 
    [ second object ] <FONT COLOR="FF0000">
        please choose from  
        below, by clicking on the hyperlinks</FONT><P>

      Or, you may choose to <FONT COLOR="0000FF">
            <INPUT ALIGN="right" TYPE="submit" VALUE="Cancel">
            </FONT>
   </B></DL>
   </FORM>\n

   </BODY>
   </HTML>
ENDOFSUB
}

