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

Annotation of /FigWebServices/DocDirectory.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (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 :    
29 :     my $dir = "$FIG_Config::fig/CGI/Html/pod_docs";
30 : parrello 1.1 my $links = "";
31 :     # Open the documentation directory, and build a table of contents for it.
32 :     if (-d $dir) {
33 :     my @files = sort (Tracer::OpenDir($dir, 1));
34 :     for my $file (@files) {
35 :     if ($file =~ /^(.+)\.html$/) {
36 :     my $fileName = $1;
37 : olson 1.2 my $cgi = &FIG::cgi_url();
38 :     $links .= "<a href=\"$cgi/Html/pod_docs/$file\" target=\"mainFrame\">$fileName</a><br>\n";
39 : parrello 1.1 }
40 :     }
41 :     print PageBuilder::Build("<$FIG_Config::cgi_base/Html/DirectoryTemplate.htm",
42 :     { index => $links });
43 :     }
44 :    
45 : olson 1.2 1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3