#!/usr/bin/perl #Edited by AGB 7/27/2000 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"}; $alevel = $query->param('level'); if (!defined $alevel){ $alevel = 2; } if (($alevel < 1)||($alevel > 9)){ $alevel = 1; } #header print $query->header; #CHANGED 2/18 print <<'EOM' ; Beebrain Index

Beebrain Home

Index


   Help     Index     Where Am I?     Search     Page Status Contact Us 

EOM #end header #Added 2/18 printf("
"); # printf("Controls:\"Contract ",($alevel-1)); #Added 2/18 printf("Detail level: $alevel "); # printf("\"Expand
",($alevel+1)); #Added 2/18 printf("

"); # open(ININDEX,"/Beebrain/bin/flycgi/index.file"); while($REF= ) { if ($REF =~ "##"){ $REF =~s|#||g; print ("$REF
\n"); } @index = split /,/, $REF; $index[0] =~ s|\s||g; if ($alevel >= $index[1]){ if ($index[0] =~ m|[#][/]Beebrain|){ $passed=$index[0]; $passed =~ s|#||g; $field[4] = ""; $field[1] = ""; &write_line; } else { open(IN,"/Beebrain/bin/flycgi/a-log"); while() { @field = split; if ($index[0] eq $field[1]){ if (($field[4] !~ r) &&(index($field[1],"+") == -1)){ #parse html for title $passed=$field[0]; &write_line; }} } } #end else } #end if } print("

\n"); printf("
"); printf("Controls: \"Contract ",($alevel-1)); printf("Detail level: $alevel "); printf("\"Expand
",($alevel+1)); printf("
"); print("


\n"); sub write_line { open(IN2,"$passed"); while() { if (($_=~ "/TITLE") || ($_=~ "/title") || ($_=~ "/Title")){ $_=~ s/\n*.*//; $_=~ s/<\/TITLE>*..*//; $_=~ s/\n*.*<title>//; $_=~ s/<\/title>*..*//; $_=~ s/\n*.*<Title>//; $_=~ s/<\/Title>*..*//; $title= "$_"; print("<NOBR>"); for ($x = 0;$x < $index[1]; $x++){ printf("<img src=\"/Beebrain/html/gifs/space.gif\" width =40> "); } if ($field[4] eq g){ $statustoken="<img src=\"/Beebrain/html/gifs/ball_grn.gif\"> "; } else { $statustoken="<img src=\"/Beebrain/html/gifs/ball_ylw.gif\"> "; } if ($field[1] ne ""){ printf("<font size=-1>%s <A HREF=\"%s\">%s<\/a> (%s) </NOBR></font><BR>\n", $statustoken, $passed, $title, $field[1] ); } else { printf("<font size=-1>%s <A HREF=\"%s\">%s<\/a> </NOBR></font><BR>\n", $statustoken, $passed, $title ); } close(IN2); } } } print <<'EOM' ; <font size=-1> Status codes:<BR> <img src="/Beebrain/html/gifs/space.gif" width =40> <IMG Align=Bottom SRC="/Beebrain/html/gifs/ball_rd.gif" ALT="-disconnected-"> Section temporarily disconnected<br> <img src="/Beebrain/html/gifs/space.gif" width =40> <IMG Align=Button SRC="/Beebrain/html/gifs/ball_ylw.gif" ALT="-development-"> Section under development<br> <img src="/Beebrain/html/gifs/space.gif" width =40> <IMG Align=Bottom SRC="/Beebrain/html/gifs/ball_grn.gif" ALT="-completed-"> Section completed<br> </font> <P> <TABLE WIDTH=100% BGCOLOR=DDBB66><TR><TD ALIGN=center><FONT SIZE=-1><A HREF="/Beebrain/html/index.html" CLASS="button">Beebrain</A> <A HREF="/Beebrain/html/docs/index.html" CLASS="button">: Docs</A> <A HREF="#" CLASS="button">: Index</A> </FONT></TD></TR></TABLE> <P>  </BODY> </HTML> EOM