Handle hostnames with upper-case letters
[webmin.git] / qmailadmin / list_opts.cgi
1 #!/usr/local/bin/perl
2 # list_opts.cgi
3 # Display global QMail options
4
5 require './qmail-lib.pl';
6 &ui_print_header(undef, $text{'opts_title'}, "");
7
8 print "<form action=save_opts.cgi>\n";
9 print "<table border width=100%>\n";
10 print "<tr $tb> <td><b>$text{'opts_title'}</b></td></tr>\n";
11 print "<tr $cb> <td><table width=100%>\n";
12
13 print "<tr> <td><b>$text{'opts_me'}</b></td> <td colspan=3>\n";
14 printf "<input name=me size=35 value='%s'></td> </tr>\n",
15         &get_control_file("me");
16
17 $helo = &get_control_file("helohost");
18 print "<tr> <td><b>$text{'opts_helo'}</b></td> <td colspan=3>\n";
19 printf "<input type=radio name=helo_def value=1 %s> %s\n",
20         $helo ? "" : "checked", $text{'default'};
21 printf "<input type=radio name=helo_def value=0 %s>\n",
22         $helo ? "checked" : "";
23 printf "<input name=helo size=35 value='%s'></td> </tr>\n", $helo;
24
25 $toconnect = &get_control_file("timeoutconnect");
26 print "<tr> <td><b>$text{'opts_toconnect'}</b></td> <td nowrap>\n";
27 printf "<input type=radio name=toconnect_def value=1 %s> %s\n",
28         $toconnect ? "" : "checked", $text{'default'};
29 printf "<input type=radio name=toconnect_def value=0 %s>\n",
30         $toconnect ? "checked" : "";
31 printf "<input name=toconnect size=6 value='%s'> %s</td>\n",
32         $toconnect, $text{'opts_secs'};
33
34 $toremote = &get_control_file("timeoutremote");
35 print "<td><b>$text{'opts_toremote'}</b></td> <td nowrap>\n";
36 printf "<input type=radio name=toremote_def value=1 %s> %s\n",
37         $toremote ? "" : "checked", $text{'default'};
38 printf "<input type=radio name=toremote_def value=0 %s>\n",
39         $toremote ? "checked" : "";
40 printf "<input name=toremote size=6 value='%s'> %s</td> </tr>\n",
41         $toremote, $text{'opts_secs'};
42
43 $bytes = &get_control_file("databytes");
44 print "<tr> <td><b>$text{'opts_bytes'}</b></td> <td nowrap>\n";
45 printf "<input type=radio name=bytes_def value=1 %s> %s\n",
46         $bytes ? "" : "checked", $text{'opts_unlimited'};
47 printf "<input type=radio name=bytes_def value=0 %s>\n",
48         $bytes ? "checked" : "";
49 printf "<input name=bytes size=10 value='%s'> bytes</td>\n", $bytes;
50
51 $timeout = &get_control_file("timeoutsmtpd");
52 print "<td><b>$text{'opts_timeout'}</b></td> <td nowrap>\n";
53 printf "<input type=radio name=timeout_def value=1 %s> %s\n",
54         $timeout ? "" : "checked", $text{'default'};
55 printf "<input type=radio name=timeout_def value=0 %s>\n",
56         $timeout ? "checked" : "";
57 printf "<input name=timeout size=6 value='%s'> %s</td> </tr>\n",
58         $timeout, $text{'opts_secs'};
59
60 $localip = &get_control_file("localiphost");
61 print "<tr> <td><b>$text{'opts_localip'}</b></td> <td colspan=3>\n";
62 printf "<input type=radio name=localip_def value=1 %s> %s\n",
63         $localip ? "" : "checked", $text{'default'};
64 printf "<input type=radio name=localip_def value=0 %s>\n",
65         $localip ? "checked" : "";
66 printf "<input name=localip size=35 value='%s'></td> </tr>\n", $localip;
67
68 $greet = &get_control_file("smtpgreeting");
69 print "<tr> <td><b>$text{'opts_greet'}</b></td> <td colspan=3>\n";
70 printf "<input type=radio name=greet_def value=1 %s> %s\n",
71         $greet ? "" : "checked", $text{'default'};
72 printf "<input type=radio name=greet_def value=0 %s>\n",
73         $greet ? "checked" : "";
74 printf "<input name=greet size=35 value='%s'></td> </tr>\n", $greet;
75
76 print "</table></td></tr></table><p>\n";
77 print "<input type=submit value=\"$text{'save'}\"></form>\n";
78 &ui_print_footer("", $text{'index_return'});
79