#!/bin/perl # # GET /~wbc/tab-serv/tab-serv.cgi # # # the following few lines decide whether this is runnung on www or home # depending on the path to the location of the program # # use Cwd; # my $dir = getcwd; # ($a, $b) = split /\/wbc/, $dir , 2; # # $home = $a . "/wbc/"; # $home = "/net/syno-fs/wbc"; my $www = 0; my $home = 0; my $raddr = $ENV{'REMOTE_ADDR'}; my $laddr = $ENV{"SERVER_ADDR"}; my $local = 0; if ($raddr =~ /^104\.219/) { $local = 1;} if ($laddr eq "129.170.226.126") { $www = 1; } elsif ($laddr eq "129.170.136.10") { $www = 1; } elsif ($laddr eq "129.170.213.101") { $home = 1; } $www = 1; if ($home) { $server = "home.cs.dartmouth.edu"; $home = "/net/syno-fs/wbc"; $user = "wbc"; $test = 1; } elsif ($www) { $server = "www.cs.dartmouth.edu"; $home = "/home/wbc"; $user = "d14708a"; $test = 0; } else { print "Content-type: text/html\n\n"; print "
How do I print this music? | "; print "What program typeset this music? | |
"; print "How do I read this stuff?"; print " | "; print "the Lute Page"; print " "; print "Tablature page | "; if ($test) { print "|
The test option uses the development version of tab. | ||
program $0 | $raddr | $a |
remote $raddr | local $laddr |
${sname} | "; if ($local) { print " eps or";} if ($www ||$home) {print " pdf\n";} if ($test) { print " or pdf file download\n"; } if ( ! $lockret) { if ( 1 ) { print " or midi\n"; } if ( 1 ) { print " or tab source\n"; } } if ($test) { print " or test\n"; } print " | \n"; print " | $mytime |
$name/${sname}";
print " text\n";
}
elsif (index($_, ".pdf") > 0) { #do nothing for pdf
;
}
elsif ( isdir( "$source/$name/$_" ) ) {
$sname = $_;
# print "$sname open folder | |
login is $< $> $$"; print "
Please contact me about any corrections you may wish to make"; print "
Back to Tablature page
\n";
}
else { # top level, no argument or filename supplied
open ( FFF, "ls -1 $source/ |") || die "
File list open error
/n";
while (