-$output = "";
-foreach $i (@filenames) {
- if ($i eq "..") {
- $output .= <<EOT;
-<img border="0" src="/icons/back.gif" alt="[BACK]"> <a href="$uri$i">Parent Directory</a>
-EOT
- } elsif ($i !~ /^\./) {
- # hidden files excluded
- (undef,undef,$mode) = stat("$dirname$i");
- if ($mode &= 16384) {
- # directory
- $output .= <<EOT;
-<img border="0" src="/icons/folder.gif" alt="[DIR]"> <a href="$uri$i">$i</a>
-EOT
- } else {
- # file
- if ($i =~ /\.(con|var|ind)\.xml$/) {
- my $i_without_xml = $i;
- $i_without_xml =~ s/(.*)\.xml/$1/;
- # cic file
- my $baseuri = "cic:".$baseuri0;
- $output .= <<EOT;
-<img border="0" src="/icons/generic.red.gif" alt="[DIR]"> <a
-href="$uri$i">$i</a> <a
-href="$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=annotatedpres.xsl&xmluri=$baseuri$i_without_xml">MathML</a> <a href="$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=content_to_html.xsl&xmluri=$baseuri$i_without_xml">HTML</a> <a href="$webeq_url?mmlurl=$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=annotatedpres.xsl&xmluri=$baseuri$i_without_xml">WEBEQ</a> <a href="$webeqp_url?mmlurl=$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=annotatedpres.xsl&xmluri=$baseuri$i_without_xml">WEBEQ PRESENTATION ONLY</a>
-EOT
- } elsif ($i =~ /\.(con|var|ind)\.ann\.xml$/) {
- my $i_without_xml = $i;
- my $i_without_ann_and_xml = $i;
- $i_without_xml =~ s/(.*)\.xml/$1/;
- $i_without_ann_and_xml =~ s/(.*)\.ann\.xml/$1/;
- # cic file
- my $baseuri = "cic:".$baseuri0;
- $output .= <<EOT;
-<img border="0" src="/icons/text.gif" alt="[DIR]"> <a href="$uri$i">$i</a> <a href="$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=annotatedpres.xsl&xmluri=$baseuri$i_without_ann_and_xml&annuri=$baseuri$i_without_xml">MathML</a> <a href="$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=content_to_html.xsl&xmluri=$baseuri$i_without_ann_and_xml&annuri=$baseuri$i_without_xml">HTML</a> <a href="$webeq_url?mmlurl=$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=annotatedpres.xsl&xmluri=$baseuri$i_without_ann_and_xml&annuri=$baseuri$i_without_xml">WEBEQ</a> <a href="$webeqp_url?mmlurl=$getheader_url?baseurl=$style_url&stylesheet1=rootcontent.xsl&stylesheet2=annotatedpres.xsl&xmluri=$baseuri$i_without_ann_and_xml&annuri=$baseuri$i_without_xml">WEBEQ PRESENTATION ONLY</a>
-EOT
- } elsif ($i =~ /\.theory\.xml$/) {
- my $i_without_xml = $i;
- $i_without_xml =~ s/(.*)\.xml/$1/;
- # theory file
- my $baseuri = "theory:".$baseuri0;
- $output .= <<EOT;
-<img border="0" src="/icons/layout.gif" alt="[DIR]"> <a
-href="$uri$i">$i</a> <a href="$getheader_url?baseurl=$style_url&stylesheet1=theory_content.xsl&stylesheet2=theory_pres.xsl&xmluri=$baseuri$i_without_xml">MathML</a> <a href="$getheader_url?baseurl=$style_url&stylesheet1=roottheory.xsl&stylesheet2=content_to_html.xsl&xmluri=$baseuri$i_without_xml">HTML</a>
-EOT
- } else {
- # other file
- $output .= <<EOT;
-<img border="0" src="/icons/unknown.gif" alt="[DIR]"> <a href="$uri$i">$i</a>
-EOT
- }
- }
- }
-}
+$mode = $cgi->param('mode');
+$cicuri = $cgi->param('cicuri');
+$theoryuri = $cgi->param('theoryuri');
+$processorURL = $cgi->param('processorURL');
+$getterURL = $cgi->param('getterURL');
+$topurl = $cgi->url();