Handle hostnames with upper-case letters
[webmin.git] / phpini / list_ini.cgi
1 #!/usr/local/bin/perl
2 # Show a page of icons for various PHP config sections
3
4 require './phpini-lib.pl';
5 &ReadParse();
6 &can_php_config($in{'file'}) || &error($text{'list_ecannot'});
7
8 # Work out if we can just see one file
9 @files = &list_php_configs();
10 if (@files == 1 && !$access{'anyfile'} && $access{'noconfig'}) {
11         $onefile = 1;
12         }
13
14 &ui_print_header("<tt>$in{'file'}</tt>", $text{'list_title'}, "", undef, 0,
15                  $onefile);
16
17 @pages = ( "vars", "dirs", "db", "session", "safe", "limits",
18            "errors", "misc" );
19 @links = map { "edit_${_}.cgi?file=".&urlize($in{'file'}) } @pages;
20 @titles = map { $text{$_."_title"} } @pages;
21 @icons = map { "images/$_.gif" } @pages;
22 &icons_table(\@links, \@titles, \@icons, 4);
23
24 if ($onefile) {
25         &ui_print_footer("/", $text{'index'});
26         }
27 else {
28         &ui_print_footer("", $text{'index_return'});
29         }
30