[Bio] / FigWebServices / DocDirectory.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/DocDirectory.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (view) (download)

1 : parrello 1.1 #!/usr/bin/perl -w
2 :    
3 : olson 1.2 use FIG;
4 :    
5 : parrello 1.1 BEGIN {
6 :     # Print the HTML header.
7 :     print "CONTENT-TYPE: text/html\n\n";
8 :     }
9 :    
10 :     =head1 Documentation Directory
11 :    
12 :     This script generates the directory of documentation modules for FIG. The user can
13 :     click on a module name and it will automatically pop up the documentation for that
14 :     module.
15 :    
16 :     =cut
17 :    
18 :     use strict;
19 :     use CGI;
20 :     use Tracer;
21 :     use PageBuilder;
22 :    
23 : olson 1.2 #my $dir = "$FIG_Config::cgi_base/Html/pod_docs";
24 :     #
25 :     # I don't see how the above could have worked. Fixing below
26 :     #
27 :     # RDO
28 : parrello 1.3 #
29 :     # Apparently I mis-interpreted what some of the FIG_Config
30 :     # parameters meant. Sorry.
31 :     #
32 :     # Bruce
33 : olson 1.2
34 :     my $dir = "$FIG_Config::fig/CGI/Html/pod_docs";
35 : parrello 1.1 my $links = "";
36 :     # Open the documentation directory, and build a table of contents for it.
37 :     if (-d $dir) {
38 :     my @files = sort (Tracer::OpenDir($dir, 1));
39 :     for my $file (@files) {
40 :     if ($file =~ /^(.+)\.html$/) {
41 :     my $fileName = $1;
42 : overbeek 1.5 my $cgi = &FIG::cgi_url(-relative => 1);
43 : olson 1.2 $links .= "<a href=\"$cgi/Html/pod_docs/$file\" target=\"mainFrame\">$fileName</a><br>\n";
44 : parrello 1.1 }
45 :     }
46 : parrello 1.4 print PageBuilder::Build("<$FIG_Config::fig/CGI/Html/DirectoryTemplate.html",
47 : parrello 1.1 { index => $links });
48 :     }
49 :    
50 : olson 1.2 1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3