3 # cluster-web.pl - perl login script for cluster web interface.
5 # - Based on clx-web by DL6DBH (ftp://clx.muc.de/pub/clx/clx-java_10130001.tgz)
7 # @version 0.1 beta. 20010610.
9 # Work out the hostname of this server.
11 my $HOSTNAME = hostname();
13 # Set the hostname manually here if the above fails.
14 # $HOSTNAME = "gb7mbc.spoo.org" ;
17 # Send text/html header to the browser.
18 print "Content-type: text/html\n\n";
20 # Get the parameters passed to the script.
21 read (STDIN, $post_data, $ENV{CONTENT_LENGTH});
23 $callstart = index($post_data, "=") + 1 ;
24 $callend = index($post_data, "&") ;
26 $call = substr($post_data, $callstart, $callend - $callstart),
27 $password = substr($post_data, index($post_data, "=", $callend) + 1, length($post_data)) ;
29 # Print the page header.
30 #print("Callsign : $call") ;
31 #print("Password : $password") ;
34 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
37 <TITLE>Cluster Web - DX Cluster Web Interface.</TITLE>
38 <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
39 <META NAME="Author" CONTENT="Ian Norton.">
40 <META NAME="DESCRIPTION" CONTENT="DX Cluster web interface">
43 <BODY BGCOLOR="#FFFFFF" LINK="#008080" ALINK="#000099" VLINK="#000099">
47 <FONT FACE="arial, helvicta" COLOR="#008080" SIZE=+2>
48 <B><BR>Cluster Web - DX Cluster Web Interface.</B><BR>
51 print("Welcome to $HOSTNAME<BR>") ;
63 if($ENV{CONTENT_LENGTH} > 0)
65 # Callsign is set - print the whole <APPLET> stuff....
66 # print("Callsign is $call<BR>\n") ;
69 print(" <APPLET CODE=\"spiderclient.class\" CODEBASE=\"/client/\" width=800 height=130>\n") ;
70 print(" <PARAM NAME=\"CALL\" VALUE=\"$call\">\n") ;
71 print(" <PARAM NAME=\"PASSWORD\" VALUE=\"$password\">\n") ;
72 print(" <PARAM NAME=\"HOSTNAME\" VALUE=\"$HOSTNAME\">\n") ;
73 print(" <PARAM NAME=\"PORT\" VALUE=\"$PORT\">\n") ;
74 print(" </APPLET>\n") ;
75 print("</CENTER>\n") ;
79 # Callsign isn't set - print the login page.
83 <STRONG>Please enter your callsign: </STRONG><BR>
84 <INPUT name="call" size=10><BR>
85 <STRONG>Please enter your password: </STRONG><BR>
86 <INPUT name="password" size=10 TYPE=PASSWORD><BR>
87 <INPUT type=submit value="Click here to Login">
97 <A HREF="http://www.dxcluster.org/">Spider Homepage</A>.