mirror of
https://github.com/webmin/webmin.git
synced 2026-02-17 04:02:15 +00:00
Merge branch 'master' of git@github.com:webmin/webmin
This commit is contained in:
@@ -30,7 +30,8 @@ print &ui_hidden("from", $in{'from'});
|
||||
print &ui_table_start($text{'group_header'}, undef, 2);
|
||||
|
||||
print &ui_table_row($text{'group_name'},
|
||||
&ui_textbox("name", $group->{'name'}, 20) );
|
||||
&ui_textbox("name", $group->{'name'}, 20),
|
||||
undef, ["valign=middle","valign=middle"] );
|
||||
|
||||
my $tx = "";
|
||||
$tx .= &ui_columns_start(undef);
|
||||
@@ -41,7 +42,7 @@ foreach $m (( grep { !/\!?\@/ } @{$group->{'members'}} ),
|
||||
my @cols;
|
||||
push(@cols, &ui_textbox("member_".$i, $m, 40) );
|
||||
push(@cols, &ui_checkbox("neg_".$i, "!", $text{'group_neg'}, ($neg ? 1 : 0 ) ) );
|
||||
$tx .= &ui_columns_row(\@cols);
|
||||
$tx .= &ui_columns_row(\@cols, ["valign=middle","valign=middle"]);
|
||||
$i++;
|
||||
}
|
||||
$tx .= &ui_columns_row([ &ui_checkbox("resolv", 1, $text{'group_resolv'}) ], ["colspan=2"]);
|
||||
@@ -63,7 +64,7 @@ $tx .= ui_columns_end();
|
||||
print &ui_table_row($text{'group_members2'}, $tx);
|
||||
|
||||
print &ui_table_end();
|
||||
|
||||
print "<p>";
|
||||
if ($in{'new'}) {
|
||||
print &ui_submit($text{'create'});
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ foreach $s ('source', 'dest') {
|
||||
&ui_oneradio(${s}."_mode", 1, $text{'rule_host'}, ($sm == 1 ? 1 : 0))." ".
|
||||
&ui_textbox(${s}."_host", ($sm == 1 ? $rule->{$s} : ""), 30)." ".$text{'rule_named'}." ".
|
||||
&ui_textbox(${s}."_name", undef, 15)."<br>".
|
||||
&ui_checkbox(${s}."_resolv", 1, $text{'rule_resolv'}), undef, ["valign=top","valign=middle"] );
|
||||
&ui_checkbox(${s}."_resolv", 1, $text{'rule_resolv'},undef,"style=margin-left:15px;"), undef, ["valign=top","valign=middle"] );
|
||||
|
||||
# Host group option
|
||||
local $gv;
|
||||
@@ -61,8 +61,8 @@ foreach $s ('source', 'dest') {
|
||||
$gi = &group_input("${s}_group", $gv, 0, 1);
|
||||
if ($gi || $sm == 2) {
|
||||
print &ui_table_row(" ",
|
||||
&ui_oneradio(${s}."_mode", 2, $text{'rule_group'}, ($sm == 2 ? 1 : 0))." ".
|
||||
$gi);
|
||||
"<table style='margin:0;padding:0;'><tr><td style='margin:0;padding:0;' valign=top>".&ui_oneradio(${s}."_mode", 2, $text{'rule_group'}, ($sm == 2 ? 1 : 0))."</td><td valign=top>".
|
||||
$gi."</tr></table>",undef,["valign=top","valign=top"]);
|
||||
}
|
||||
|
||||
# Interface option
|
||||
@@ -87,8 +87,8 @@ print &ui_table_row(" ",
|
||||
# Show action upon match
|
||||
print &ui_table_row($text{'rule_action'},
|
||||
&action_input("action", $rule->{'action'}).
|
||||
" — ".&ui_checkbox("log", 1, $text{'rule_log'}, ($rule->{'log'} ? 1 : 0) )
|
||||
);
|
||||
" ".&ui_checkbox("log", 1, $text{'rule_log'}, ($rule->{'log'} ? 1 : 0) )
|
||||
,undef, ["valign=middle","valign=middle"]);
|
||||
|
||||
|
||||
# Show time that this rule applies
|
||||
@@ -119,9 +119,11 @@ foreach $br (@rules) {
|
||||
}
|
||||
}
|
||||
push(@sel, [ -1, $text{'rule_end'}, ($in{'new'} || $rule eq $rules[$#rules] ? "selected" : "") ] );
|
||||
print &ui_table_row($text{'rule_atpos'}, &ui_select("pos", undef, \@sel, 1) );
|
||||
print &ui_table_row($text{'rule_atpos'}, &ui_select("pos", undef, \@sel, 1), undef, ["valign=middle","valign=middle"] );
|
||||
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
|
||||
if ($in{'new'}) {
|
||||
print &ui_submit($text{'create'});
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ foreach my $th ('new', 'idx', 'insert') {
|
||||
|
||||
print &ui_table_start($text{'sep_header'}, undef, 2);
|
||||
print &ui_table_row($text{'sep_desc'},
|
||||
&ui_textbox("desc", ( $rule->{'desc'} eq "*" ? "" : $rule->{'desc'} ), 60) );
|
||||
&ui_textbox("desc", ( $rule->{'desc'} eq "*" ? "" : $rule->{'desc'} ), 60),
|
||||
undef, ["valign=middle","valign=middle"] );
|
||||
|
||||
# Show input for position of rule
|
||||
my @sel;
|
||||
@@ -41,15 +42,15 @@ foreach $br (@rules) {
|
||||
}
|
||||
}
|
||||
push(@sel, [ -1, $text{'rule_end'}, ($in{'new'} || $rule eq $rules[$#rules] ? "selected" : "") ] );
|
||||
print &ui_table_row($text{'rule_atpos'}, &ui_select("pos", undef, \@sel, 1) );
|
||||
print &ui_table_row($text{'rule_atpos'}, &ui_select("pos", undef, \@sel, 1), undef, ["valign=middle","valign=middle"] );
|
||||
print &ui_table_end();
|
||||
|
||||
print "<p>";
|
||||
if ($in{'new'}) {
|
||||
print &ui_hidden($text{'create'});
|
||||
print &ui_submit($text{'create'});
|
||||
}
|
||||
else {
|
||||
print &ui_hidden($text{'save'});
|
||||
print &ui_hidden($text{'delete'}, "delete");
|
||||
print &ui_submit($text{'save'});
|
||||
print &ui_submit($text{'delete'}, "delete");
|
||||
}
|
||||
|
||||
print &ui_form_end();
|
||||
|
||||
@@ -31,7 +31,8 @@ print &ui_hidden("idx", $in{'idx'});
|
||||
print &ui_table_start($text{'service_header'}, undef, 2);
|
||||
|
||||
# Show service name input
|
||||
print &ui_table_row($text{'service_name'}, &ui_textbox("name", $service->{'name'}, 20) );
|
||||
print &ui_table_row($text{'service_name'}, &ui_textbox("name", $service->{'name'}, 20),
|
||||
undef, ["valign=middle","valign=middle"] );
|
||||
|
||||
# Show protocols and ports
|
||||
my $tx = "";
|
||||
@@ -40,7 +41,7 @@ for($i=0; $i<@{$service->{'protos'}}+6; $i++) {
|
||||
my @cols;
|
||||
push(@cols, &protocol_input("proto_$i", $service->{'protos'}->[$i]) );
|
||||
push(@cols, &ui_textbox("port_".$i, $service->{'ports'}->[$i], 20) );
|
||||
$tx .= &ui_columns_row(\@cols);
|
||||
$tx .= &ui_columns_row(\@cols, ["valign=middle","valign=middle"]);
|
||||
}
|
||||
$tx .= ui_columns_end();
|
||||
|
||||
@@ -51,6 +52,7 @@ print &ui_table_row($text{'service_members'},
|
||||
&service_input("others", join(",", @{$service->{'others'}}), 0, 1) );
|
||||
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
|
||||
if ($in{'new'}) {
|
||||
print &ui_submit($text{'create'});
|
||||
|
||||
@@ -6,7 +6,7 @@ require './itsecur-lib.pl';
|
||||
&header($text{'index_title'}, "", undef, 1, 1, 0, &apply_button(), undef, undef,
|
||||
&text('index_version', $module_info{'version'}));
|
||||
|
||||
print "<p>";
|
||||
print &ui_hr();
|
||||
|
||||
# Icons table
|
||||
@can_opts = grep { $_ eq "backup" || $_ eq "restore" || $_ eq "remote" || $_ eq "import" ? &can_edit($_) : &can_use($_) } @opts;
|
||||
|
||||
@@ -7,7 +7,7 @@ require './itsecur-lib.pl';
|
||||
$theme_no_table++;
|
||||
$| = 1;
|
||||
&header($text{'authlogs_title'}, "");
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
|
||||
$log = $config{'authlog'} || &get_authlog_file();
|
||||
print "<b>",&text('logs_viewing', "<tt>$log</tt>"),"</b><p>\n";
|
||||
@@ -20,8 +20,7 @@ if ($session_id) {
|
||||
print "<param name=session value=\"sid=$session_id\">\n";
|
||||
}
|
||||
print "</applet>\n";
|
||||
print "</form>\n";
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ require './itsecur-lib.pl';
|
||||
$theme_no_table++;
|
||||
$| = 1;
|
||||
&header($text{'logs_title'}, "");
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
|
||||
$log = $config{'log'} || &get_log_file();
|
||||
print "<b>",&text('logs_viewing', "<tt>$log</tt>"),"</b><p>\n";
|
||||
@@ -20,8 +20,7 @@ if ($session_id) {
|
||||
print "<param name=session value=\"sid=$session_id\">\n";
|
||||
}
|
||||
print "</applet>\n";
|
||||
print "</form>\n";
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
|
||||
@@ -6,70 +6,67 @@ require './itsecur-lib.pl';
|
||||
&can_use_error("nat");
|
||||
&header($text{'nat_title'}, "",
|
||||
undef, undef, undef, undef, &apply_button());
|
||||
print "<hr>\n";
|
||||
|
||||
print "<form action=save_nat.cgi>\n";
|
||||
print "<table border>\n";
|
||||
print "<tr $tb> <td><b>$text{'nat_header'}</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table>\n";
|
||||
print &ui_hr();
|
||||
|
||||
($iface, @nets) = &get_nat();
|
||||
@maps = grep { ref($_) } @nets;
|
||||
@nets = grep { !ref($_) } @nets;
|
||||
print "<tr> <td valign=top><b>$text{'nat_desc'}</b></td> <td colspan=3>\n";
|
||||
printf "<input type=radio name=nat value=0 %s> %s<br>\n",
|
||||
$iface ? "" : "checked", $text{'nat_disabled'};
|
||||
printf "<input type=radio name=nat value=1 %s> %s\n",
|
||||
$iface ? "checked" : "", $text{'nat_enabled'};
|
||||
print &iface_input("iface", $iface);
|
||||
print "</td> </tr>\n";
|
||||
print &ui_form_start("save_nat.cgi","post");
|
||||
print &ui_table_start($text{'nat_header'},undef,2);
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'nat_nets'}</b></td>\n";
|
||||
print "<td valign=top><table>\n";
|
||||
$i = 0;
|
||||
my ($iface, @nets) = &get_nat();
|
||||
my @maps = grep { ref($_) } @nets;
|
||||
my @nets = grep { !ref($_) } @nets;
|
||||
|
||||
print &ui_table_row($text{'nat_desc'},
|
||||
&ui_radio("nat", ( $iface ? 1 : 0 ), [
|
||||
[0,$text{'nat_disabled'}."<br>"],[1,$text{'nat_enabled'}]
|
||||
]).&iface_input("iface", $iface) );
|
||||
|
||||
|
||||
my $style = "style='margin:0;padding:0;'";
|
||||
my $tx = "";
|
||||
$tx .= "<table $style><tr><td $style class='ui_form_value' valign=top>";
|
||||
$tx .= "<table $style>";
|
||||
my $i = 0;
|
||||
foreach $n ((grep { $_ !~ /^\!/ } @nets), undef, undef, undef) {
|
||||
print "<tr> <td>",&group_input("net_$i", $n, 1),"</td> </tr>\n";
|
||||
$tx .= "<tr><td $style valign=top>".&group_input("net_$i", $n, 1)."</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table></td>\n";
|
||||
$tx .= "</table></td>";
|
||||
|
||||
print "<td valign=top><b>$text{'nat_excl'}</b></td>\n";
|
||||
print "<td valign=top><table>\n";
|
||||
$tx .= "<td class='ui_form_label' valign=top> <b>$text{'nat_excl'}</b></td>";
|
||||
$tx .= "<td class='ui_form_value' $style valign=top><table $style>";
|
||||
$i = 0;
|
||||
foreach $n ((grep { $_ =~ /^\!/ } @nets), undef, undef, undef) {
|
||||
print "<tr> <td>",&group_input("excl_$i", $n =~ /^\!(.*)/ ? $1 : undef, 1),"</td> </tr>\n";
|
||||
$tx .= "<tr><td $style valign=top>".&group_input("excl_$i", $n =~ /^\!(.*)/ ? $1 : undef, 1)."</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table></td> </tr>\n";
|
||||
$tx .= "</table></td>";
|
||||
$tx .= "</td></tr></table>";
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'nat_maps'}</b>",
|
||||
"<br>$text{'nat_mapsdesc'}</td> <td colspan=3>\n";
|
||||
print "<table>\n";
|
||||
print "<tr> <td><b>$text{'nat_ext'}</b></td> ",
|
||||
"<td><b>$text{'nat_int'}</b></td> ",
|
||||
"<td><b>$text{'nat_virt'}</b></td> </tr>\n";
|
||||
print &ui_table_row($text{'nat_nets'}, $tx, undef, ["valign=top","valign=top"]);
|
||||
|
||||
$tx = "<table $style>";
|
||||
$tx .= "<tr><td $style valign=top><b>$text{'nat_ext'}</b></td>".
|
||||
"<td $style valign=top> <b>$text{'nat_int'}</b></td>".
|
||||
"<td $style valign=top> <b>$text{'nat_virt'}</b></td></tr>";
|
||||
$i = 0;
|
||||
foreach $m (@maps, [ ], [ ], [ ]) {
|
||||
#print "<tr>\n";
|
||||
#printf "<td><input name=ext_%d size=20 value='%s'></td>\n",
|
||||
# $i, $m->[0];
|
||||
#printf "<td><input name=int_%d size=20 value='%s'></td>\n",
|
||||
# $i, $m->[1];
|
||||
#print "<td>",&iface_input("virt_$i", $m->[2], 1, 1, 1),"</td>\n";
|
||||
#print "</tr>\n";
|
||||
print "<tr>" ;
|
||||
printf "<td><input name=ext_%d size=20 value='%s'></td>\n",
|
||||
$i, $m->[0];
|
||||
print "<td>",&group_input("int_$i", $m->[1], 1),"</td>\n";
|
||||
print "<td>",&iface_input("virt_$i", $m->[2], 1, 1, 1),"</td>\n";
|
||||
print "</tr>\n";
|
||||
$tx .= "<tr>";
|
||||
$tx .= "<td class='ui_form_value' $style>".&ui_textbox("ext_".$i, $m->[0], 20)."</td>",
|
||||
$tx .= "<td class='ui_form_value' $style> ".&group_input("int_$i", $m->[1], 1)."</td>";
|
||||
$tx .= "<td class='ui_form_value' $style> ".&iface_input("virt_$i", $m->[2], 1, 1, 1)."</td>";
|
||||
$tx .= "</tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table></td> </tr>\n";
|
||||
$tx .= "</table>";
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value='$text{'save'}'></form>\n";
|
||||
print &ui_table_row($text{'nat_maps'}."</b><br>".$text{'nat_mapsdesc'}."<b>", $tx, undef, ["valign=top","valign=top"]);
|
||||
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
print &ui_submit($text{'save'});
|
||||
print &ui_form_end(undef,undef,1);
|
||||
&can_edit_disable("nat");
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
@@ -6,64 +6,68 @@ require './itsecur-lib.pl';
|
||||
&can_use_error("nat2");
|
||||
&header($text{'nat2_title'}, "",
|
||||
undef, undef, undef, undef, &apply_button());
|
||||
print "<hr>\n";
|
||||
|
||||
print "<form action=save_nat2.cgi>\n";
|
||||
print "<table border>\n";
|
||||
print "<tr $tb> <td><b>$text{'nat_header'}</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table>\n";
|
||||
print &ui_hr();
|
||||
print &ui_form_start("save_nat2.cgi","post");
|
||||
print &ui_table_start($text{'nat_header'},undef,2);
|
||||
|
||||
($iface, @nets) = &get_nat($nat2_file);
|
||||
@maps = grep { ref($_) } @nets;
|
||||
@nets = grep { !ref($_) } @nets;
|
||||
print "<tr> <td valign=top><b>$text{'nat_desc'}</b></td> <td colspan=3>\n";
|
||||
printf "<input type=radio name=nat value=0 %s> %s<br>\n",
|
||||
$iface ? "" : "checked", $text{'nat_disabled'};
|
||||
printf "<input type=radio name=nat value=1 %s> %s\n",
|
||||
$iface ? "checked" : "", $text{'nat_enabled'};
|
||||
print &iface_input("iface", $iface);
|
||||
print "</td> </tr>\n";
|
||||
my ($iface, @nets) = &get_nat($nat2_file);
|
||||
my @maps = grep { ref($_) } @nets;
|
||||
my @nets = grep { !ref($_) } @nets;
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'nat_nets'}</b></td>\n";
|
||||
print "<td valign=top><table>\n";
|
||||
$i = 0;
|
||||
print &ui_table_row($text{'nat_desc'},
|
||||
&ui_radio("nat", ( $iface ? 1 : 0 ), [
|
||||
[0,$text{'nat_disabled'}."<br>"],[1,$text{'nat_enabled'}]
|
||||
]).&iface_input("iface", $iface) );
|
||||
|
||||
|
||||
my $style = "style='margin:0;padding:0;'";
|
||||
my $tx = "";
|
||||
$tx .= "<table $style><tr><td $style class='ui_form_value' valign=top>";
|
||||
$tx .= "<table $style>";
|
||||
my $i = 0;
|
||||
foreach $n ((grep { $_ !~ /^\!/ } @nets), undef, undef, undef) {
|
||||
print "<tr> <td>",&group_input("net_$i", $n, 1),"</td> </tr>\n";
|
||||
$tx .= "<tr><td $style valign=top>".&group_input("net_$i", $n, 1)."</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table></td>\n";
|
||||
$tx .= "</table></td>";
|
||||
|
||||
print "<td valign=top><b>$text{'nat_excl'}</b></td>\n";
|
||||
print "<td valign=top><table>\n";
|
||||
$tx .= "<td class='ui_form_label' valign=top> <b>$text{'nat_excl'}</b></td>";
|
||||
$tx .= "<td class='ui_form_value' $style valign=top><table $style>";
|
||||
$i = 0;
|
||||
foreach $n ((grep { $_ =~ /^\!/ } @nets), undef, undef, undef) {
|
||||
print "<tr> <td>",&group_input("excl_$i", $n =~ /^\!(.*)/ ? $1 : undef, 1),"</td> </tr>\n";
|
||||
$tx .= "<tr><td $style valign=top>".&group_input("excl_$i", $n =~ /^\!(.*)/ ? $1 : undef, 1)."</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table></td> </tr>\n";
|
||||
$tx .= "</table></td>";
|
||||
$tx .= "</td></tr></table>";
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'nat_maps'}</b>",
|
||||
"<br>$text{'nat_mapsdesc'}</td> <td colspan=3>\n";
|
||||
print "<table>\n";
|
||||
print "<tr> <td><b>$text{'nat_ext'}</b></td> ",
|
||||
"<td><b>$text{'nat_int'}</b></td> ",
|
||||
"<td><b>$text{'nat_virt'}</b></td> </tr>\n";
|
||||
print &ui_table_row($text{'nat_nets'}, $tx, undef, ["valign=top","valign=top"]);
|
||||
|
||||
$tx = "<table $style>";
|
||||
$tx .= "<tr><td $style valign=top><b>$text{'nat_ext'}</b></td>".
|
||||
"<td $style valign=top> <b>$text{'nat_int'}</b></td>".
|
||||
"<td $style valign=top> <b>$text{'nat_virt'}</b></td></tr>";
|
||||
$i = 0;
|
||||
foreach $m (@maps, [ ], [ ], [ ]) {
|
||||
print "<tr>\n";
|
||||
printf "<td><input name=ext_%d size=20 value='%s'></td>\n",
|
||||
$i, $m->[0];
|
||||
printf "<td><input name=int_%d size=20 value='%s'></td>\n",
|
||||
$i, $m->[1];
|
||||
print "<td>",&iface_input("virt_$i", $m->[2], 1, 1, 1),"</td>\n";
|
||||
print "</tr>\n";
|
||||
$tx .= "<tr>";
|
||||
$tx .= "<td class='ui_form_value' $style>".&ui_textbox("ext_".$i, $m->[0], 20)."</td>",
|
||||
$tx .= "<td class='ui_form_value' $style> ".&ui_textbox("int_".$i, $m->[0], 20)."</td>";
|
||||
$tx .= "<td class='ui_form_value' $style> ".&iface_input("virt_$i", $m->[2], 1, 1, 1)."</td>";
|
||||
$tx .= "</tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table></td> </tr>\n";
|
||||
$tx .= "</table>";
|
||||
|
||||
print &ui_table_row($text{'nat_maps'}."</b><br>".$text{'nat_mapsdesc'}."<b>", $tx, undef, ["valign=top","valign=top"]);
|
||||
|
||||
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
print &ui_submit($text{'save'});
|
||||
print &ui_form_end(undef,undef,1);
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value='$text{'save'}'></form>\n";
|
||||
&can_edit_disable("nat");
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
@@ -6,34 +6,35 @@ require './itsecur-lib.pl';
|
||||
&can_use_error("pat");
|
||||
&header($text{'pat_title'}, "",
|
||||
undef, undef, undef, undef, &apply_button());
|
||||
print "<hr>\n";
|
||||
|
||||
@forwards = &get_pat();
|
||||
print "<form action=save_pat.cgi>\n";
|
||||
print "<table border>\n";
|
||||
print "<tr $tb> <td><b>$text{'pat_header'}</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table>\n";
|
||||
print &ui_hr();
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'pat_forward'}</b></td> ",
|
||||
"<td><table border>\n";
|
||||
print "<tr $tb> <td><b>$text{'pat_service'}</b></td> ",
|
||||
"<td><b>$text{'pat_host'}</b></td> ",
|
||||
"<td><b>$text{'pat_iface'}</b></td> </tr>\n";
|
||||
$j = 0;
|
||||
my @forwards = &get_pat();
|
||||
print &ui_form_start("save_pat.cgi","post");
|
||||
print &ui_table_start($text{'pat_header'}, undef, 2);
|
||||
|
||||
my $tx = &ui_columns_start([$text{'pat_service'},
|
||||
$text{'pat_host'},
|
||||
$text{'pat_iface'}]);
|
||||
|
||||
my $j = 0;
|
||||
foreach $f (@forwards, { }, { }, { }) {
|
||||
print "<tr $cb>\n";
|
||||
print "<td>",&service_input("service_$j", $f->{'service'}, 1),"</td>\n";
|
||||
print "<td><input name=host_$j size=30 value='$f->{'host'}'></td>\n";
|
||||
print "<td>",&iface_input("iface_$j", $f->{'iface'},
|
||||
0, 1, 1),"</td>\n";
|
||||
print "</tr>\n";
|
||||
my @cols;
|
||||
push(@cols, &service_input("service_$j", $f->{'service'}, 1) );
|
||||
push(@cols, &ui_textbox("host_".$j, $f->{'host'}, 30) );
|
||||
push(@cols, &iface_input("iface_$j", $f->{'iface'}, 0, 1, 1) );
|
||||
$tx .= &ui_columns_row(\@cols);
|
||||
$j++;
|
||||
}
|
||||
print "</table></td> </tr>\n";
|
||||
$tx .= &ui_columns_end();
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value='$text{'save'}'></form>\n";
|
||||
print &ui_table_row($text{'pat_forward'}, $tx);
|
||||
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
print &ui_submit($text{'save'});
|
||||
print &ui_form_end(undef,undef,1);
|
||||
&can_edit_disable("pat");
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
@@ -6,29 +6,25 @@ require './itsecur-lib.pl';
|
||||
&can_use_error("spoof");
|
||||
&header($text{'spoof_title'}, "",
|
||||
undef, undef, undef, undef, &apply_button());
|
||||
print "<hr>\n";
|
||||
|
||||
print "<form action=save_spoof.cgi>\n";
|
||||
print "<table border>\n";
|
||||
print "<tr $tb> <td><b>$text{'spoof_header'}</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table>\n";
|
||||
print &ui_hr();
|
||||
|
||||
($iface, @nets) = &get_spoof();
|
||||
print "<tr> <td valign=top><b>$text{'spoof_desc'}</b></td> <td>\n";
|
||||
printf "<input type=radio name=spoof value=0 %s> %s<br>\n",
|
||||
$iface ? "" : "checked", $text{'spoof_disabled'};
|
||||
printf "<input type=radio name=spoof value=1 %s> %s\n",
|
||||
$iface ? "checked" : "", $text{'spoof_enabled'};
|
||||
print &iface_input("iface", $iface);
|
||||
print "</td> </tr>\n";
|
||||
print &ui_form_start("save_spoof.cgi", "post");
|
||||
print &ui_table_start($text{'spoof_header'}, undef, 2);
|
||||
|
||||
print "<tr> <td valign=top><b>$text{'spoof_nets'}</b></td> <td>\n";
|
||||
print "<textarea name=nets rows=5 cols=40>",
|
||||
join("\n", @nets),"</textarea></td> </tr>\n";
|
||||
my ($iface, @nets) = &get_spoof();
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value='$text{'save'}'></form>\n";
|
||||
print &ui_table_row($text{'spoof_desc'},
|
||||
&ui_radio("spoof", ( $iface ? 1 : 0 ), [
|
||||
[0,$text{'spoof_disabled'}."<br>"],[1,$text{'spoof_enabled'}]
|
||||
]).&iface_input("iface", $iface) );
|
||||
|
||||
print &ui_table_row($text{'spoof_nets'}, &ui_textarea("nets", join("\n", @nets), 5, 40) );
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
print &ui_submit($text{'save'});
|
||||
print &ui_form_end(undef,undef,1);
|
||||
&can_edit_disable("spoof");
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
@@ -6,36 +6,31 @@ require './itsecur-lib.pl';
|
||||
&can_use_error("syn");
|
||||
&header($text{'syn_title'}, "",
|
||||
undef, undef, undef, undef, &apply_button());
|
||||
print "<hr>\n";
|
||||
|
||||
print "<form action=save_syn.cgi>\n";
|
||||
print "<table border>\n";
|
||||
print "<tr $tb> <td><b>$text{'syn_header'}</b></td> </tr>\n";
|
||||
print "<tr $cb> <td><table>\n";
|
||||
print &ui_hr();
|
||||
|
||||
($flood, $spoof, $fin) = &get_syn();
|
||||
print &ui_form_start("save_syn.cgi", "post");
|
||||
print &ui_table_start($text{'syn_header'}, undef, 2);
|
||||
|
||||
print "<tr> <td><b>$text{'syn_flood'}</b></td> <td>\n";
|
||||
printf "<input type=radio name=flood value=1 %s> %s\n",
|
||||
$flood ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=flood value=0 %s> %s</td> </tr>\n",
|
||||
$flood ? "" : "checked", $text{'no'};
|
||||
my ($flood, $spoof, $fin) = &get_syn();
|
||||
|
||||
print "<tr> <td><b>$text{'syn_spoof'}</b></td> <td>\n";
|
||||
printf "<input type=radio name=spoof value=1 %s> %s\n",
|
||||
$spoof ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=spoof value=0 %s> %s</td> </tr>\n",
|
||||
$spoof ? "" : "checked", $text{'no'};
|
||||
print &ui_table_row($text{'syn_flood'},
|
||||
&ui_yesno_radio("flood", ($flood ? 1 : 0 ), 1, 0 )
|
||||
);
|
||||
|
||||
print &ui_table_row($text{'syn_spoof'},
|
||||
&ui_yesno_radio("spoof", ($spoof ? 1 : 0 ), 1, 0 )
|
||||
);
|
||||
|
||||
print "<tr> <td><b>$text{'syn_fin'}</b></td> <td>\n";
|
||||
printf "<input type=radio name=fin value=1 %s> %s\n",
|
||||
$fin ? "checked" : "", $text{'yes'};
|
||||
printf "<input type=radio name=fin value=0 %s> %s</td> </tr>\n",
|
||||
$fin ? "" : "checked", $text{'no'};
|
||||
print &ui_table_row($text{'syn_fin'},
|
||||
&ui_yesno_radio("fin", ($fin ? 1 : 0 ), 1, 0 )
|
||||
);
|
||||
|
||||
print "</table></td></tr></table>\n";
|
||||
print "<input type=submit value='$text{'save'}'></form>\n";
|
||||
print &ui_table_end();
|
||||
print "<p>";
|
||||
print &ui_submit($text{'save'});
|
||||
print &ui_form_end(undef,undef,1);
|
||||
&can_edit_disable("syn");
|
||||
|
||||
print "<hr>\n";
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
@@ -7,12 +7,13 @@ require './itsecur-lib.pl';
|
||||
&can_use_error("users");
|
||||
&header($text{'users_title'}, "",
|
||||
undef, undef, undef, undef, &apply_button());
|
||||
print "<hr>\n";
|
||||
|
||||
print &ui_hr();
|
||||
|
||||
# Work out which users have access to this module
|
||||
@users = &acl::list_users();
|
||||
my @users = &acl::list_users();
|
||||
foreach $u (@users) {
|
||||
@m = @{$u->{'modules'}};
|
||||
my @m = @{$u->{'modules'}};
|
||||
if ($u->{'name'} ne "root" &&
|
||||
&indexof($module_name, @m) >= 0) {
|
||||
push(@musers, $u);
|
||||
@@ -20,42 +21,37 @@ foreach $u (@users) {
|
||||
}
|
||||
|
||||
#print "$text{'users_desc'}<p>\n";
|
||||
$edit = &can_edit("users");
|
||||
my $edit = &can_edit("users");
|
||||
my $link = ( $edit ? &ui_link("edit_user.cgi?new=1", $text{'users_add'}) : "" );
|
||||
if (@musers) {
|
||||
print "<a href='edit_user.cgi?new=1'>$text{'users_add'}</a><br>\n"
|
||||
if ($edit);
|
||||
print "<table border>\n";
|
||||
print "<tr $tb> ",
|
||||
"<td><b>$text{'users_name'}</b></td> ",
|
||||
"<td><b>$text{'users_ips'}</b></td> ",
|
||||
"<td><b>$text{'users_enabled'}</b></td> ",
|
||||
"</tr>\n";
|
||||
print $link;
|
||||
my @cols;
|
||||
print &ui_columns_start([$text{'users_name'}, $text{'users_ips'}, $text{'users_enabled'}]);
|
||||
foreach $u (@musers) {
|
||||
print "<tr $cb>\n";
|
||||
print "<td><a href='edit_user.cgi?",
|
||||
"name=$u->{'name'}'>$u->{'name'}</a></td>\n";
|
||||
print "<td>\n";
|
||||
push(@cols, &ui_link("edit_user.cgi?name=".$u->{'name'},$u->{'name'}) );
|
||||
my $tx = "";
|
||||
if ($u->{'allow'}) {
|
||||
print &text('users_allow', $u->{'allow'});
|
||||
$tx = &text('users_allow', $u->{'allow'});
|
||||
}
|
||||
elsif ($u->{'deny'}) {
|
||||
print &text('users_deny', $u->{'deny'});
|
||||
$tx = &text('users_deny', $u->{'deny'});
|
||||
}
|
||||
else {
|
||||
print $text{'users_all'};
|
||||
$tx = $text{'users_all'};
|
||||
}
|
||||
print "</td>\n";
|
||||
print "<td>",$u->{'pass'} =~ /^\*LK\*/ ? $text{'rule_no'} : $text{'rule_yes'},"</td>\n";
|
||||
%uaccess = &get_module_acl($u->{'name'});
|
||||
print "</tr>\n";
|
||||
push(@cols, $tx);
|
||||
push(@cols, ($u->{'pass'} =~ /^\*LK\*/ ? $text{'rule_no'} : $text{'rule_yes'}) );
|
||||
#%uaccess = &get_module_acl($u->{'name'});
|
||||
}
|
||||
print "</table>\n";
|
||||
print &ui_columns_row(\@cols);
|
||||
print &ui_columns_end();
|
||||
}
|
||||
else {
|
||||
print "<b>$text{'users_none'}</b><p>\n";
|
||||
}
|
||||
print "<a href='edit_user.cgi?new=1'>$text{'users_add'}</a><p>\n"
|
||||
if ($edit);
|
||||
|
||||
print "<hr>\n";
|
||||
|
||||
print $link;
|
||||
|
||||
print &ui_hr();
|
||||
&footer("", $text{'index_return'});
|
||||
|
||||
Reference in New Issue
Block a user