#!/usr/local/bin/perl # Enters entries in a simple directory keyed data base. # Version 1.0 # # A.C. Saulys # Brookhaven National Lab # # read(STDIN,$input,$ENV{'CONTENT_LENGTH'}); # $unline = `/usr/local/etc/httpd/support/unescape "$input"`; # # split appart the fields ($in2name,$in2institute) = split(/&/,$unline); ($lname,$inname) = split(/=/,$in2name); ($linstitute,$ininstitute) = split(/=/,$in2institute); # $basedir = "/star/starlib/doc/www/sss/soc/"; #$basedir = "/star/u2/saulys/WWW/tpcgas/"; $slash ="/"; $dot ="."; $com = ","; $dir = $basedir.$slash $ninst = "institutions"; $instit = $ninst.$slash.$ininstitute.$com.$inname; $v = "view"; $pl = ".pl"; print "Content-type: text/html\n\n"; print "\n"; print "Skill of the Craft Training \n"; print "\n"; #DEBUG #print $input, "\n" ; print "

Skill of the Craft Training has been completed by:

\n"; # print $inaction,"name= .",$inname,".
\n"; if($inname eq '' || $ininstitute =~ m!Select!) {print "The name or institution field cannot be blank
\n";} unless($inname eq '' || $ininstitute =~ m!Select!) { $newent = $instit; $syscall = system (touch, $newent); if($syscall != 0) {print "Cannot enter name $inname
\n" || die} print "$inname from $ininstitute has completed the training
\n"; } print "\n";