#!/usr/bin/perl if (-f '/Beebrain/bin/flycgi/.rdstcnfg'){ @var=split(/,/,`/Beebrain/bin/flycgi/.rdstcnfg`) } else {die "ERROR: Config file not found"; } use CGI; $query = new CGI; $called = $ENV{"HTTP_REFERER"}; $test = $called; $title = "HTML PAGE"; #default $name = "Managers"; #default $location = "$var[10]"; $address = "$var[9]"; #default $comdir = "/Beebrain/bnchmrk/comments"; $look1 = "http://$var[1]"; $look2 = "/bin/flycgi/mfs/01"; $look3 = "http://$var[3]"; $look5 = "http://$var[1]"; $test = $called; $called=~ s/.\d\d\d#mfs//g; $called=~ s/.\d\d#mfs//g; $called=~ s/.\d#mfs//g; $called=~ s/$look2//; $called=~ s/$look1//; $called=~ s/$look3//; $called=~ s/$look5//; $called=~ s|http://web||g; $called=~ s|http://www.flybrain.org||g; #open(IN,"/Beebrain/bin/flycgi/a-log"); open(IN,"/Beebrain/bin/flycgi/a-log"); while() { @field = split; if( $field[0] eq $called ) { $callpath="$called"; #parse html for title open(IN2,"$called"); while() { if (($_=~ "/TITLE") || ($_=~ "/title")){ $_=~ s/\n*.*//; $_=~ s/<\/TITLE>*..*//; $_=~ s/\n*.*<title>//; $_=~ s/<\/title>*..*//; $title= "$_"; chop($title); }} open(IN3,"/Beebrain/bin/flycgi/group-log"); while(<IN3>) { @field3 = split; if(($field3[0] eq $field[6]) && ($field3[0] ne XXX)){ $name="$field3[1]"; $name=~ s/_/ /g; $location="$field3[3]"; $address="$field3[2]"; } } $called=~ s|/|_|g; $joind=join("",$comdir,$called); if ( -e $joind){ open(IN4,$joind); while($a=<IN4>) { push(@comments,$a); } } print $query->header; print <<'EOM' ; <HTML> <STYLE TYPE="text/css"> <!-- .button { color: #55111B; font-weight: bold; text-decoration: none } .button:link { color: #000000; font-weight: bold; text-decoration: none } .button:active { color: #FF0000; font-weight: bold; text-decoration: none } .button:visited { color: #55001D; font-weight: bold; text-decoration: none } .button:hover { color: #FFFF00; font-weight: bold; text-decoration: underline } --> </STYLE> <HEAD> <TITLE>Status Page

Beebrain Home

Atlas


   Help     Index     Where Am I?     Search     Page Status Contact Us 

Status Page

EOM print("Status information:
\n"); printf("%s (Accession #%s)
\n",$title,$field[1]); printf("Created on %s by %s.
\n",$field[5],$name); printf(" Email: %s
Location: %s
\n", $address, $location); if ($field[4] eq "g"){ printf("%s page is complete. \n",$title); } if ($field[4] eq "y"){ printf("%s page is in progress. \n",$title); } if ($field[4] eq "r"){ printf("%s page is temporarily disconnected. \n",$title); } print("


\n"); if ( -e $joind){ print("Comments follow:
\n"); for ($x = 0;$x < @comments; $x++){ printf("%s
\n",@comments[$x]); } print("


\n"); } printf("


\n",$var[1]); printf("Please enter your comments regarding %s for the managers of Beebrain in the space below:

\n", $title); print("

"); print("Please enter your e-mail address:

"); print("Please enter your name:

"); printf("

",$title); printf("

",$callpath); printf("

",@field[1]); print("

"); print("

"); print <<'EOM' ;

Beebrain : Documentation : Status Page

  EOM } }