Index: trunk/klask
===================================================================
--- trunk/klask	(revision 348)
+++ trunk/klask	(revision 349)
@@ -1755,5 +1755,5 @@
 
    print <<'END_HTML';
-<table class="sortable" summary="Klask Host Database">
+<table class="sortable">
  <caption>Klask Host Database</caption>
  <thead>
@@ -1769,16 +1769,4 @@
   </tr>
  </thead>
- <tfoot>
-  <tr>
-   <th scope="col" class="klask-footer-left">Switch</th>
-   <th scope="col" class="fklask-port">Port</th>
-   <th scope="col" class="fklask-link">Link</th>
-   <th scope="col" class="fklask-hostname">Hostname-FQ</th>
-   <th scope="col" class="fklask-ipv4">IPv4-Address</th>
-   <th scope="col" class="fklask-mac">MAC-Address</th>
-   <th scope="col" class="fklask-vlan">VLAN</th>
-   <th scope="col" class="klask-footer-right">Date</th>
-  </tr>
- </tfoot>
  <tbody>
 END_HTML
@@ -2031,4 +2019,16 @@
    print <<'END_HTML';
  </tbody>
+ <tfoot>
+  <tr>
+   <th scope="col" class="klask-footer-left">Switch</th>
+   <th scope="col" class="fklask-port">Port</th>
+   <th scope="col" class="fklask-link">Link</th>
+   <th scope="col" class="fklask-hostname">Hostname-FQ</th>
+   <th scope="col" class="fklask-ipv4">IPv4-Address</th>
+   <th scope="col" class="fklask-mac">MAC-Address</th>
+   <th scope="col" class="fklask-vlan">VLAN</th>
+   <th scope="col" class="klask-footer-right">Date</th>
+  </tr>
+ </tfoot>
 </table>
 END_HTML
@@ -2201,6 +2201,6 @@
 
    print <<'END_HTML';
-<table class="sortable" summary="Klask Bad VLAN ID Database">
- <caption>Klask Bad VLAN ID Database</caption>
+<table class="sortable">
+ <caption>Klask VLAN ID Mismatch Database</caption>
  <thead>
   <tr>
@@ -2215,4 +2215,35 @@
   </tr>
  </thead>
+ <tbody>
+END_HTML
+
+   my $typerow = 'even';
+
+   for my $item (@result) {
+
+      $typerow = $typerow eq 'even' ? 'odd' : 'even';
+
+      my $switch_hostname_sort = format_switchport4sort($item->{'switch'}, $item->{'port_hr'});
+      my ( $host_short ) = split m/ \. /xms, $item->{'hostname_fq'};
+
+      my $vlan_nameid = $item->{'vlan_good'} . ' (' . $item->{'vlan_id'} . ')';
+
+      fqdn_html_breakable(my $hostname_fq_html = $item->{'hostname_fq'});
+
+      print <<"END_HTML";
+  <tr class="$typerow">
+   <td sorttable_customkey="$switch_hostname_sort">$item->{'switch'}</td>
+   <td class="bklask-port">$item->{'port_hr'}</td>
+   <td>!$item->{'vlan_bad'}</td>
+   <td>$vlan_nameid</td>
+   <td>$item->{'date_last'}</td>
+   <td>$item->{'date_good'}</td>
+   <td>$item->{'mac_address'}</td>
+   <td sorttable_customkey="$host_short">$hostname_fq_html</td>
+  </tr>
+END_HTML
+      }
+   print <<'END_HTML';
+ </tbody>
  <tfoot>
   <tr>
@@ -2227,35 +2258,4 @@
   </tr>
  </tfoot>
