if ($outfwsettings{'ACTION'} eq $Lang::tr{'add'})
{
if ( $outfwsettings{'VALID'} eq 'yes' ) {
+
+ if ( $outfwsettings{'SNET'} eq "all" ) {
+ $outfwsettings{'SIP'} ="";
+ $outfwsettings{'SMAC'}="";
+ }
open( FILE, ">> $configfile" ) or die "Unable to write $configfile";
print FILE <<END
$outfwsettings{'STATE'};$outfwsettings{'ENABLED'};$outfwsettings{'SNET'};$outfwsettings{'PROT'};$outfwsettings{'NAME'};$outfwsettings{'SIP'};$outfwsettings{'SMAC'};$outfwsettings{'DIP'};$outfwsettings{'DPORT'};$outfwsettings{'LOG'};$outfwsettings{'TIME_MON'};$outfwsettings{'TIME_TUE'};$outfwsettings{'TIME_WED'};$outfwsettings{'TIME_THU'};$outfwsettings{'TIME_FRI'};$outfwsettings{'TIME_SAT'};$outfwsettings{'TIME_SUN'};$outfwsettings{'TIME_FROM'};$outfwsettings{'TIME_TO'};
if ($outfwsettings{'STATE'} eq 'DENY'){ $outfwsettings{'DISPLAY_STATE'} = "<img src='/images/stock_stop.png' alt='DENY' />"; }
if ($outfwsettings{'STATE'} eq 'ALLOW'){ $outfwsettings{'DISPLAY_STATE'} = "<img src='/images/stock_ok.png' alt='ALLOW' />"; }
if ((($outfwsettings{'POLICY'} eq 'MODE1') && ($outfwsettings{'STATE'} eq 'ALLOW')) || (($outfwsettings{'POLICY'} eq 'MODE2') && ($outfwsettings{'STATE'} eq 'DENY'))){
- print <<END
- <tr bgcolor='$color{'color20'}'>
+ if ( $outfwsettings{'ENABLED'} eq "on" ){
+ print "<tr bgcolor='$color{'color20'}'>";
+ } else {
+ print "<tr bgcolor='$color{'color18'}'>";
+ }
+ print <<END
<td align='center'>$outfwsettings{'PROT'}
<td align='center'>$outfwsettings{'SNET'}
<td align='center'>$outfwsettings{'DISPLAY_DIP'}:$outfwsettings{'DISPLAY_DPORT'}
;
my @ipgroups = qx(ls $configpath/ipgroups/);
foreach (sort @ipgroups){
- print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{'$_'}>$_</option>\n";
+ chomp($_);
+ print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{$_}>$_</option>\n";
}
print <<END
</optgroup>
;
my @macgroups = qx(ls $configpath/macgroups/);
foreach (sort @macgroups){
- print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{'$_'}>$_</option>\n";
+ chomp($_);
+ print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{$_}>$_</option>\n";
}
print <<END
</optgroup>
}
&Header::closebigbox();
-&Header::closepage();
\ No newline at end of file
+&Header::closepage();