+ print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n<select name='selectedchain' style='width: 250px'>\n";
+ foreach (sort(keys(%chainsman))){
+
+ if ( $_ =~ /end$/ ){
+ next;
+ } else {
+ $_ =~ s/start$//gi;
+ }
+
+ print " <option value='".$_;
+ if ( $_ eq $selectedchain ){
+ print "' selected='selected' >".$_."</option>\n";
+ } else {
+ print "'>".$_."</option>\n";
+ }
+ }
+ print "</select><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /><form><br /><br />\n\n";
+
+ $string = $ipmanlines[$chainsman{$selectedchain."start"}];
+ $string =~ s/\s$//gi;
+
+ print "<strong>".$string."</strong><br />\n\n";
+ print "<table width='100%' cellspacing='1'>\n<tr>\n";
+ foreach (split(/ +/,$ipmlines[$chainsman{$selectedchain."start"}+1])){
+ if ( $_ =~ /[^a-zA-Z]/ ){chomp($_);}
+ print " <th align='left'><strong>".$_."</strong></th>\n";
+ }
+
+ print "</tr>\n";
+
+ print "<tr>\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 "</tr>\n";
+
+ for(my $i = $chainsman{$selectedchain."start"}+2; $i <= $chainsman{$selectedchain."end"}; $i++) {
+ print "<tr>\n";
+ my @iptablesline = split(/ +/,$ipmlines[$i]);
+ my $offset=0;
+
+ if ( $iptablesline[0] eq "" ){
+ $offset=1;
+ }
+
+ print " <td></td>\n <td>".$iptablesline[0+$offset]."</td>\n <td>".$iptablesline[1+$offset]."</td>\n";
+ print " <td>".$iptablesline[2+$offset]."</td>\n <td>".$iptablesline[3+$offset]."</td>\n";
+ print " <td>".$iptablesline[4+$offset]."</td>\n <td>".&Header::colorize($iptablesline[5+$offset])."</td>\n";
+ print " <td>".&Header::colorize($iptablesline[6+$offset])."</td>\n";
+ print " <td>".&Header::colorize($iptablesline[7+$offset])."</td>\n";
+ print " <td>".&Header::colorize($iptablesline[8+$offset])."</td>\n <td>";
+
+ for (my $i=9+$offset; $i <= $#iptablesline; $i++){
+ $string = $iptablesline[$i];
+ $string =~ s/\s$//gi;
+
+# mangles with marks need to be converted from hex to number to show the correct qos class
+
+ if ( $string =~ /^0x/){
+ $string = hex($string);
+ }
+
+ print " ".$string;
+ }
+ print "</td>\n</tr>\n";
+ }
+print "</table></div><br />";