#!/usr/local/bin/perl ###################################################################### # Initsiering ###################################################################### #require "/archive/httpd/cgi-bin/cgi-lib.pl"; require "/net/www/share/cgi-bin/cgi-lib.pl"; $DEBUG=0; # Initsiering av html-filen ###################################################################### print &PrintHeader; # Innlesing av variabler ###################################################################### &ReadParse;### Read the GET or POST data into %in if ($in{"DEBUG"}) { print "
\n
DEBUG INFORMATION\n\n"; print "ARGUMENTS:\n----------\n"; print "ARGC = '$#ARGV'\n"; foreach $e (@ARGV) { printf ("%-20s = \'%s\'\n", "ARGV", $e); } print "\nENVIRONMENT VARIABLES:\n----------------------\n"; foreach $key (sort keys(%ENV)) { printf ("%-20s = \'%s\'\n", $key, $ENV{$key}); } print "\nThe decoded arguments:\n----------------------\n"; foreach $key (sort keys(%in)) { printf ("%-20s = \'%s\'\n", $key, $in{$key}); } print "
\n
\n\n"; } # Slutt på innlesning av variabler. ###################################################################### # Do's and dont's ######################################################################## if (!($in{"navn"})) { print "

You must give me your name.

\n"; exit(0); #} elsif (!($in{"nasj"})) { # print "

You must give me your nationality.

\n"; # exit(0); } elsif (!($in{"affiliation"})) { print "

You must give me the name of your department.

\n"; exit(0); } elsif (!($in{"adresse"}) || !(($in{"adresse"}) =~ /..*\,..*/)) { print "

You must give me your address

\n"; print "

Write in your ordinary street address, use comma (,) to seperate"; print "each new line in the adress, eg: \n"; print "Veien 42, 9000 TROMSØ, NORWAY"; exit(0); } elsif (!($in{"telefon"})) { print "

You mus give your telephone number.

\n"; exit(0); } elsif (!($in{"e_post"})) { print "

You must give your e-mail address.

\n"; exit(0); } elsif (!($in{"e_post"} =~ /..*@.*\..*/)) { print "

\"$in{\"e_post\"}\" "; print "is definately NOT an email address!

\n"; exit(0); #} elsif (!($in{"ptittel"})) { # print "

You must give me the title of your project.

\n"; # exit(0); #} elsif (!($in{"start"})) { # print "

Give the start date of your project.

\n"; # exit(0); #} elsif (!($in{"duration"})) { # print "

How long do you expect the project to last?

\n"; # exit(0); #} elsif (!($in{"machmp"}) && !($in{"machsuncluster"})&& !($in{"machparagon"})&& !($in{"machparsytec"}) && !($in{"machdeccluster"})) { # print "

You must choose one or more machine resources.

\n"; # exit(0); } # Send beskjeden til webmaster. ######################################################################## $ADM="randi\@ii.uib.no"; #open(MAIL, "|cat > /tmp/mail") open(MAIL, "|/usr/lib/sendmail -t -feivind\@ii.uib.no") || die "Message not submitted, server error!\n"; print MAIL "From: webmaster\@ii.uib.no (WWW mail gateway)\n" ."Subject: Søknad om Parallab konto\n" ."To: randi\@ii.uib.no \n" ."Cc: eivind\@ii.uib.no \n"; $msg = ">From: $in{\"e_post\"} (WWW mail gateway)\n" ."Application for account on Origin 2000\n\n" ."Name..........: $in{\"navn\"}\n" ."Organization..: $in{\"organization\"} $in{\"other\"} \n" # ."NASJONALITET..: $in{\"nasj\"}\n" ."Position......: $in{\"position\"}\n" ."Advisor.......: $in{\"advisor\"}\n" ."Department....: $in{\"affiliation\"}\n" ."Adress........: $in{\"adresse\"}\n" ."Telephone.....: $in{\"telefon\"}\n" ."Fax...........: $in{\"fax\"}\n" ."TRP account...: $in{\"TRU\"}\n" ."Account.......: $in{\"account\"}\n" ."E-mail........: $in{\"e_post\"}\n\n" ."Type research.: $in{\"research\"} $in{\"re_other\"} \n\n"; # ."PROSJEKTTITTEL: $in{\"ptittel\"}\n\n" # ."Kort beskrivelse av prosjektet:\n\n$in{\"descr\"}\n\n" # ."Start dato....: $in{\"start\"}\n\n" # ."Forventet varighet: $in{\"duration\"}\n\n" # ."Prosjekt personell: (hver prosjekt medarbeider må har egen konto)\n\n" # ." NAVN STILLING TELEFON\n" # ." $in{\"personell\"}\n\n\n" # ." $in{\"navn1\"} $in{\"stilling1\"} $in{\"telefon1\"}\n" # ." $in{\"navn2\"} $in{\"stilling2\"} $in{\"telefon2\"}\n" # ." $in{\"navn3\"} $in{\"stilling3\"} $in{\"telefon3\"}\n" # ." RESSURSALLOKERING\n\n" # ."MASKINTILGANG:\n\n"; # $msg .= " MasPar MP2 (DECmpp Sx/200) "; # if ($in{"machmp"} ) { $msg .= "x" }; # $msg .= "\n"; # $msg .= " Sun beregningsklase "; # if ($in{"machsuncluster"} ) { $msg .= "x" }; # $msg .= "\n"; # $msg .= " Intel Paragon "; # if ($in{"machparagon"} ) { $msg .= "x" }; # $msg .= "\n"; # $msg .= " Parsytec GC Power Plus "; # if ($in{"machparsytec"} ) { $msg .= "x" }; # $msg .= "\n"; # $msg .= " DEC Alpha Cluster (EUROPORT) "; # if ($in{"machdeccluster"} ) { $msg .= "x" }; # $msg .= "\n\n\n"; # $msg .= "Underskrift/signature: ___________________________\n\n"; # $msg .= "Veileders underskrift/supervisors signature: ___________________________\n\n"; $msg .= "REMOTE_ADDR...: $ENV{\"REMOTE_ADDR\"}\n" ."REMOTE_HOST...: $ENV{\"REMOTE_HOST\"}\n" ."\n"; print MAIL "Your application has been received and will be procesed as soon as possible. If you allready have an account at Parallab you can continue using the same user id and password. You will be notified by email as soon as the account is ready. If you do not have an account at Parallab you will receive a snail mail giving your user id and password.\n" ." \n" .$msg; close(MAIL); #The following application is sent via WWW \nPlease sign and send by letter post or TELEFAX to:\n" ." \n" # ." Parallab sekretaer\n" # ." Universitetet i Bergen\n" # ." Institutt for Informatikk\n" # ." Hoeyteknologisenteret\n" # ." N-5020 Bergen\n" # ." FAX: +47 55 54 41 99\n" #." \n" #.$msg; #close(MAIL); # Fortell hva som ble sendt. ######################################################################## print "Your application has been received and will be procesed as soon as possible. If you allready have an account at Parallab you can continue using the same user id and password. You will be notified by email as soon as the account is ready. If you do not have an account at Parallab you will receive a snail mail giving your user id and password.\n" ." \n" ." \n"; # ."an e-mail version is sent by WWW to : -\n" # ."$ADM\n" #." \n" #." \n"; #if ( $in{"machparagon"} ) { #print "Researchers at Norwegian Universities must apply #for a CPU allocation from the super-computing board (TRU). #More information and application forms are available from # \"unni\@sima.sintef.no\". #Other applicants must contact para//ab #

#"; #} print "


\n" .$msg;