#!/usr/bin/perl require "../../cgi-lib/lkhtml.pm"; use CGI qw/:standard/; my @html; push @html, &show_html; push @html, &show_header("Contour FAQ"); push @html, &show_section("TSB Center",&show_tsb("content")); push @html, &show_back_link; push @html, &show_end_html; print @html; exit; sub show_tsb { local($dir)=@_; local(@filelist); local(@subjects); local(@scrap); opendir(DIR, $dir); @files = grep { /\.ndx$/ } readdir(DIR); closedir(DIR); foreach $file (@files) { $path = "$dir/$file"; open (FILE, "< $path") or die "Could not open $file for reading: $!\n"; @lines = ; close(FILE); push(@filelist,$lines[0]); push(@subjects,$lines[1]); } push @scrap, "\n"; $cnt = 0; foreach $i (0 .. $#filelist) { chop($filelist[$i]); $cnt = 1 - $cnt; if (substr($filelist[$i],0,7) eq "http://") { $link = "$filelist[$i]"; } else { $link = "tsb.cgi?$filelist[$i]"; } push @scrap, "", ""; } push @scrap, "
", "$filelist[$i]", "", $subjects[$i], "
\n\n"; return @scrap; }