From: minima Date: Thu, 14 Jun 2001 20:20:23 +0000 (+0000) Subject: add Ian's perl script for the java applet X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ab00eab43d570c3fd50a3faf58b0031aaa1712a;p=spider.git add Ian's perl script for the java applet --- diff --git a/Changes b/Changes index 798a2909..b878a70f 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ 14Jun01======================================================================= 1. changed debug api to (potentially) use less cpu time +2. changed the spider.cgi in Arnold's borrowed java client to Ian's perl +script 13Jun01======================================================================= 1. fix init cnd rinit cmds 2. add missing clear/route cmd diff --git a/spider-web/spider.cgi b/spider-web/spider.cgi index b9b3a259..8f104ce9 100755 --- a/spider-web/spider.cgi +++ b/spider-web/spider.cgi @@ -1,79 +1,91 @@ -#! /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 "Spider DX Cluster" -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 "
" - echo "Welcome to the Spider DX Cluster" - echo "" - echo ${clustercall} - echo "" - echo "

 

" - echo '
' - echo "Your Call Please: " - 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.1 beta. 20010610. + +# Work out the hostname of this server. +use Sys::Hostname; +my $HOSTNAME = hostname(); + +# Set the hostname manually here if the above fails. +# $HOSTNAME = "gb7mbc.spoo.org" ; +$PORT = "8000" ; + +# 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}); +@call = split (/=/, $post_data) ; + +# Print the page header. + +print <<'EOF'; + + + + + Cluster Web - DX Cluster Web Interface. + + + + + + + +

+
+ +
Cluster Web - DX Cluster Web Interface.

+EOF + + print("Welcome to $HOSTNAME
") ; + +print <<'EOF'; +
+
+

+ +
+ +
+EOF + +if($ENV{CONTENT_LENGTH} > 0) + { + # Callsign is set - print the whole stuff.... + # print("Callsign is $call[1]
\n") ; + + print("
\n") ; + print(" \n") ; + print(" \n") ; + print(" \n") ; + print(" \n") ; + print(" \n") ; + print("
\n") ; + } else - echo "" > ${tempfile}${call}.html - echo "" >> ${tempfile}${call}.html - echo "" >> ${tempfile}${call}.html - echo "" >> ${tempfile}${call}.html - echo '' >> ${tempdir}${call}.html - echo '' >> ${tempdir}${call}.html - echo '' >> ${tempdir}${call}.html - echo "" >> ${tempdir}${call}.html - echo "" >> ${tempdir}${call}.html - echo "" >> ${tempdir}${call}.html - GOTO='' - echo ${GOTO} - -fi - 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'; +
+ + Please enter your callsign:
+
+ + +
+EOF + } + +print <<'EOF'; +
+ +
+Spider Homepage. + + +EOF