forked from webmin/webmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit_global.cgi
executable file
·55 lines (44 loc) · 2 KB
/
edit_global.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/local/bin/perl
# edit_global.cgi
# Edit global MON paths
require './mon-lib.pl';
$conf = &get_mon_config();
&ui_print_header(undef, $text{'global_title'}, "");
print "<form action=save_global.cgi>\n";
print "<table border>\n";
print "<tr $tb> <td><b>$text{'global_header'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";
$maxprocs = &find_value("maxprocs", $conf);
print "<tr> <td><b>$text{'global_maxprocs'}</b></td> <td>\n";
print "<input name=maxprocs size=6 value='$maxprocs'></td>\n";
$histlength = &find_value("histlength", $conf);
print "<td><b>$text{'global_histlength'}</b></td> <td>\n";
print "<input name=histlength size=6 value='$histlength'></td> </tr>\n";
$authtype = &find_value("authtype", $conf);
print "<tr> <td><b>$text{'global_authtype'}</b></td>\n";
print "<td><select name=authtype>\n";
foreach $t ('', 'getpwnam', 'userfile', 'shadow') {
printf "<option value='%s' %s>%s\n",
$t, $authtype eq $t ? "selected" : "",
$text{"global_authtype_$t"};
}
print "</select></td> </tr>\n";
$userfile = &find_value("userfile", $conf);
print "<tr> <td><b>$text{'global_userfile'}</b></td> <td colspan=3>\n";
printf "<input type=radio name=userfile_def value=1 %s> %s\n",
$userfile ? "" : "checked", $text{'default'};
printf "<input type=radio name=userfile_def value=0 %s>\n",
$userfile ? "checked" : "";
print "<input name=userfile size=40 value='$userfile'> ",
&file_chooser_button("userfile", 0),"</td> </tr>\n";
$alertdir = &find_value("alertdir", $conf);
print "<tr> <td><b>$text{'global_alertdir'}</b></td> <td colspan=3>\n";
print "<input name=alertdir size=40 value='$alertdir'> ",
&file_chooser_button("alertdir", 1),"</td> </tr>\n";
$mondir = &find_value("mondir", $conf);
print "<tr> <td><b>$text{'global_mondir'}</b></td> <td colspan=3>\n";
print "<input name=mondir size=40 value='$mondir'> ",
&file_chooser_button("mondir", 1),"</td> </tr>\n";
print "</table></td></tr></table>\n";
print "<input type=submit value='$text{'save'}'></form>\n";
&ui_print_footer("", $text{'index_return'});