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.2 beta. 20020519.
9 # Work out the hostname of this server.
11 my $HOSTNAME = hostname();
13 # Please note that the HOSTNAME MUST be resolvable from the user end. Otherwise the
14 # web interface will NOT work.
15 # Uncomment and set the hostname manually here if the above fails.
16 # $HOSTNAME = "gb7mbc.spoo.org" ;
20 # Send text/html header to the browser.
21 print "Content-type: text/html\n\n";
23 # Get the parameters passed to the script.
24 read (STDIN, $post_data, $ENV{CONTENT_LENGTH});
26 $callstart = index($post_data, "=") + 1 ;
27 $callend = index($post_data, "&") ;
29 $call = substr($post_data, $callstart, $callend - $callstart),
30 $password = substr($post_data, index($post_data, "=", $callend) + 1, length($post_data)) ;
32 # Print the page header.
33 #print("Callsign : $call") ;
34 #print("Password : $password") ;
37 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
40 <TITLE>Cluster Web - DX Cluster Web Interface.</TITLE>
41 <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
42 <META NAME="Author" CONTENT="Ian Norton.">
43 <META NAME="DESCRIPTION" CONTENT="DX Cluster web interface">
46 <BODY BGCOLOR="#FFFFFF" LINK="#008080" ALINK="#000099" VLINK="#000099">
50 <FONT FACE="arial, helvicta" COLOR="#008080" SIZE=+2>
51 <B><BR>Cluster Web - DX Cluster Web Interface.</B><BR>
54 print("Welcome to $NODECALL<BR>") ;
66 if($ENV{CONTENT_LENGTH} > 0)
68 # Callsign is set - print the whole <APPLET> stuff....
69 # print("Callsign is $call<BR>\n") ;
72 print(" <APPLET CODE=\"spiderclient.class\" CODEBASE=\"/client/\" width=800 height=130>\n") ;
73 print(" <PARAM NAME=\"CALL\" VALUE=\"$call\">\n") ;
74 print(" <PARAM NAME=\"PASSWORD\" VALUE=\"$password\">\n") ;
75 print(" <PARAM NAME=\"HOSTNAME\" VALUE=\"$HOSTNAME\">\n") ;
76 print(" <PARAM NAME=\"PORT\" VALUE=\"$PORT\">\n") ;
77 print(" <PARAM NAME=\"NODECALL\" VALUE=\"$NODECALL\">\n") ;
78 print(" </APPLET>\n") ;
79 print("</CENTER>\n") ;
83 # Callsign isn't set - print the login page.
87 <STRONG>Please enter your callsign: </STRONG><BR>
88 <INPUT name="call" size=10><BR>
89 <STRONG>Please enter your password: </STRONG><BR>
90 <INPUT name="password" size=10 TYPE=PASSWORD><BR>
91 <INPUT type=submit value="Click here to Login">
93 <BR>If you do not have a password set - don't enter one :)
102 <A HREF="http://www.dxcluster.org/">Spider Homepage</A>.