#!/usr/local/bin/perl # index.cgi # Display a list of all .htaccess files require './htaccess-lib.pl'; &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); # Check if version info can be gotten from webmin if (!$httpd_modules{'core'}) { print "",&text('index_apache', "$config{'webmin_apache'}"), "

\n"; &ui_print_footer("/", $text{'index'}); exit; } # Show known config files print &text('index_desc', "$config{'htaccess'}"),"

\n"; @files = &get_htaccess_files(); if (@files) { print &ui_subheading($text{'index_header'}); @icons = map { "images/dir.gif" } @files; @links = map { "htaccess_index.cgi?file=".&urlize($_) } @files; @titles = map { /^(.*)\//; $1 } @files; &icons_table(\@links, \@titles, \@icons); } else { print "$text{'index_none'}

\n"; } print "

\n"; print "\n"; print " ",&file_chooser_button("dir", 1),"
\n"; print "
\n"; print "
\n"; print &text('index_finddesc', "$config{'htaccess'}"),"
\n"; print "
\n"; print "\n"; print " ", &file_chooser_button("dir", 1),"
\n"; print "
\n"; &ui_print_footer("/", $text{'index'});