- <tbody>
-END_HTML
-
-   my $typerow = 'even';
-
-   for my $item (@result) {
-
-      $typerow = $typerow eq 'even' ? 'odd' : 'even';
-
-      my $switch_hostname_sort = format_switchport4sort($item->{'switch'}, $item->{'port_hr'});
-      my ( $host_short ) = split m/ \. /xms, $item->{'hostname_fq'};
-
-      my $vlan_nameid = $item->{'vlan_good'} . ' (' . $item->{'vlan_id'} . ')';
-
-      fqdn_html_breakable(my $hostname_fq_html = $item->{'hostname_fq'});
-
-      print <<"END_HTML";
-  <tr class="$typerow">
-   <td sorttable_customkey="$switch_hostname_sort">$item->{'switch'}</td>
-   <td class="bklask-port">$item->{'port_hr'}</td>
-   <td>!$item->{'vlan_bad'}</td>
-   <td>$vlan_nameid</td>
-   <td>$item->{'date_last'}</td>
-   <td>$item->{'date_good'}</td>
-   <td>$item->{'mac_address'}</td>
-   <td sorttable_customkey="$host_short">$hostname_fq_html</td>
-  </tr>
-END_HTML
-      }
-   print <<'END_HTML';
- </tbody>
 </table>
 END_HTML
@@ -2758,5 +2758,5 @@
 
    print <<'END_HTML';
-<table class="sortable" summary="Klask Free IP Database">
+<table class="sortable">
  <caption>Klask Free IP Database</caption>
  <thead>
@@ -2768,4 +2768,32 @@
   </tr>
  </thead>
+ <tbody>
+END_HTML
+
+   my $typerow = 'even';
+
+   LOOP_ON_IP_ADDRESS:
+   for my $ip (Net::Netmask::sort_by_ip_address(keys %result_ip)) {
+
+      $typerow = $typerow eq 'even' ? 'odd' : 'even';
+
+      my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ip;
+      my ( $host_short ) = split m/ \. /xms, $result_ip{$ip}->{'hostname_fq'};
+
+      my $vlan_nameid = $result_ip{$ip}->{'vlan'}.' ('.get_current_vlan_id($result_ip{$ip}->{'vlan'}).')';
+
+      fqdn_html_breakable(my $hostname_fq_html = $result_ip{$ip}->{'hostname_fq'});
+
+      print <<"END_HTML";
+  <tr class="$typerow">
+   <td sorttable_customkey="$ip_sort">$ip</td>
+   <td sorttable_customkey="$host_short">$hostname_fq_html</td>
+   <td>$vlan_nameid</td>
+   <td>$result_ip{$ip}->{'date_last_detection'}</td>
+  </tr>
+END_HTML
+      }
+   print <<'END_HTML';
+ </tbody>
  <tfoot>
   <tr>
@@ -2776,32 +2804,4 @@
   </tr>
  </tfoot>
- <tbody>
-END_HTML
-
-   my $typerow = 'even';
-
-   LOOP_ON_IP_ADDRESS:
-   for my $ip (Net::Netmask::sort_by_ip_address(keys %result_ip)) {
-
-      $typerow = $typerow eq 'even' ? 'odd' : 'even';
-
-      my $ip_sort = sprintf '%03i%03i%03i%03i', split m/ \. /xms, $ip;
-      my ( $host_short ) = split m/ \. /xms, $result_ip{$ip}->{'hostname_fq'};
-
-      my $vlan_nameid = $result_ip{$ip}->{'vlan'}.' ('.get_current_vlan_id($result_ip{$ip}->{'vlan'}).')';
-
-      fqdn_html_breakable(my $hostname_fq_html = $result_ip{$ip}->{'hostname_fq'});
-
-      print <<"END_HTML";
-  <tr class="$typerow">
-   <td sorttable_customkey="$ip_sort">$ip</td>
-   <td sorttable_customkey="$host_short">$hostname_fq_html</td>
-   <td>$vlan_nameid</td>
-   <td>$result_ip{$ip}->{'date_last_detection'}</td>
-  </tr>
-END_HTML
-      }
-   print <<'END_HTML';
- </tbody>
 </table>
 END_HTML
