]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/iptables.cgi
BUG 11786 - squid: Remove setting for filter processes the number of Squid processes
[ipfire-2.x.git] / html / cgi-bin / iptables.cgi
index 080371b375c6aee211fb5a27e4a39686c2c243f8..b52d74fcfbac81006efa0e33fc4642e91abd39a6 100644 (file)
@@ -80,7 +80,7 @@ if ( $cgiparams{'selectedchain'} ne "" ){
 
 print <<END
 
-<DIV align='left'>
+<div align='left'>
 END
 ;
 
@@ -88,7 +88,7 @@ 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] = $_;
@@ -106,8 +106,9 @@ END
                }
 
                $lines++;
-          
+
        }
+       $chains{$chainname."end"} = $lines-1;
        close (FILE);
 
 # now the chain hash is extracted to get the correct name of the chain
@@ -119,7 +120,7 @@ END
 # 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;
@@ -149,8 +150,8 @@ END
        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";
@@ -181,7 +182,7 @@ END
                }
                print "</td>\n</tr>\n";
        }
-print "</table></DIV><br />";
+print "</table></div><br />";
 &Header::closebox();
 
 ## MANGLE
@@ -201,7 +202,7 @@ if ( $cgiparams{'selectedchain'} ne "" ){
 
 print <<END
 
-<DIV align='left'>
+<div align='left'>
 END
 ;
 
@@ -209,7 +210,7 @@ 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] = $_;
@@ -229,6 +230,7 @@ END
                $manlines++;
           
        }
+       $chainsman{$chainname."end"} = $manlines-1;
        close (FILE);
 
 # now the chain hash is extracted to get the correct name of the chain
@@ -240,7 +242,7 @@ END
 # 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;
@@ -270,8 +272,8 @@ END
        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";
@@ -307,7 +309,7 @@ END
                }
                print "</td>\n</tr>\n";
        }
-print "</table></DIV><br />";
+print "</table></div><br />";
 &Header::closebox();
 
 ## NAT
@@ -327,7 +329,7 @@ if ( $cgiparams{'selectedchain'} ne "" ){
 
 print <<END
 
-<DIV align='left'>
+<div align='left'>
 END
 ;
 
@@ -335,7 +337,7 @@ 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] = $_;
@@ -355,6 +357,7 @@ END
                $natlines++;
           
        }
+       $chainsnat{$chainname."end"} = $natlines-1;
        close (FILE);
 
 # now the chain hash is extracted to get the correct name of the chain
@@ -366,7 +369,7 @@ END
 # 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;
@@ -396,8 +399,8 @@ END
        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";
@@ -426,11 +429,11 @@ END
                }
                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");