print <<END
-<DIV align='left'>
+<div align='left'>
END
;
# start with an Chain the the name, start- and endline of the
# chain is extracted into a hash
- open (FILE, '/srv/web/ipfire/html/iptables.txt');
+ open (FILE, '/var/tmp/iptables.txt');
while (<FILE>){
$iplines[$lines] = $_;
}
$lines++;
-
+
}
+ $chains{$chainname."end"} = $lines-1;
close (FILE);
# now the chain hash is extracted to get the correct name of the chain
# colored gui
print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n<select name='selectedchain' style='width: 250px'>\n";
- foreach (keys(%chains)){
+ foreach (sort(keys(%chains))){
if ( $_ =~ /end$/ ){
next;
print "</tr>\n";
print "<tr>\n";
- print " <td width='0'></td>\n <td width='35'></td>\n <td width='35'></td>\n";
- print " <td width='130'></td>\n <td width='30'></td>\n";
+ print " <td width='0'></td>\n <td width='60'></td>\n <td width='60'></td>\n";
+ print " <td width='150'></td>\n <td width='30'></td>\n";
print " <td width='30'></td>\n <td width='40'></td>\n";
print " <td width='40'></td>\n <td width='95'></td>\n";
print " <td width='95'></td>\n <td width='260'></td>\n";
}
print "</td>\n</tr>\n";
}
-print "</table></DIV><br />";
+print "</table></div><br />";
&Header::closebox();
## MANGLE
print <<END
-<DIV align='left'>
+<div align='left'>
END
;
# start with an Chain the the name, start- and endline of the
# chain is extracted into a hash
- open (FILE, '/srv/web/ipfire/html/iptablesmangle.txt');
+ open (FILE, '/var/tmp/iptablesmangle.txt');
while (<FILE>){
$ipmlines[$manlines] = $_;
$manlines++;
}
+ $chainsman{$chainname."end"} = $manlines-1;
close (FILE);
# now the chain hash is extracted to get the correct name of the chain
# colored gui
print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n<select name='selectedchain' style='width: 250px'>\n";
- foreach (keys(%chainsman)){
+ foreach (sort(keys(%chainsman))){
if ( $_ =~ /end$/ ){
next;
print "</tr>\n";
print "<tr>\n";
- print " <td width='0'></td>\n <td width='35'></td>\n <td width='35'></td>\n";
- print " <td width='130'></td>\n <td width='30'></td>\n";
+ print " <td width='0'></td>\n <td width='60'></td>\n <td width='60'></td>\n";
+ print " <td width='150'></td>\n <td width='30'></td>\n";
print " <td width='30'></td>\n <td width='40'></td>\n";
print " <td width='40'></td>\n <td width='95'></td>\n";
print " <td width='95'></td>\n <td width='260'></td>\n";
}
print "</td>\n</tr>\n";
}
-print "</table></DIV><br />";
+print "</table></div><br />";
&Header::closebox();
## NAT
print <<END
-<DIV align='left'>
+<div align='left'>
END
;
# start with an Chain the the name, start- and endline of the
# chain is extracted into a hash
- open (FILE, '/srv/web/ipfire/html/iptablesnat.txt');
+ open (FILE, '/var/tmp/iptablesnat.txt');
while (<FILE>){
$ipnatlines[$natlines] = $_;
$natlines++;
}
+ $chainsnat{$chainname."end"} = $natlines-1;
close (FILE);
# now the chain hash is extracted to get the correct name of the chain
# colored gui
print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n<select name='selectedchain' style='width: 250px'>\n";
- foreach (keys(%chainsnat)){
+ foreach (sort(keys(%chainsnat))){
if ( $_ =~ /end$/ ){
next;
print "</tr>\n";
print "<tr>\n";
- print " <td width='0'></td>\n <td width='35'></td>\n <td width='35'></td>\n";
- print " <td width='130'></td>\n <td width='30'></td>\n";
+ print " <td width='0'></td>\n <td width='60'></td>\n <td width='60'></td>\n";
+ print " <td width='150'></td>\n <td width='30'></td>\n";
print " <td width='30'></td>\n <td width='40'></td>\n";
print " <td width='40'></td>\n <td width='95'></td>\n";
print " <td width='95'></td>\n <td width='260'></td>\n";
}
print "</td>\n</tr>\n";
}
-print "</table></DIV><br />";
+print "</table></div><br />";
&Header::closebox();
&Header::closebigbox();
&Header::closepage();
-system(rm -f "/srv/web/ipfire/html/iptables.txt");
-system(rm -f "/srv/web/ipfire/html/iptablesmangle.txt");
-system(rm -f "/srv/web/ipfire/html/iptablesnat.txt");
\ No newline at end of file
+system("rm -f /var/tmp/iptables.txt");
+system("rm -f /var/tmp/iptablesmangle.txt");
+system("rm -f /var/tmp/iptablesnat.txt");