X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=spider-web%2Fspider.cgi;h=09ca06532ebaff61e64c7c621960e9786e2fdfc1;hb=41f5538eb0eadf4daf02c5ca45b75f0dc79ca628;hp=b9b3a2595a488b37997c3029b5e4a9608dbe822d;hpb=f319bf06d72d135e7ec14ff8b27627187f5e2595;p=spider.git diff --git a/spider-web/spider.cgi b/spider-web/spider.cgi index b9b3a259..09ca0653 100755 --- a/spider-web/spider.cgi +++ b/spider-web/spider.cgi @@ -1,79 +1,105 @@ -#! /bin/sh -# -################################################### -# -# Edit the following lines -# -# -portnumber=$"1407" -tempdir=$"/usr/local/httpd/spider/client/" -clustercall=$"PA4AB-15" -# -# -# -# End of configurable part -# -#################################################### -hostname=$"localhost" - -echo "Content-type: text/html" -echo -echo "
" -echo "" - -pattern=$(echo ${QUERY_STRING} | sed -e s,'call=',, | sed -e s/"&passwd="/" "/) -call=$(echo $pattern | cut -d' ' -f1) -passwd=$(echo $pattern | cut -s -d' ' -f2) - - -if [ ${call} = ""] ; then - echo "" - echo "" - -# all *.html tempory files remove older than 10 min -# -cd ${tempdir} -files=$(find *.html -mmin +10) -rm ${files} + { + # Callsign isn't set - print the login page. + print <<'EOF'; +
" - echo "" - echo "Welcome to the Spider DX Cluster" - echo "" - echo ${clustercall} - echo "" - echo " " - echo "" - echo '
" +#!/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