#! /srvtools/http/bin/perl
#############################################################################
#  
#   File:         GetName.pl
#
#   Author:       Jungmin Kim
#
#   Created:      03/30/95
#   Modified: 
#   Version: 
#
#   Description:  Subroutines of Change.pl to modify password file
#
#############################################################################


sub GetName{
    local($user, $subdir) = @_;
    local($titlefile, $title);

    # Open file containing the title of this WeBBoard
    $titlefile = "$webboardhome/$subdir/$check/title.html";
    if ( open(INFILE, "< $titlefile") ) {
      while (<INFILE>) {
        $title = $_;
      }


    print "Content-type\: text/html\n\n";
    print "\n";
    print "<HTML>\n";
    print "<TITLE> WebBoard New User </TITLE>\n";
    print "<CENTER>\n";
      print "<H2> Welcome to the WebBoard for <BR>\n";
      print "$title </H2>\n";
    print "</CENTER>\n";
    }
    else {
      print "<H1> Welcome to WebBoard </H1>\n";
    }
    print "<HR>\n";
    print "Please register your e-mail address with WebBoard. \n";
    print "Your name and e-mail address will be appended to any messages you post. \n";
    print "Your e-mail address will be stored so you will not need to \n";
    print "enter it again the next time you use WebBoard.\n";
    print "<HR>\n";

    print "<FORM METHOD=\"POST\" ACTION=\"$action\/$subdir\:save\">\n";
    print "Your Name\: \n";
    print "<INPUT SIZE=32 NAME=\"newuser\" VALUE=\"$user\"><P>\n";
    if ($user eq "administrator") {
      print "Enter the <B>PASSWORD</B>\: \n";
      print "<INPUT TYPE=\"password\" SIZE=25 ";
      print "NAME=\"newpasswd\" VALUE=\"\"><br>\n";
    }
    print "Enter your e-mail address\: \n";
    print "<INPUT SIZE=32 NAME=\"email\" VALUE=\"\"><P>\n";
    print "Click on the ";
    print "<INPUT TYPE=\"submit\" VALUE=\"SUBMIT\">\n";
    print "button to submit this information. ";
    print "</FORM>\n";
    print "<P>\n";
    print "<HR>\n";
    print "If you are not a new user of WebBoard, and have just entered your \n";
    print "name incorrectly, <BR>\n";
    print "you can <B><A HREF=\"$action\">\n";
    print "return to the WebBoard home page</A></B> and enter your name again.\n";
    print "<P>\n";

# Address and copyright
Address();
    
}
1;
