#! /srvtools/http/bin/perl
#############################################################################
#
#   Copyright 1995 by the Northeast Parallel Architectures Center at 
#   Syracuse University and Global Business Network, Inc..
#  
#   File:          Entry.pl
#
#   Authors:       Jungmin Kim and Paul Coddington (paulc@npac.syr.edu)
#
#   Created:       03/05/95
#
#   Input:         VOID
#   Output:        HTML text
#          
#
#   Description:   Initial interface page to WeBBoard.
#                  Create fill-out forms to get user name and password
#                   when it is required.
#               
#   Usage:         "http://.../WeBBoard/subdir"
#
#   Updates: 
#   July 10 1995 by PDC
#   - Added pointer to WeBBoard home page and copyright information.
#   - Revised interface.
#   - Enabled possibility of not allowing guests (need to add an extra
#     possibility "noguest" for $allow).
#
#
#############################################################################


sub Entry{
local($uid, $subdir) = @_;

print "Content-type\: text/html\n\n";
print "\n";
print "<TITLE> WebBoard - a Networked Discussion and Bulletin Board System</TITLE>\n";

    # Open file containing the title of this WeBBoard
    $titlefile = "$webboardhome/$subdir/$check/title.html";
    if ( open(INFILE, "< $titlefile") ) {
      while (<INFILE>) {
        $title = $_;
      }
      print "<H2> Welcome to the WebBoard for </H2>\n";
      print "<H1> $title </H1>\n";
    }
    else {
      print "<H1> Welcome to WebBoard </H1>\n";
    }

print "<HR><P>\n";
print "<A HREF=\"$homepage\">WebBoard</A> \n";
print "is a networked discussion and bulletin board system \n";
print "based on the World Wide Web.<P>\n";
print "<P>\n";
print "If you are an authorized forum participant, please \n";
print "enter your name and your authorization password. <P>\n";
if ($allow eq "no") {
  print "If you wish to enter a forum as a guest, type in \n";
  print "<tt>guest</tt> instead of your name. No password is needed. \n";
  print "Guests can read but not write information on the WebBoard. <P>\n";
}
print "<P>\n";
print "<HR>\n";
print "<P>\n";

# Form to enter username
print "<FORM METHOD=\"POST\" ACTION=\"$action\/$subdir\:check\">\n";
print "<UL>\n";
print "<LI>\n";
print "<b>Please type in your name </b>\: \n";
print "<INPUT SIZE=25 TYPE=\"text\" NAME=\"username\" VALUE=\"$uid\"><br>\n";
print "<LI>\n";
print "<b>Please type in your password </b>\: \n";
print "<INPUT TYPE=\"password\" SIZE=25 NAME=\"passwd\" VALUE=\"\">\n";
print "</UL>\n";
print "<P>\n";
print "and then click on the \n";
print "<INPUT TYPE=\"submit\" VALUE=\"SUBMIT\"> \n";
print "button to begin reading the WebBoard. ";
print "</FORM>\n";

# Help for this page
print "<P>\n";
print "<B><A HREF=\"$help/help-entry.html\">\n";
print "[GET HELP]</A></B>\n";
print "<P>\n";

# Address and copyright
print "<HR>\n";
Address();

}
1;

