Handle hostnames with upper-case letters
[webmin.git] / vgetty / index.cgi
1 #!/usr/local/bin/perl
2 # index.cgi
3 # Displays a table of option category icons
4
5 require './vgetty-lib.pl';
6 &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
7         &help_search_link("vgetty", "man", "doc"));
8
9 # Check if vgetty is actually installed
10 if (!&has_command($config{'vgetty_cmd'})) {
11         print "<p>",&text('index_ecmd', "<tt>$config{'vgetty_cmd'}</tt>",
12                   "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
13         &ui_print_footer("/", $text{'index'});
14         exit;
15         }
16
17 # Check if config file exists
18 if (!-r $config{'vgetty_config'}) {
19         print "<p>",&text('index_econfig', "<tt>$config{'vgetty_config'}</tt>",
20                   "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
21         &ui_print_footer("/", $text{'index'});
22         exit;
23         }
24
25 # Show icons for various option categories
26 @titles = ( $text{'vgetty_title'}, $text{'options_title'},
27             $text{'received_title'}, $text{'messages_title'} );
28 @links = ( "list_vgetty.cgi", "edit_options.cgi", "list_received.cgi",
29            "list_messages.cgi" );
30 @icons = ( "images/vgetty.gif", "images/options.gif", "images/received.gif",
31            "images/messages.gif" );
32 &icons_table(\@links, \@titles, \@icons);
33
34 print &ui_hr();
35 print "<form action=vgetty_apply.cgi>\n";
36 print "<table width=100%><tr>\n";
37 print "<td><input type=submit value='$text{'vgetty_apply'}'></td>\n";
38 print "<td>",&text('vgetty_applydesc', "<tt>telinit q</tt>"),"</td>\n";
39 print "</tr></table></form>\n";
40
41 &ui_print_footer("/", $text{'index'});
42