#!/usr/bin/perl
#
# Display a CGI password-entry textfield, then pass this to 
# server_shutdown.pl.
#
#--------------------

$query_string = $ENV{'QUERY_STRING'};
($fieldname, $port) = split(/=/, $query_string);

print "Content-type: text/html", "\n\n";

print "<title>BKGo Web System</title>";

print <<end_text;

<h2>BKGo Server Shutdown</h2>

In order to shutdown this server, you must prove you are an owner.

<p>
<ul>
<li>If the server has <i>never</i> been used by anyone, it doesn't yet
have an owner, and a password is not necessary.</li>
<li>Otherwise, please enter a server-owner's password below.</li>
</ul>

end_text

#-------------------- Display the CGI form.
#                     Be sure to use CGI "post" method, so the password 
#                      is never visible in the URL!
    
    print "<form action=\"shutdown_server.pl\" method=\"post\">";
print "Password: <input type=\"password\" name=\"passwd\" size=15>";
print "<input type=\"hidden\" name=\"prt\" value=\"".$port."\">";
print "<input type=\"submit\" value=\"Shutdown\"></form>";
    
