#!/usr/bin/perl # cluster-web.pl - perl login script for cluster web interface. # @author Ian Norton # - Based on clx-web by DL6DBH (ftp://clx.muc.de/pub/clx/clx-java_10130001.tgz) # - Modified by PA4AB # @version 0.2 beta. 20020519. # Work out the hostname of this server. use Sys::Hostname; my $HOSTNAME = hostname(); # Please note that the HOSTNAME MUST be resolvable from the user end. Otherwise the # web interface will NOT work. # Uncomment and set the hostname manually here if the above fails. # $HOSTNAME = "gb7mbc.spoo.org" ; $PORT = "8000" ; $NODECALL = "XX0XX" ; # Send text/html header to the browser. print "Content-type: text/html\n\n"; # Get the parameters passed to the script. read (STDIN, $post_data, $ENV{CONTENT_LENGTH}); $callstart = index($post_data, "=") + 1 ; $callend = index($post_data, "&") ; $call = substr($post_data, $callstart, $callend - $callstart), $password = substr($post_data, index($post_data, "=", $callend) + 1, length($post_data)) ; # Print the page header. #print("Callsign : $call") ; #print("Password : $password") ; print <<'EOF'; Cluster Web - DX Cluster Web Interface.


Cluster Web - DX Cluster Web Interface.

EOF print("Welcome to $NODECALL
") ; print <<'EOF';



EOF if($ENV{CONTENT_LENGTH} > 0) { # Callsign is set - print the whole stuff.... # print("Callsign is $call
\n") ; print("
\n") ; print(" \n") ; print(" \n") ; print(" \n") ; print(" \n") ; print(" \n") ; print(" \n") ; print(" \n") ; print("
\n") ; } else { # Callsign isn't set - print the login page. print <<'EOF';
Please enter your callsign:

Please enter your password:


If you do not have a password set - don't enter one :)
EOF } print <<'EOF';
Spider Homepage. EOF